CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
OdArray< T, A > Class Template Reference

#include <OdArray.h>

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

Public Types

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

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 OdArray< T, A > create (T *sourceArray, int sourceLength)
 

Friends

class reallocator
 

Detailed Description

template<class T, class A>
class OdArray< T, A >

This template class implements dynamic array objects within the ODA Platform.

Remarks

Objects of the OdArray and OdVector classes are similar: elements are sequenced linearly, elements can be directly accessed, adding and deleting elements from the end of the sequence is fast, and the objects can resize automatically when an element is inserted or deleted.

The OdArray class uses copy-on-write (implicit sharing) to duplicate or copy data.

This prevents accidental corruption of unrelated data when changing the contents of an OdArray object. OdArray objects share data when possible, which reduces memory consumption and unnecessary data copying.

Use the OdArray class to avoid unnecessary array copies in cases where, according to the rules of C++, OdVector is copied, although this is not necessary. However, OdArray does not support C++11 move semantics, which OdVector supports. The OdArray class works similarly to QList.

Methods are provided to access array elements via both array indices and array pointers (iterators).

Definitions:

  1. Logical length or size – The number of entries in the array. Initially zero.
  2. Physical length – The maximum logical length of the array before it automatically grows.
  3. Grow length – The number of entries by which the physical length will grow as required.
See also
TD_Db

<group Other_Classes>

Definition at line 828 of file OdArray.h.

Member Typedef Documentation

◆ const_iterator

template<class T , class A >
using OdArray< T, A >::const_iterator = const T*

Definition at line 833 of file OdArray.h.

◆ const_reference

template<class T , class A >
using OdArray< T, A >::const_reference = const T&

Definition at line 835 of file OdArray.h.

◆ ConstForPtrT

template<class T , class A >
using OdArray< T, A >::ConstForPtrT = typename std::conditional<std::is_pointer<T>::value, typename std::add_const<typename std::remove_pointer<T>::type>::type*, T>::type

Definition at line 837 of file OdArray.h.

◆ iterator

template<class T , class A >
using OdArray< T, A >::iterator = T*

Definition at line 832 of file OdArray.h.

◆ reference

template<class T , class A >
using OdArray< T, A >::reference = T&

Definition at line 836 of file OdArray.h.

◆ size_type

template<class T , class A >
using OdArray< T, A >::size_type = typename A::size_type

Definition at line 831 of file OdArray.h.

◆ value_type

template<class T , class A >
using OdArray< T, A >::value_type = T

Definition at line 834 of file OdArray.h.

Constructor & Destructor Documentation

◆ OdArray() [1/4]

template<class T , class A >
OdArray< T, A >::OdArray ( size_type  physicalLength,
int  growLength = 8 
)
inlineexplicit

Constructor for the OdArray class.

Parameters
physicalLength[in] Initial physical length.
growLength[in] Initial grow length.

Definition at line 1927 of file OdArray.h.

◆ OdArray() [2/4]

template<class T , class A >
OdArray< T, A >::OdArray ( )
inline

Definition at line 1938 of file OdArray.h.

◆ OdArray() [3/4]

template<class T , class A >
OdArray< T, A >::OdArray ( const OdArray< T, A > &  source)
inline

Definition at line 1943 of file OdArray.h.

◆ OdArray() [4/4]

template<class T , class A >
OdArray< T, A >::OdArray ( OdArray< T, A > &&  source)
inline

Definition at line 1949 of file OdArray.h.

◆ ~OdArray()

template<class T , class A >
OdArray< T, A >::~OdArray ( )
inline

Destroys an array instance.

Definition at line 1965 of file OdArray.h.

Member Function Documentation

◆ append() [1/5]

template<class T , class A >
iterator OdArray< T, A >::append ( )
inline

Returns an iterator to the first element after the last element in the array.

Returns
Pointer to the first element after the last element in the array.

Definition at line 1873 of file OdArray.h.

◆ append() [2/5]

template<class T , class A >
OdArray & OdArray< T, A >::append ( const OdArray< T, A > &  otherArray)
inline

Appends the specified array object to the end of this array object.

Parameters
otherArray[in] Array to append.
Returns
Reference to the array object.

Definition at line 2037 of file OdArray.h.

◆ append() [3/5]

template<class T , class A >
size_type OdArray< T, A >::append ( const T &  value)
inline

Appends the specified value to the end of the array object.

Parameters
value[in] Value to append.
Returns
The index of the new last element.

Definition at line 1725 of file OdArray.h.

◆ append() [4/5]

template<class T , class A >
OdArray & OdArray< T, A >::append ( OdArray< T, A > &&  otherArray)
inline

Appends the specified array object to the end of this array object.

Parameters
otherArray[in] Array to append.
Returns
Reference to the array object.

Definition at line 2051 of file OdArray.h.

◆ append() [5/5]

template<class T , class A >
size_type OdArray< T, A >::append ( T &&  value)
inline

Appends the specified value to the end of this Array object using move semantics.

Parameters
value[in] Value to append.
Returns
Returns the index of the new last element.

Definition at line 1740 of file OdArray.h.

◆ appendList()

template<class T , class A >
template<typename... Args>
OdArray & OdArray< T, A >::appendList ( const Args &...  args)
inline

Appends the specified values to the end of this Array object.

Parameters
args[in] Values to append.
Returns
Returns the reference to this Array.

Definition at line 1845 of file OdArray.h.

◆ appendMove() [1/2]

template<class T , class A >
OdArray & OdArray< T, A >::appendMove ( OdArray< T, A > &  otherArray)
inline

Appends the specified array object to the end of this array object.

Parameters
otherArray[in] Array to append.
Returns
Reference to the array object.

Definition at line 1804 of file OdArray.h.

◆ appendMove() [2/2]

template<class T , class A >
size_type OdArray< T, A >::appendMove ( T &  value)
inline

Appends the specified value to the end of this Array object using move semantics.

Parameters
value[in] Value to append.
Returns
Returns the index of the new last element.

Definition at line 1792 of file OdArray.h.

◆ appendRep()

template<class T , class A >
OdArray & OdArray< T, A >::appendRep ( const T &  value,
size_type  nCount 
)
inline

Appends the specified value to the end of this Array object n times.

Parameters
value[in] Value to append.
nCount[in] Count.
Returns
Returns the reference to this Array.

Definition at line 1820 of file OdArray.h.

◆ asArrayPtr() [1/2]

template<class T , class A >
T * OdArray< T, A >::asArrayPtr ( )
inline

Returns the data buffer of the array object.

Returns
Pointer to the data buffer.

Definition at line 1610 of file OdArray.h.

◆ asArrayPtr() [2/2]

template<class T , class A >
const T * OdArray< T, A >::asArrayPtr ( ) const
inline

Returns the data buffer of the array object.

Returns
Pointer to the data buffer.

Definition at line 1590 of file OdArray.h.

◆ assign()

template<class T , class A >
void OdArray< T, A >::assign ( const_iterator  first,
const_iterator  afterLast 
)
inline

Assigns the specified range of elements to the array object.

Parameters
first[in] Position of the first element to be assigned.
afterLast[in] Position of the first element after the last element to be assigned.
Remarks
After the array object is cleared, the function assigns the specified range of elements from another array object.

Definition at line 1299 of file OdArray.h.

◆ assignMove()

template<class T , class A >
void OdArray< T, A >::assignMove ( iterator  first,
iterator  afterLast 
)
inline

Assigns the specified range of elements to the array object.

Parameters
first[in] Position of the first element to be assigned.
afterLast[in] Position of the first element after the last element to be assigned.
Remarks
After the array object is cleared, the function assigns the specified range of elements from another array object.

Definition at line 1338 of file OdArray.h.

◆ at() [1/2]

template<class T , class A >
T & OdArray< T, A >::at ( size_type  arrayIndex)
inline

Returns the element of the array object at the specified index.

Parameters
arrayIndex[in] Index of the array object.
Returns
Reference to the element at the specified index.

Definition at line 1642 of file OdArray.h.

◆ at() [2/2]

template<class T , class A >
const T & OdArray< T, A >::at ( size_type  arrayIndex) const
inline

Returns the element of the array object at the specified index.

Parameters
arrayIndex[in] Index of the array object element to return.
Returns
Reference to the element at the specified index.

Definition at line 1655 of file OdArray.h.

◆ begin() [1/2]

template<class T , class A >
iterator OdArray< T, A >::begin ( )
inline

Returns an iterator that references the first element in the array object.

Definition at line 1017 of file OdArray.h.

◆ begin() [2/2]

template<class T , class A >
const_iterator OdArray< T, A >::begin ( ) const
inline

Returns a const_iterator that references the first element in the array object.

Definition at line 1029 of file OdArray.h.

◆ capacity()

template<class T , class A >
size_type OdArray< T, A >::capacity ( ) const
inline

Returns the physical length of the array object.

Remarks
The physical length is the maximum logical length of the array before it automatically grows.

Definition at line 1268 of file OdArray.h.

◆ clear()

template<class T , class A >
void OdArray< T, A >::clear ( )
inline

Removes all elements from the array object.

Definition at line 1400 of file OdArray.h.

◆ contains()

template<class T , class A >
bool OdArray< T, A >::contains ( const ConstForPtrT value,
size_type  start = 0 
) const
inline

Indicates whether the array object contains the specified value.

Parameters
value[in] Value for which to search.
start[in] Start index of the search.
Returns
The true value if the array object contains the specified value, or false otherwise.

Definition at line 1524 of file OdArray.h.

◆ create()

template<class T , class A >
static OdArray< T, A > OdArray< T, A >::create ( T *  sourceArray,
int  sourceLength 
)
inlinestatic

Definition at line 1955 of file OdArray.h.

◆ empty()

template<class T , class A >
bool OdArray< T, A >::empty ( ) const
inline

Indicates whether the array object is empty.

Returns
The true value if the array is empty, or false otherwise.

Definition at line 1257 of file OdArray.h.

◆ end() [1/2]

template<class T , class A >
iterator OdArray< T, A >::end ( )
inline

Returns an iterator that references the location after the last element in the array object.

Definition at line 1041 of file OdArray.h.

◆ end() [2/2]

template<class T , class A >
const_iterator OdArray< T, A >::end ( ) const
inline

Returns a const_iterator that references the location after the last element in the array object.

Definition at line 1053 of file OdArray.h.

◆ erase() [1/2]

template<class T , class A >
iterator OdArray< T, A >::erase ( iterator  first,
iterator  afterLast 
)
inline

Removes the specified range of elements from the array object.

Parameters
first[in] Position of the first element to be erased.
afterLast[in] Position of the first element after the last element to be erased.

Definition at line 1374 of file OdArray.h.

◆ erase() [2/2]

template<class T , class A >
iterator OdArray< T, A >::erase ( iterator  where)
inline

Removes the specified element from the array object.

Parameters
where[in] Element to remove.

Definition at line 1390 of file OdArray.h.

◆ find()

template<class T , class A >
bool OdArray< T, A >::find ( const ConstForPtrT value,
size_type findIndex,
size_type  start = 0 
) const
inline

Indicates whether the array object contains the specified value and receives the index of the found value.

Parameters
value[in] Value for which to search.
findIndex[out] Receives the index of the found value.
start[in] Start index of the search.
Returns
The true value if the array object contains the specified value, or false otherwise.

Definition at line 2178 of file OdArray.h.

◆ first() [1/2]

template<class T , class A >
T & OdArray< T, A >::first ( )
inline

Returns the first element of the array object.

Returns
Reference to the first element of the array object.

Definition at line 1696 of file OdArray.h.

◆ first() [2/2]

template<class T , class A >
const T & OdArray< T, A >::first ( ) const
inline

Definition at line 1700 of file OdArray.h.

◆ getAt()

template<class T , class A >
const T & OdArray< T, A >::getAt ( size_type  arrayIndex) const
inline

Returns the element of the array object at the specified position.

Parameters
arrayIndex[in] Index of the array object element to return.
Returns
Reference to the element at the specified position.

Definition at line 1684 of file OdArray.h.

◆ getPtr()

template<class T , class A >
const T * OdArray< T, A >::getPtr ( ) const
inline

Returns the data buffer of the array object.

Returns
Pointer to the data buffer.

Definition at line 1600 of file OdArray.h.

◆ growLength()

template<class T , class A >
int OdArray< T, A >::growLength ( ) const
inline

Returns the grow length of the array object.

Remarks
The grow length is the number of entries by that the physical length will grow as required.

Definition at line 1580 of file OdArray.h.

◆ insert() [1/4]

template<class T , class A >
iterator OdArray< T, A >::insert ( iterator  before,
const T &  value = T() 
)
inline

Inserts an element into the array object.

Parameters
value[in] Value to insert.

