CFx SDK Documentation  2022 SP0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OdSlots< TVal, TAlloc > Class Template Reference

#include <SlotManager.h>

Inheritance diagram for OdSlots< TVal, TAlloc >:
OdArray< TVal, OdObjectsAllocator< TVal > >

Public Types

typedef OdArray< TVal, TAlloc >::size_type size_type
 
- Public Types inherited from OdArray< TVal, OdObjectsAllocator< TVal > >
typedef A::size_type size_type
 
typedef TVal * iterator
 
typedef const TVal * const_iterator
 
typedef TVal value_type
 
typedef const TVal & const_reference
 
typedef TVal & reference
 

Public Member Functions

 OdSlots ()
 
 OdSlots (size_type physicalLength, int growLength=8)
 
const TVal & operator[] (OdSlotId slotId) const
 
TVal & operator[] (OdSlotId slotId)
 
const TVal & getAt (OdSlotId slotId) const
 
void setAt (OdSlotId slotId, const TVal &value)
 
- Public Member Functions inherited from OdArray< TVal, OdObjectsAllocator< TVal > >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void insert (iterator before, const_iterator first, const_iterator afterLast)
 
iterator insert (iterator before, size_type numElements, const TVal &value)
 
iterator insert (iterator before, const TVal &value=TVal())
 
void resize (size_type logicalLength, const TVal &value)
 
void resize (size_type logicalLength)
 
size_type size () const
 
bool empty () const
 
size_type capacity () const
 
void reserve (size_type reserveLength)
 
void assign (const_iterator first, const_iterator afterLast)
 
iterator erase (iterator first, iterator afterLast)
 
iterator erase (iterator where)
 
void clear ()
 
void push_back (const TVal &value)
 
bool contains (const TVal &value, size_type start=0) const
 
size_type length () const
 
bool isEmpty () const
 
size_type logicalLength () const
 
size_type physicalLength () const
 
int growLength () const
 
const TVal * asArrayPtr () const
 
TVal * asArrayPtr ()
 
const TVal * getPtr () const
 
const TVal & operator[] (size_type index) const
 
TVal & operator[] (size_type index)
 
TVal & at (size_type arrayIndex)
 
const TVal & at (size_type arrayIndex) const
 
OdArraysetAt (size_type arrayIndex, const TVal &value)
 
const TVal & getAt (size_type arrayIndex) const
 
TVal & first ()
 
const TVal & first () const
 
TVal & last ()
 
const TVal & last () const
 
size_type append (const TVal &value)
 
iterator append ()
 
OdArrayappend (const OdArray &otherArray)
 
OdArrayremoveFirst ()
 
OdArrayremoveLast ()
 
OdArraysetGrowLength (int growLength)
 
 OdArray (size_type physicalLength, int growLength=8)
 
 OdArray ()
 
 OdArray (const OdArray &source)
 
 ~OdArray ()
 
OdArrayoperator= (const OdArray &source)
 
bool operator== (const OdArray &array) const
 
OdArraysetAll (const TVal &value)
 
OdArrayinsertAt (size_type arrayIndex, const TVal &value)
 
OdArrayremoveAt (size_type arrayIndex)
 
OdArrayremoveSubArray (size_type startIndex, size_type endIndex)
 
bool find (const TVal &value, size_type &findIndex, size_type start=0) const
 
OdArraysetLogicalLength (size_type logLength)
 
OdArraysetPhysicalLength (size_type physLength)
 
OdArrayreverse ()
 
OdArrayswap (size_type firstIndex, size_type secondIndex)
 
bool remove (const TVal &value, size_type start=0)
 

Static Public Member Functions

static const TVal * emptySlotValue ()
 

Detailed Description

template<class TVal, class TAlloc = OdObjectsAllocator<TVal>>
class OdSlots< TVal, TAlloc >

This template class implements a collection of Slots.

Remarks
Unlike Array elements, Slots may be empty, filled, or freed. New Slots are either allocated from the list of freed Slots, or added to the end of the underlying Array.

<group Other_Classes>

Definition at line 118 of file SlotManager.h.

Member Typedef Documentation

◆ size_type

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
typedef OdArray<TVal, TAlloc>::size_type OdSlots< TVal, TAlloc >::size_type

Definition at line 128 of file SlotManager.h.

Constructor & Destructor Documentation

◆ OdSlots() [1/2]

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
OdSlots< TVal, TAlloc >::OdSlots ( )
inline

Definition at line 130 of file SlotManager.h.

◆ OdSlots() [2/2]

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
OdSlots< TVal, TAlloc >::OdSlots ( size_type  physicalLength,
int  growLength = 8 
)
inline
Parameters
physicalLength[in] Initial physical length.
growLength[in] Initial grow length.

Definition at line 135 of file SlotManager.h.

Member Function Documentation

◆ emptySlotValue()

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
static const TVal* OdSlots< TVal, TAlloc >::emptySlotValue ( )
inlinestatic

Returns the value of an empty Slot in this Slots object.

Definition at line 141 of file SlotManager.h.

◆ getAt()

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
const TVal& OdSlots< TVal, TAlloc >::getAt ( OdSlotId  slotId) const
inline

Returns the value at the specified Slot in this Slots object.

Parameters
slotId[in] Slot ID.
Remarks
Returns emptySlotValue() if you access an empty Slot.

Definition at line 170 of file SlotManager.h.

◆ operator[]() [1/2]

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
TVal& OdSlots< TVal, TAlloc >::operator[] ( OdSlotId  slotId)
inline

Returns emptySlotValue() if you access an empty Slot in this Slots object.

\param slotId [in]  Id of the slot.

Definition at line 157 of file SlotManager.h.

◆ operator[]() [2/2]

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
const TVal& OdSlots< TVal, TAlloc >::operator[] ( OdSlotId  slotId) const
inline

Returns emptySlotValue() if you access an empty Slot in this Slots object.

\param slotId [in]  Id of the slot.

Definition at line 148 of file SlotManager.h.

◆ setAt()

template<class TVal , class TAlloc = OdObjectsAllocator<TVal>>
void OdSlots< TVal, TAlloc >::setAt ( OdSlotId  slotId,
const TVal &  value 
)
inline

Sets the value at the specified Slot ID in this Slots object.

Parameters
slotId[in] Slot ID.
value[in] Value.

Definition at line 180 of file SlotManager.h.


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