CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdArray< T, A > Class Template Reference

#include <OdArray.h>

Inheritance diagram for OdArray< T, A >:
size_type< TVal, TAlloc > 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
 

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 (std::initializer_list< T > l)
 
template<typename Iter, typename std::enable_if< std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value, bool >::type = true>
 OdArray (Iter begin, Iter end)
 
template<typename Iter, typename std::enable_if< std::is_base_of< std::input_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value &&!std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value, bool >::type = true>
 OdArray (Iter begin, Iter end)
 
 ~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 index, const T &value)
 
OdArrayinsertAt (size_type index, T &&val)
 
template<class... Args>
void emplace_back (Args &&... args)
 
template<class... Args>
OdArrayemplaceAt (size_type index, Args &&... args)
 
template<class... Args>
iterator emplace (iterator before, Args &&... args)
 
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 (const 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 834 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 839 of file OdArray.h.

◆ const_reference

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

Definition at line 841 of file OdArray.h.

◆ ConstForPtrT

template<class T, class A>
using OdArray< T, A >::ConstForPtrT
Initial value:
typename std::conditional<std::is_pointer<T>::value,
typename std::add_const<typename std::remove_pointer<T>::type>::type*, T>::type
GLuint GLsizei GLsizei GLint GLenum * type
Definition gles2_ext.h:274

Definition at line 843 of file OdArray.h.

◆ iterator

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

Definition at line 838 of file OdArray.h.

◆ reference

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

Definition at line 842 of file OdArray.h.

◆ size_type

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

Definition at line 837 of file OdArray.h.

◆ value_type

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

Definition at line 840 of file OdArray.h.

Constructor & Destructor Documentation

◆ OdArray() [1/7]

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 1941 of file OdArray.h.

◆ OdArray() [2/7]

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

Definition at line 1952 of file OdArray.h.

◆ OdArray() [3/7]

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

Definition at line 1957 of file OdArray.h.

◆ OdArray() [4/7]

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

Definition at line 1963 of file OdArray.h.

◆ OdArray() [5/7]

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

This constructor allows initialization from an initializer list. For example OdArray<int> a{ 1, 2, 3, 4 };

Definition at line 1973 of file OdArray.h.

◆ OdArray() [6/7]

template<class T, class A>
template<typename Iter, typename std::enable_if< std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value, bool >::type = true>
OdArray< T, A >::OdArray ( Iter begin,
Iter end )
inline

This constructor allows initialization from a range of forward iterators (providing multipass guarantee).

Parameters
begin[in] Range start.
end[in] Range end.

Definition at line 1988 of file OdArray.h.

◆ OdArray() [7/7]

template<class T, class A>
template<typename Iter, typename std::enable_if< std::is_base_of< std::input_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value &&!std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value, bool >::type = true>
OdArray< T, A >::OdArray ( Iter begin,
Iter end )
inline

This constructor allows initialization from a range of generic input iterators (no multipass guarantee). For example: OdDbObjectIdArray a{ modelspace->ids().begin(), modelspace->ids().end() }; // here modelspace is a pointer to OdDbBlockTableRecord.

Parameters
begin[in] Range start.
end[in] Range end.

Definition at line 2003 of file OdArray.h.

◆ ~OdArray()

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

Destroys an array instance.

Definition at line 2056 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 1887 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 2131 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 1747 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 2145 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 1762 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 1865 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 1824 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 1812 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 1840 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 1632 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 1612 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 1306 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 1345 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 1664 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 1677 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 1024 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 1036 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 1275 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 1407 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 1546 of file OdArray.h.

◆ create()

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

Creates an array from the specified array.

Parameters
sourceArray[in] Array to create from.
sourceLength[in] Length of the source array.
Returns
Created array.

Definition at line 2046 of file OdArray.h.

◆ emplace()

template<class T, class A>
template<class... Args>
iterator OdArray< T, A >::emplace ( iterator before,
Args &&... args )
inline

Constructs an element and places it into the array object at the specified position.

Parameters
before[in] Position where the element is to be inserted.
args[in] Constructor arguments.
Returns
Iterator pointing to the inserted element.

Definition at line 2258 of file OdArray.h.

◆ emplace_back()

template<class T, class A>
template<class... Args>
void OdArray< T, A >::emplace_back ( Args &&... args)
inline

Constructs an element and places it to the end of the array object.

Parameters
args[in] Constructor arguments.

Definition at line 2209 of file OdArray.h.

◆ emplaceAt()

template<class T, class A>
template<class... Args>
OdArray & OdArray< T, A >::emplaceAt ( size_type index,
Args &&... args )
inline

Constructs an element and places it into the array object at the specified index.

Parameters
index[in] Index where the element should be inserted.
args[in] Constructor arguments.
Returns
Reference to the array object.
Remarks
0 <= index <= length()

Elements starting at index will have their indices incremented.

Definition at line 2230 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 1264 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 1048 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 1060 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 1381 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 1397 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 2328 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 1718 of file OdArray.h.

◆ first() [2/2]

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

Definition at line 1722 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 1706 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 1622 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 1602 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 at the specified position.

Parameters
before[in] Position where the element is to be inserted.
value[in] Value to insert.
Returns
Iterator pointing to the inserted element.

Definition at line 1515 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 1108 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.
Returns
Iterator pointing to the first inserted element.

Definition at line 1479 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 at the specified position using move semantics.

Parameters
before[in] Position where the element is to be inserted.
value[in] Value to insert.
Returns
Iterator pointing to the inserted element.

Definition at line 1530 of file OdArray.h.

◆ insertAt() [1/2]

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

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

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

Elements starting at index will have their indices incremented.

Definition at line 2163 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
index[in] Index where the element should be inserted.
value[in] Value to insert.
Returns
Reference to the array object.
Remarks
0 <= index <= length()

Elements starting at index will have their indices incremented.

Definition at line 2195 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 1783 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 1151 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 1569 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 1732 of file OdArray.h.

◆ last() [2/2]

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

Definition at line 1736 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 1559 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 1580 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 2100 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 2061 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 2071 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 2083 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 1650 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 1641 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 1591 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.

Parameters
value[in] Value to append.

Definition at line 1422 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.

Parameters
value[in] Value to append.

Definition at line 1449 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 1072 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 1079 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 occurence of the value starting at start.

Definition at line 2459 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 2277 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 1898 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 1908 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] Index of the first element to remove.
endIndex[in] Index after the last element to remove.
Returns
Reference to the array object.
Remarks
Elements from the range [startIndex, endIndex) are removed.

Definition at line 2301 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 1087 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 1094 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 1288 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 1224 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 1192 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 2392 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 2112 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 1690 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 1920 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 2358 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 2373 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 1254 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 2442 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 2420 of file OdArray.h.

Friends And Related Symbol Documentation

◆ reallocator

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

Definition at line 927 of file OdArray.h.


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