12 #include "../GrayLibBase.h"
38 #define cUID_PREFIX "#0"
39 #define cUID_FORMAT "#0%x"
86 : m_nUIDMaskType(nUIDMaskType)
87 , m_nUIDMaskIndex(nUIDMaskIndex)
88 , m_nIndexStart(dwIndexStart)
92 ASSERT(isValidRangeMask());
93 ASSERT(IsValidIndex(m_nIndexStart));
97 m_nUIDMaskType = nUIDMaskType;
98 m_nUIDMaskIndex = nUIDMaskIndex;
99 m_nIndexStart = dwIndexStart;
100 ASSERT(isValidRangeMask());
101 ASSERT(IsValidIndex(m_nIndexStart));
120 if (
index < m_nIndexStart)
129 if ((uid & ~m_nUIDMaskIndex) != m_nUIDMaskType)
132 return IsValidIndex(U2I_NoCheck(uid));
143 return U2I_NoCheck(uid);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define ASSERT(exp)
Definition: cDebugAssert.h:87
UIDINDEX_t m_nIndexStart
Start of non static indexes. inside m_nUIDMaskIndex. typically 1.
Definition: cUID.h:82
void InitRangeMask(UID_t nUIDMaskType, UID_t nUIDMaskIndex, UIDINDEX_t dwIndexStart=1)
Definition: cUID.h:95
cUIDRangeMask(UID_t nUIDMaskType=0x80000000, UID_t nUIDMaskIndex=0x7FFFFFFF, UIDINDEX_t dwIndexStart=1)
Definition: cUID.h:85
UID_t m_nUIDMaskType
'or' this onto UID to mark type. high bits outside range.
Definition: cUID.h:80
bool isValidRangeMask() const noexcept
Definition: cUID.h:103
bool IsValidIndex(UIDINDEX_t index) const noexcept
Definition: cUID.h:117
UIDINDEX_t U2I_NoCheck(UID_t uid) const noexcept
Definition: cUID.h:134
bool IsValidUID(UID_t uid) const noexcept
Definition: cUID.h:126
bool IsValidQty(UIDINDEX_t index) const noexcept
Definition: cUID.h:111
UID_t m_nUIDMaskIndex
'and' bits for index range. ex. 0xffff
Definition: cUID.h:81
UIDINDEX_t U2I(UID_t uid) const
Definition: cUID.h:139
UID_t I2U(UIDINDEX_t index) const
Definition: cUID.h:146
UID_t m_nUIDValue
Definition: cUID.h:28
UID_t get_UIDValue() const noexcept
Definition: cUID.h:59
static const UID_t k_BAD
not valid assigned UID.
Definition: cUID.h:33
static bool IsValidUID(UID_t uid) noexcept
Definition: cUID.h:46
cUID(UID_t u) noexcept
Definition: cUID.h:41
static const UID_t k_CONTEXT
special hard coded UID for global cScriptContextObj. k_HASHCODE_CLEAR
Definition: cUID.h:36
bool isValidUID() const noexcept
Definition: cUID.h:51
static const UID_t k_ROOT
special hard coded UID for the root cXObject.
Definition: cUID.h:35
UID_t get_HashCode() const noexcept
Definition: cUID.h:55
static const UID_t k_CLEAR
Hard coded UID_t values.
Definition: cUID.h:32
int UIDINDEX_t
non dressed (partial) UID_t. just an index in a range inside the UID_t. k_HASHCODE_CLEAR
Definition: cUID.h:69
HASHCODE32_t UID_t
Sort of the same as a HASHCODE_t. not the same as UIDINDEX_t.
Definition: cUID.h:18
const HASHCODE_t k_HASHCODE_CLEAR
not a valid index.
Definition: GrayCore.h:118
UINT32 HASHCODE32_t
always 32 bits.
Definition: GrayCore.h:117
uint16 index
Definition: sample3.cpp:29