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> >
size_type physicalLength() const
const TVal * getPtr() const
const TVal * asArrayPtr() const
bool contains(const T &value, size_type start=0) const
void resize(size_type logicalLength, const TVal &value)
size_type append(const T &value)
OdManagedSlots(size_type physicalLength, int growLength=8)
OdSlots< TVal, TAlloc >::size_type size_type
void freeSlot(OdSlotId slotId)
unsigned int numSlots() const
bool contains(OdSlotId slotId) const
TVal & operator[](OdSlotId slotId)
const TVal & getAt(OdSlotId slotId) const
void setAt(OdSlotId slotId, const TVal &value)
OdSlots(size_type physicalLength, int growLength=8)
OdArray< TVal, TAlloc >::size_type size_type
const TVal & operator[](OdSlotId slotId) const
static const TVal * emptySlotValue()
GLsizei const GLfloat * value