Definition at line 1495 of file OdArray.h.

◆ insert() [2/4]

template<class T , class A >
void OdArray< T, A >::insert ( iterator  before,
const_iterator  first,
const_iterator  afterLast 
)
inline

Inserts a range of elements into the array object.

Parameters
before[in] Position before which the first element is to be inserted.
first[in] Position of the first element to be inserted.
afterLast[in] Position of the first element after the last element to be inserted.
Remarks
The range of elements may be from another array object.

Definition at line 1101 of file OdArray.h.

◆ insert() [3/4]

template<class T , class A >
iterator OdArray< T, A >::insert ( iterator  before,
size_type  numElements,
const T &  value 
)
inline

Inserts multiple elements into the array object.

Parameters
before[in] Position where the first element is to be inserted.
numElements[in] Number of elements to insert.
value[in] Value to insert.

Definition at line 1461 of file OdArray.h.

◆ insert() [4/4]

template<class T , class A >
iterator OdArray< T, A >::insert ( iterator  before,
T &&  value 
)
inline

Inserts an element into the array object.

Parameters
value[in] Value to insert.

Definition at line 1508 of file OdArray.h.

◆ insertAt() [1/2]

template<class T , class A >
OdArray & OdArray< T, A >::insertAt ( size_type  arrayIndex,
const T &  value 
)
inline

Inserts the specified value into the array object at the specified index.

Parameters
arrayIndex[in] Index where the element should be inserted.
value[in] Value to insert.
Returns
Reference to the array object.
Remarks
0 <= arrayIndex <= length()

Elements starting at arrayIndex will have their indices incremented.

Definition at line 2069 of file OdArray.h.

◆ insertAt() [2/2]

template<class T , class A >
OdArray & OdArray< T, A >::insertAt ( size_type  index,
T &&  val 
)
inline

Inserts the specified value into this Array object at the specified index using move semantics.

Parameters
arrayIndex[in] Array index.
value[in] Value to insert.
Remarks
If the specified value supports move semantics value is moved, otherwise value is saved.

Elements starting at arrayIndex will have their indices incremented. 0 <= arrayIndex <= length()

Returns a reference to this Array object.

Definition at line 2109 of file OdArray.h.

◆ insertAtMove()

template<class T , class A >
OdArray & OdArray< T, A >::insertAtMove ( size_type  index,
T &  value 
)
inline

Inserts the specified value into this Array object at the specified index using move semantics.

Parameters
arrayIndex[in] Array index.
value[in] Value to insert.
Remarks
If the specified value supports move semantics value is moved, otherwise value is saved.

Elements starting at arrayIndex will have their indices incremented.

        0 <= arrayIndex <= length()

Returns a reference to this Array object.

Definition at line 1761 of file OdArray.h.

◆ insertMove()

template<class T , class A >
void OdArray< T, A >::insertMove ( iterator  before,
iterator  first,
iterator  afterLast 
)
inline

Inserts a range of elements into the array object.

Parameters
before[in] Position before which the first element is to be inserted.
first[in] Position of the first element to be inserted.
afterLast[in] Position of the first element after the last element to be inserted.
Remarks
The range of elements may be from another array object.

Definition at line 1144 of file OdArray.h.

◆ isEmpty()

template<class T , class A >
bool OdArray< T, A >::isEmpty ( ) const
inline

Indicates whether the array is empty.

Returns
The true value if the array is empty, or false otherwise.

Definition at line 1547 of file OdArray.h.

◆ last() [1/2]

template<class T , class A >
T & OdArray< T, A >::last ( )
inline

Returns the last element of the array object.

Returns
Reference to the last element of the array object.

Definition at line 1710 of file OdArray.h.

◆ last() [2/2]

template<class T , class A >
const T & OdArray< T, A >::last ( ) const
inline

Definition at line 1714 of file OdArray.h.

◆ length()

template<class T , class A >
size_type OdArray< T, A >::length ( ) const
inline

Returns the length of the array object.

Returns
The number of elements in the array object.

Definition at line 1537 of file OdArray.h.

◆ logicalLength()

template<class T , class A >
size_type OdArray< T, A >::logicalLength ( ) const
inline

Returns the logical length of the array object.

Remarks
The logical length is the number of entries in the array. Initially zero.

Definition at line 1558 of file OdArray.h.

◆ operator!=()

template<class T , class A >
bool OdArray< T, A >::operator!= ( const OdArray< T, A > &  array) const
inline

Definition at line 2006 of file OdArray.h.

◆ operator=() [1/2]

template<class T , class A >
OdArray & OdArray< T, A >::operator= ( const OdArray< T, A > &  source)
inline

Definition at line 1970 of file OdArray.h.

◆ operator=() [2/2]

template<class T , class A >
OdArray & OdArray< T, A >::operator= ( OdArray< T, A > &&  source)
inline

Definition at line 1980 of file OdArray.h.

◆ operator==()

template<class T , class A >
bool OdArray< T, A >::operator== ( const OdArray< T, A > &  array) const
inline

Definition at line 1989 of file OdArray.h.

◆ operator[]() [1/2]

template<class T , class A >
T & OdArray< T, A >::operator[] ( size_type  index)
inline
Remarks
For convenient access to the data.

Definition at line 1628 of file OdArray.h.

◆ operator[]() [2/2]

template<class T , class A >
const T & OdArray< T, A >::operator[] ( size_type  index) const
inline
Remarks
For convenient access to the data.

Definition at line 1619 of file OdArray.h.

◆ physicalLength()

template<class T , class A >
size_type OdArray< T, A >::physicalLength ( ) const
inline

Returns the physical length of the array object.

Remarks
The physical length is the maximum logical length of the array before it automatically grows.

Definition at line 1569 of file OdArray.h.

◆ push_back() [1/2]

template<class T , class A >
void OdArray< T, A >::push_back ( const T &  value)
inline

Appends an element to the end of the array object.

Definition at line 1411 of file OdArray.h.

◆ push_back() [2/2]

template<class T , class A >
void OdArray< T, A >::push_back ( T &&  value)
inline

Appends an element to the end of the array object.

Definition at line 1434 of file OdArray.h.

◆ rbegin() [1/2]

template<class T , class A >
std::reverse_iterator< iterator > OdArray< T, A >::rbegin ( )
inline

Returns a reverse iterator that references the last element in the array object.

Definition at line 1065 of file OdArray.h.

◆ rbegin() [2/2]

template<class T , class A >
std::reverse_iterator< const_iterator > OdArray< T, A >::rbegin ( ) const
inline

Returns a reverse const_iterator that references the last element in the array object.

Definition at line 1072 of file OdArray.h.

◆ remove()

template<class T , class A >
bool OdArray< T, A >::remove ( const T &  value,
size_type  start = 0 
)
inline

Removes the element with the specified value from the array object.

Parameters
value[in] Value for which to search.
start[in] Start index of the search.
Returns
The true value if an element is removed, or false otherwise.
Remarks
Removes the first occurance of the value starting at start.

Definition at line 2309 of file OdArray.h.

◆ removeAt()

template<class T , class A >
OdArray & OdArray< T, A >::removeAt ( size_type  arrayIndex)
inline

Removes the element at the specified index from the array object.

Parameters
arrayIndex[in] Index of the element to remove.
Returns
Reference to the array object.
Remarks
0 <= arrayIndex < length()

Elements starting at arrayIndex+1 will have their indices decremented.

Definition at line 2127 of file OdArray.h.

◆ removeFirst()

template<class T , class A >
OdArray & OdArray< T, A >::removeFirst ( )
inline

Removes the first element from the array object.

Returns
Reference to the array object.

Definition at line 1884 of file OdArray.h.

◆ removeLast()

template<class T , class A >
OdArray & OdArray< T, A >::removeLast ( )
inline

Removes the last element from the array object.

Returns
Reference to the array object.

Definition at line 1894 of file OdArray.h.

◆ removeSubArray()

template<class T , class A >
OdArray & OdArray< T, A >::removeSubArray ( size_type  startIndex,
size_type  endIndex 
)
inline

Removes the specified elements from the array object.

Parameters
startIndex[in] Start index.
endIndex[in] End index.
Returns
Reference to the array object.
Remarks
Elements from startIndex to endIndex inclusive are removed.

Definition at line 2151 of file OdArray.h.

◆ rend() [1/2]

template<class T , class A >
std::reverse_iterator< iterator > OdArray< T, A >::rend ( )
inline

Returns a reverse iterator that references the location before the first element in the array object.

Definition at line 1080 of file OdArray.h.

◆ rend() [2/2]

template<class T , class A >
std::reverse_iterator< const_iterator > OdArray< T, A >::rend ( ) const
inline

Returns a reverse const_iterator that references the location before the first element in the array object.

Definition at line 1087 of file OdArray.h.

◆ reserve()

template<class T , class A >
void OdArray< T, A >::reserve ( size_type  reserveLength)
inline

Sets the physical length of the array object to the specified reserve length if the reserve length is greater than its physical length.

Parameters
reserveLength[in] Minimum physical length.
Remarks
The physical length is the maximum logical length of the array before it automatically grows.

Definition at line 1281 of file OdArray.h.

◆ resize() [1/2]

template<class T , class A >
void OdArray< T, A >::resize ( size_type  logicalLength)
inline

Specifies the logical length for the array object.

Parameters
logicalLength[in] Logical length.
Remarks
The logical length is the number of entries in the array. Initially zero.

Definition at line 1217 of file OdArray.h.

◆ resize() [2/2]

template<class T , class A >
void OdArray< T, A >::resize ( size_type  logicalLength,
const T &  value 
)
inline

Specifies the logical length for the array object.

Parameters
logicalLength[in] Logical length.
value[in] Value for the elements that are added to obtain the new logical length.
Remarks
The logical length is the number of entries in the array. Initially zero.

Definition at line 1185 of file OdArray.h.

◆ reverse()

template<class T , class A >
OdArray & OdArray< T, A >::reverse ( )
inline

Reverses the order of the elements in the array object.

Returns
Reference to the array object.

Definition at line 2242 of file OdArray.h.

◆ setAll()

template<class T , class A >
OdArray & OdArray< T, A >::setAll ( const T &  value)
inline

Sets all the elements in the array object to the specified value.

Parameters
value[in] Value to assign.
Returns
Reference to the array object.

Definition at line 2018 of file OdArray.h.

◆ setAt()

template<class T , class A >
OdArray & OdArray< T, A >::setAt ( size_type  arrayIndex,
const T &  value 
)
inline

Sets the element of the array object at the specified index.

Parameters
arrayIndex[in] Index of the array object element to set.
value[in] Value to set.
Returns
Reference to the array object.

Definition at line 1668 of file OdArray.h.

◆ setGrowLength()

template<class T , class A >
OdArray & OdArray< T, A >::setGrowLength ( int  growLength)
inline

Sets the grow length of the array object.

Parameters
growLength[in] Grow length.
Returns
Reference to the array object.

Definition at line 1906 of file OdArray.h.

◆ setLogicalLength()

template<class T , class A >
OdArray & OdArray< T, A >::setLogicalLength ( size_type  logLength)
inline

Sets the logical length of the array object.

Parameters
logLength[in] Logical length.
Remarks
The physical length is increased as required. The logical length is the number of entries in the array. Initially zero.

Definition at line 2208 of file OdArray.h.

◆ setPhysicalLength()

template<class T , class A >
OdArray & OdArray< T, A >::setPhysicalLength ( size_type  physLength)
inline

Sets the physical length of the array object.

Parameters
physLength[in] Physical length.
Remarks
The logical length is decreased as required. The physical length is the maximum logical length of the array before it automatically grows.

Definition at line 2223 of file OdArray.h.

◆ size()

template<class T , class A >
size_type OdArray< T, A >::size ( ) const
inline

Returns the logical length of the array object.

Remarks
The logical length is the number of entries in the array. Initially zero.

Definition at line 1247 of file OdArray.h.

◆ swap() [1/2]

template<class T , class A >
void OdArray< T, A >::swap ( OdArray< T, A > &  other)
inline

Swaps buffers of the array object and another one.

Parameters
other[in,out] The other array to swap buffers with.

Definition at line 2292 of file OdArray.h.

◆ swap() [2/2]

template<class T , class A >
OdArray & OdArray< T, A >::swap ( size_type  firstIndex,
size_type  secondIndex 
)
inline

Swaps the specified elements in the array object.

Parameters
firstIndex[in] Index of first element.
secondIndex[in] Index of second element.
Returns
Reference to the array object.

Definition at line 2270 of file OdArray.h.

Friends And Related Function Documentation

◆ reallocator

template<class T , class A >
friend class reallocator
friend

Definition at line 920 of file OdArray.h.


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