![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cUIDManagerArray.h>
Public Member Functions | |
cUIDManagerArray (const cUIDRangeMask &mask, bool bReUseFreedUIDs=true) | |
~cUIDManagerArray () | |
UIDINDEX_t | get_UIDCount () const noexcept |
virtual cXObjectPtr | FindUIDObj (UID_t nUID) const |
bool | isIndexPlaceHolder (UIDINDEX_t dwIndex) const |
void | ClearUIDPlaceHolder (UID_t nUID) |
bool | FreeUID (UID_t nUID) |
bool | FreeUID (cXObject *pObj) |
UID_t | LoadUID (cXObject *pObj, UID_t dwIndex) |
UID_t | AllocUID (cXObject *pObj) |
void | FlushFreeUIDs () |
void | DisposeAllUIDs () |
void | put_ReUseFreeUIDs (bool bReUseFreeUIDs) |
UNITTEST_FRIEND (cUIDManagerArray) | |
![]() | |
THREADID_t | get_ThreadLockOwner () const |
Public Attributes | |
cUIDRangeMask | m_UIDRange |
Mask of the range of valid UID's (allow high bits to float) More... | |
Protected Member Functions | |
UIDINDEX_t | FindFreeIndex () |
![]() | |
cLockableBase () noexcept | |
~cLockableBase () | |
LONG | get_LockCount () const |
bool | isLocked () const |
void | IncLockCount () |
LONG | DecLockCount () |
void | Lock () |
LONG | Unlock () |
Manage a range/pool of UID's in memory. a fast way to find a free UID. We might have used a CHash but this is faster. The array container to track all the used/unused UIDs 0 UID is reserved. as are values >= cUIDRangeMask
GrayLib::cUIDManagerArray::cUIDManagerArray | ( | const cUIDRangeMask & | mask, |
bool | bReUseFreedUIDs = true |
||
) |
GrayLib::cUIDManagerArray::~cUIDManagerArray | ( | ) |
void GrayLib::cUIDManagerArray::ClearUIDPlaceHolder | ( | UID_t | nUID | ) |
void GrayLib::cUIDManagerArray::DisposeAllUIDs | ( | ) |
|
protected |
|
inlinevirtual |
void GrayLib::cUIDManagerArray::FlushFreeUIDs | ( | ) |
clear out all the UIDs marked for delete.
bool GrayLib::cUIDManagerArray::FreeUID | ( | cXObject * | pObj | ) |
bool GrayLib::cUIDManagerArray::FreeUID | ( | UID_t | nUID | ) |
Can't free up the UID until after the save !
|
inlinenoexcept |
|
inline |
Loading an object that wants a specific UID. nUID = Set to this UID
void GrayLib::cUIDManagerArray::put_ReUseFreeUIDs | ( | bool | bReUseFreeUIDs | ) |
Do not release UID's to be re-used.
GrayLib::cUIDManagerArray::UNITTEST_FRIEND | ( | cUIDManagerArray | ) |
cUIDRangeMask GrayLib::cUIDManagerArray::m_UIDRange |
Mask of the range of valid UID's (allow high bits to float)