Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cUIDRangeMask Class Reference

#include <cUID.h>

Public Member Functions

 cUIDRangeMask (UID_t nUIDMaskType=0x80000000, UID_t nUIDMaskIndex=0x7FFFFFFF, UIDINDEX_t dwIndexStart=1)
 
void InitRangeMask (UID_t nUIDMaskType, UID_t nUIDMaskIndex, UIDINDEX_t dwIndexStart=1)
 
bool isValidRangeMask () const noexcept
 
bool IsValidQty (UIDINDEX_t index) const noexcept
 
bool IsValidIndex (UIDINDEX_t index) const noexcept
 
bool IsValidUID (UID_t uid) const noexcept
 
UIDINDEX_t U2I_NoCheck (UID_t uid) const noexcept
 
UIDINDEX_t U2I (UID_t uid) const
 
UID_t I2U (UIDINDEX_t index) const
 

Public Attributes

UID_t m_nUIDMaskType
 'or' this onto UID to mark type. high bits outside range. More...
 
UID_t m_nUIDMaskIndex
 'and' bits for index range. ex. 0xffff More...
 
UIDINDEX_t m_nIndexStart
 Start of non static indexes. inside m_nUIDMaskIndex. typically 1. More...
 

Detailed Description

General characteristic info for a range/partition of UID's Reserve index = 0 for special null case. allow segmentation of the UID_t range into type based ranges. Used by cXObjTypeDef.

Note
use UIDINDEX_t to make UID_t separate from index.

Constructor & Destructor Documentation

◆ cUIDRangeMask()

GrayLib::cUIDRangeMask::cUIDRangeMask ( UID_t  nUIDMaskType = 0x80000000,
UID_t  nUIDMaskIndex = 0x7FFFFFFF,
UIDINDEX_t  dwIndexStart = 1 
)
inline

default mask is minimally range restricted. We may not know the proper m_nUIDMaskType until cXObjTypeDef are all registered.

Member Function Documentation

◆ I2U()

UID_t GrayLib::cUIDRangeMask::I2U ( UIDINDEX_t  index) const
inline

convert an index to a dressed UID_t.

◆ InitRangeMask()

void GrayLib::cUIDRangeMask::InitRangeMask ( UID_t  nUIDMaskType,
UID_t  nUIDMaskIndex,
UIDINDEX_t  dwIndexStart = 1 
)
inline

◆ IsValidIndex()

bool GrayLib::cUIDRangeMask::IsValidIndex ( UIDINDEX_t  index) const
inlinenoexcept

Index must not overflow the UID_t mask.

◆ IsValidQty()

bool GrayLib::cUIDRangeMask::IsValidQty ( UIDINDEX_t  index) const
inlinenoexcept

◆ isValidRangeMask()

bool GrayLib::cUIDRangeMask::isValidRangeMask ( ) const
inlinenoexcept

◆ IsValidUID()

bool GrayLib::cUIDRangeMask::IsValidUID ( UID_t  uid) const
inlinenoexcept

Is the UID_t in the specific range ?

◆ U2I()

UIDINDEX_t GrayLib::cUIDRangeMask::U2I ( UID_t  uid) const
inline

convert a dressed UID_t to an UIDINDEX_t. ASSUME isValidUID(UID).

◆ U2I_NoCheck()

UIDINDEX_t GrayLib::cUIDRangeMask::U2I_NoCheck ( UID_t  uid) const
inlinenoexcept

convert a dressed UID to an index. ASSUME isValidUID(UID).

Member Data Documentation

◆ m_nIndexStart

UIDINDEX_t GrayLib::cUIDRangeMask::m_nIndexStart

Start of non static indexes. inside m_nUIDMaskIndex. typically 1.

◆ m_nUIDMaskIndex

UID_t GrayLib::cUIDRangeMask::m_nUIDMaskIndex

'and' bits for index range. ex. 0xffff

◆ m_nUIDMaskType

UID_t GrayLib::cUIDRangeMask::m_nUIDMaskType

'or' this onto UID to mark type. high bits outside range.


The documentation for this class was generated from the following file: