Type-safe wrapper for a Ring index. This class ensures that a ring index is valid and within the bounds defined by MAX_NUM_RINGS. It prevents out-of-range errors at the point of construction.
More...
#include <RingId.h>
|
| | RingId (std::size_t idx) |
| | Constructs a RingId and validates the index.
|
| |
| std::size_t | index () const noexcept |
| | Gets the raw numeric index of the ring.
|
| |
|
|
static constexpr std::size_t | MAX_NUM_RINGS = 12 |
| | Maximum number of rings supported by the RMM system.
|
| |
Type-safe wrapper for a Ring index. This class ensures that a ring index is valid and within the bounds defined by MAX_NUM_RINGS. It prevents out-of-range errors at the point of construction.
◆ RingId()
| RingId::RingId |
( |
std::size_t | idx | ) |
|
|
inlineexplicit |
Constructs a RingId and validates the index.
- Parameters
-
| idx | The index of the ring. |
- Exceptions
-
| std::out_of_range | If idx is greater than or equal to MAX_NUM_RINGS. |
◆ index()
| std::size_t RingId::index |
( |
| ) |
const |
|
inlinenoexcept |
Gets the raw numeric index of the ring.
- Returns
- The validated ring index as a std::size_t.
The documentation for this class was generated from the following file: