CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
29 #ifndef _SLOTMANAGER_H_INCLUDED_
30 #define _SLOTMANAGER_H_INCLUDED_
38 #define kOdNullSlotId OdSlotId(-1)
49 unsigned int m_numSlots;
67 res = m_freeSlots.
last();
79 if(slotId+1==m_numSlots)
85 m_freeSlots.
append(slotId);
95 return (slotId < m_numSlots && !m_freeSlots.
contains(slotId, 0));
117 template <
class TVal,
class TAlloc = OdObjectsAllocator<TVal> >
122 if(slotId >= this->
size())
141 static const TVal*
emptySlotValue() {
static const TVal def = TVal();
return &def; }
192 template <
class TVal,
class TAlloc = OdObjectsAllocator<TVal> >
247 #endif // #ifndef _SLOTMANAGER_H_INCLUDED_
void setAt(OdSlotId slotId, const TVal &value)
static const TVal * emptySlotValue()
TVal & operator[](OdSlotId slotId)
OdManagedSlots(size_type physicalLength, int growLength=8)
bool contains(OdSlotId slotId) const
bool contains(const T &value, size_type start=0) const
const TVal * getPtr() const
const TVal * asArrayPtr() const
const TVal & getAt(OdSlotId slotId) const
OdSlots(size_type physicalLength, int growLength=8)
size_type physicalLength() const
size_type append(const T &value)
void resize(size_type logicalLength, const TVal &value)
unsigned int numSlots() const
void freeSlot(OdSlotId slotId)
GLsizei const GLfloat * value
const TVal & operator[](OdSlotId slotId) const
OdSlots< TVal, TAlloc >::size_type size_type
OdArray< TVal, TAlloc >::size_type size_type