CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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< T, A > OdManagedSlots< TVal, TAlloc >

Public Types

typedef OdArray< TVal, TAlloc >::size_type size_type
 
- Public Types inherited from OdArray< T, A >
using size_type = typename A::size_type
 
using iterator = T *
 
using const_iterator = const T *
 
using value_type = T
 
using const_reference = const T &
 
using reference = T &
 
using ConstForPtrT = typename std::conditional< std::is_pointer< T >::value, typename std::add_const< typename std::remove_pointer< T >::type >::type *, T >::type
 

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< T, A >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
std::reverse_iterator< iteratorrbegin ()
 
std::reverse_iterator< const_iteratorrbegin () const
 
std::reverse_iterator< iteratorrend ()
 
std::reverse_iterator< const_iteratorrend () const
 
void insert (iterator before, const_iterator first, const_iterator afterLast)
 
void insertMove (iterator before, iterator first, iterator afterLast)
 
void resize (size_type logicalLength, const T &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)
 
void assignMove (iterator first, iterator afterLast)
 
iterator erase (iterator first, iterator afterLast)
 
iterator erase (iterator where)
 
void clear ()
 
void push_back (const T &value)
 
void push_back (T &&value)
 
iterator insert (iterator before, size_type numElements, const T &value)
 
iterator insert (iterator before, const T &value=T())
 
iterator insert (iterator before, T &&value)
 
bool contains (const ConstForPtrT &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 T * asArrayPtr () const
 
const T * getPtr () const
 
T * asArrayPtr ()
 
const T & operator[] (size_type index) const
 
T & operator[] (size_type index)
 
T & at (size_type arrayIndex)
 
const T & at (size_type arrayIndex) const
 
OdArraysetAt (size_type arrayIndex, const T &value)
 
const T & getAt (size_type arrayIndex) const
 
T & first ()
 
const T & first () const
 
T & last ()
 
const T & last () const
 
size_type append (const T &value)
 
size_type append (T &&value)
 
OdArrayinsertAtMove (size_type index, T &value)
 
size_type appendMove (T &value)
 
OdArrayappendMove (OdArray &otherArray)
 
OdArrayappendRep (const T &value, size_type nCount)
 
template<typename... Args>
OdArrayappendList (const Args &... args)
 
iterator append ()
 
OdArrayremoveFirst ()
 
OdArrayremoveLast ()
 
OdArraysetGrowLength (int growLength)
 
 OdArray (size_type physicalLength, int growLength=8)
 
 OdArray ()
 
 OdArray (const OdArray &source)
 
 OdArray (OdArray &&source)
 
 ~OdArray ()
 
OdArrayoperator= (const OdArray &source)
 
OdArrayoperator= (OdArray &&source)
 
bool operator== (const OdArray &array) const
 
bool operator!= (const OdArray &array) const
 
OdArraysetAll (const T &value)
 
OdArrayappend (const OdArray &otherArray)
 
OdArrayappend (OdArray &&otherArray)
 
OdArrayinsertAt (size_type arrayIndex, const T &value)
 
OdArrayinsertAt (size_type index, T &&val)
 
OdArrayremoveAt (size_type arrayIndex)
 
OdArrayremoveSubArray (size_type startIndex, size_type endIndex)
 
bool find (const ConstForPtrT &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)
 
void swap (OdArray &other)
 
bool remove (const T &value, size_type start=0)
 

Static Public Member Functions

static const TVal * emptySlotValue ()
 
- Static Public Member Functions inherited from OdArray< T, A >
static OdArray< T, A > create (T *sourceArray, int sourceLength)
 

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: