LimitedUInt5

class LimitedUInt5 : public LimitedInteger<uint8_t>

unsigned integer of 5 bits size (0 - 31)

Public Functions

inline explicit LimitedUInt5(int v)

Constructs a LimitedUInt5 object and initializes its value.

Parameters:

v – The integer value to be set.

Throws:

std::out_of_range – If v is not compatible with the limitations of this integer class

inline virtual int getMin() const override

Retrieves the minimum value for the range of this integer.

Returns:

The minimum value allowed for this integer as an int.

inline virtual int getMax() const override

Retrieves the maximum value for the range of this integer.

Returns:

The maximum value allowed for this integer as an int.