RMM API 2.0.0
Loading...
Searching...
No Matches
RingId Class Reference

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>

Public Member Functions

 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 Public Attributes

static constexpr std::size_t MAX_NUM_RINGS = 12
 Maximum number of rings supported by the RMM system.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RingId()

RingId::RingId ( std::size_t idx)
inlineexplicit

Constructs a RingId and validates the index.

Parameters
idxThe index of the ring.
Exceptions
std::out_of_rangeIf idx is greater than or equal to MAX_NUM_RINGS.

Member Function Documentation

◆ 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: