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

#include <OdVector.h>

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

 OdVector (size_type physicalLength, int growLength=8)
 
 OdVector ()
 
 OdVector (const OdVector &vec)
 
 OdVector (OdVector &&vec)
 
 ~OdVector ()
 
OdVectoroperator= (const OdVector &vec)
 
OdVectoroperator= (OdVector &&vec)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void insert (iterator before, const_iterator first, const_iterator afterLast)
 
void insertMove (iterator before, iterator first, iterator afterLast)
 
iterator insert (iterator before, size_type numElem, const T &value)
 
iterator insert (iterator before, const T &value=T())
 
iterator insert (iterator before, T &&value=T())
 
OdVectorinsertAt (size_type index, const T &value)
 
OdVectorinsertAt (size_type index, T &&value)
 
template<class... Args>
iterator emplace (iterator before, Args &&... args)
 
template<class... Args>
OdVectoremplaceAt (size_type index, Args &&... args)
 
OdVectorremoveAt (size_type index)
 
OdVectorremoveSubArray (size_type startIndex, size_type endIndex)
 
bool remove (const T &value, size_type startIndex=0)
 
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)
 
template<class... Args>
void emplace_back (Args &&... args)
 
bool contains (const ConstForPtrT &value, size_type startIndex=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 index)
 
const T & at (size_type index) const
 
OdVectorsetAt (size_type index, const T &value)
 
const T & getAt (size_type index) const
 
T & first ()
 
const T & first () const
 
T & last ()
 
const T & last () const
 
size_type append (const T &value)
 
size_type append (T &&value)
 
iterator append ()
 
OdVectorappend (const OdVector &vec)
 
OdVectorappend (OdVector &&vec)
 
OdVectorappendMove (OdVector &vec)
 
OdVectorremoveFirst ()
 
OdVectorremoveLast ()
 
bool operator== (const OdVector &vec) const
 
OdVectorsetAll (const T &value)
 
bool find (const ConstForPtrT &value, size_type &index, size_type startIndex=0) const
 
OdVectorsetLogicalLength (size_type logicalLength)
 
OdVectorsetPhysicalLength (size_type physicalLength)
 
OdVectorsetGrowLength (int growLength)
 
OdVectorreverse ()
 
OdVectorswap (size_type firstIndex, size_type secondIndex)
 
void swap (OdVector &other)
 
template<class... Args>
VEC_ITERATOR emplace (iterator before, Args &&... args)
 
template<class... Args>
OdVector< T, A, Mm > & emplaceAt (size_type index, Args &&... args)
 

Detailed Description

template<class T, class A, class Mm>
class OdVector< T, A, Mm >

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

Remarks
Objects of the OdVector and OdArray classes are similar: elements are sequenced linearly, elements can be directly accessed, adding and deleting elements from the end is fast, and the objects can resize automatically when an element is inserted or deleted. However, OdVector objects use internal dynamic arrays that may need to be reallocated to increase in size when new elements are inserted. This does not happen every time an element is added though because an initial larger size is set to allow for growth.

A vector owns its own buffer. This means that when a class object is copied or moved, the buffer is also copied or moved.

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. It is recommended to use C++11 move semantics with OdVector to avoid unnecessary buffer copying. The OdVector class works similarly to std::vector.

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

Definitions:

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

<group Other_Classes>

Definition at line 64 of file OdVector.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 69 of file OdVector.h.

◆ const_reference

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

Definition at line 72 of file OdVector.h.

◆ ConstForPtrT

template<class T, class A, class Mm>
using OdVector< T, A, Mm >::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 74 of file OdVector.h.

◆ iterator

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

Definition at line 68 of file OdVector.h.

◆ reference

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

Definition at line 73 of file OdVector.h.

◆ size_type

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

Definition at line 67 of file OdVector.h.

◆ value_type

template<class T, class A, class Mm>
using OdVector< T, A, Mm >::value_type = T

Definition at line 71 of file OdVector.h.

Constructor & Destructor Documentation

◆ OdVector() [1/4]

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

Creates a new instance of an OdVector object.

Parameters
physicalLength[in] Initial physical length.
growLength[in] Initial grow length. The default value is 8.

Definition at line 688 of file OdVector.h.

◆ OdVector() [2/4]

template<class T, class A, class Mm>
OdVector< T, A, Mm >::OdVector ( )
inline

Default constructor for an OdVector object.

Definition at line 704 of file OdVector.h.

◆ OdVector() [3/4]

template<class T, class A, class Mm>
OdVector< T, A, Mm >::OdVector ( const OdVector< T, A, Mm > & vec)
inline

Copy constructor. Creates a vector and initializes it with parameters of the specified vector.

Parameters
vec[in] Vector object to copy.

Definition at line 710 of file OdVector.h.

◆ OdVector() [4/4]

template<class T, class A, class Mm>
OdVector< T, A, Mm >::OdVector ( OdVector< T, A, Mm > && vec)
inline

Move constructor. Creates a vector and initializes it with parameters of the specified vector, that is then cleared.

Parameters
vec[in] Vector object to move.

Definition at line 724 of file OdVector.h.

◆ ~OdVector()

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

Destroys a vector instance.

Definition at line 735 of file OdVector.h.

Member Function Documentation

◆ append() [1/5]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::append ( )
inline

Returns an interator 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 1534 of file OdVector.h.

◆ append() [2/5]

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::append ( const OdVector< T, A, Mm > & vec)
inline

Appends the specified vector object to the end of the vector object.

Parameters
vec[in] Vector to append.
Returns
Reference to the vector object.

Definition at line 1541 of file OdVector.h.

◆ append() [3/5]

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::append ( const T & value)
inline

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

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

Definition at line 1521 of file OdVector.h.

◆ append() [4/5]

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::append ( OdVector< T, A, Mm > && vec)
inline

Appends the specified vector object to the end of the vector object.

Parameters
vec[in] Vector to append.
Returns
Reference to the vector object.

Definition at line 1555 of file OdVector.h.

◆ append() [5/5]

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::append ( T && value)
inline

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

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

Definition at line 1527 of file OdVector.h.

◆ appendMove()

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::appendMove ( OdVector< T, A, Mm > & vec)
inline

Appends the specified vector object to the end of the vector object.

Parameters
vec[in] Vector to append.
Returns
Reference to the vector object.

Definition at line 1548 of file OdVector.h.

◆ asArrayPtr() [1/2]

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

Returns the data buffer of the vector object.

Returns
Pointer to the data buffer.

Definition at line 1445 of file OdVector.h.

◆ asArrayPtr() [2/2]

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

Returns the data buffer of the vector object.

Returns
Pointer to the data buffer.

Definition at line 1433 of file OdVector.h.

◆ assign()

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

Assigns the specified range of elements to the vector 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 vector object is cleared, the function assigns the specified range of elements from another vector object.

Definition at line 1291 of file OdVector.h.

◆ assignMove()

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

Assigns the specified range of elements to the vector 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 vector object is cleared, the function assigns the specified range of elements from another vector object.

Definition at line 1302 of file OdVector.h.

◆ at() [1/2]

template<class T, class A, class Mm>
T & OdVector< T, A, Mm >::at ( size_type index)
inline

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

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

Definition at line 1466 of file OdVector.h.

◆ at() [2/2]

template<class T, class A, class Mm>
const T & OdVector< T, A, Mm >::at ( size_type index) const
inline

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

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

Definition at line 1473 of file OdVector.h.

◆ begin() [1/2]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::begin ( )
inline

Returns an iterator referring to the first element in this vector object.

Definition at line 892 of file OdVector.h.

◆ begin() [2/2]

template<class T, class A, class Mm>
VEC_CONST_ITERATOR OdVector< T, A, Mm >::begin ( ) const
inline

Returns an iterator referring to the first element in this vector object.

Definition at line 898 of file OdVector.h.

◆ capacity()

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::capacity ( ) const
inline

Returns the physical length of the vector object.

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

Definition at line 1278 of file OdVector.h.

◆ clear()

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

Removes all elements from the vector object.

Definition at line 1334 of file OdVector.h.

◆ contains()

template<class T, class A, class Mm>
bool OdVector< T, A, Mm >::contains ( const ConstForPtrT & value,
size_type startIndex = 0 ) const
inline

Indicates whether the vector object contains ths specified value.

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

Definition at line 1395 of file OdVector.h.

◆ emplace() [1/2]

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

Constructs an element and places it into the vector 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.

◆ emplace() [2/2]

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

Definition at line 1140 of file OdVector.h.

◆ emplace_back()

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

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

Parameters
args[in] Constructor arguments.

Definition at line 1375 of file OdVector.h.

◆ emplaceAt() [1/2]

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

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

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

Elements starting at index will have their indices incremented.

◆ emplaceAt() [2/2]

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

Definition at line 1151 of file OdVector.h.

◆ empty()

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

Indicates whether the vector is empty.

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

Definition at line 1272 of file OdVector.h.

◆ end() [1/2]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::end ( )
inline

Returns an iterator referring to the past-the-end element in this vector object.

Definition at line 904 of file OdVector.h.

◆ end() [2/2]

template<class T, class A, class Mm>
VEC_CONST_ITERATOR OdVector< T, A, Mm >::end ( ) const
inline

Returns an iterator referring to the past-the-end element in this vector object.

Definition at line 910 of file OdVector.h.

◆ erase() [1/2]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::erase ( iterator first,
iterator afterLast )
inline

Removes a range of elements from the vector 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.

Definition at line 1313 of file OdVector.h.

◆ erase() [2/2]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::erase ( iterator where)
inline

Removes the specified element from the vector object.

Parameters
where[in] Element to remove.

Definition at line 1324 of file OdVector.h.

◆ find()

template<class T, class A, class Mm>
bool OdVector< T, A, Mm >::find ( const ConstForPtrT & value,
size_type & index,
size_type startIndex = 0 ) const
inline

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

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

Definition at line 1597 of file OdVector.h.

◆ first() [1/2]

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

Returns the first element of the vector object.

Returns
Reference to the first element of the vector.

Definition at line 1497 of file OdVector.h.

◆ first() [2/2]

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

Returns the first element of the vector object.

Returns
Reference to the first element of the vector.

Definition at line 1503 of file OdVector.h.

◆ getAt()

template<class T, class A, class Mm>
const T & OdVector< T, A, Mm >::getAt ( size_type index) const
inline

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

Parameters
arrayIndex[in] Index of the vector element for which to return the value.
Returns
Reference to the specified element.

Definition at line 1490 of file OdVector.h.

◆ getPtr()

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

Returns the data buffer of the vector object.

Returns
Pointer to the data buffer.

Definition at line 1439 of file OdVector.h.

◆ growLength()

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

Returns the grow length of the vector object.

Returns
The number of entries by which the physical length will grow as required.

Definition at line 1427 of file OdVector.h.

◆ insert() [1/4]

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

Inserts an element into the vector object.

Parameters
before[in] Position after which the first element should be inserted.
value[in] Value to insert.

Definition at line 1055 of file OdVector.h.

◆ insert() [2/4]

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

Inserts a range of elements into the vector object.

Parameters
before[in] Position after which the first element should 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 vector object.

Definition at line 916 of file OdVector.h.

◆ insert() [3/4]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::insert ( iterator before,
size_type numElem,
const T & value )
inline

Inserts an element into the vector object.

Parameters
before[in] Position after which the first element should be inserted.
numElem[in] Number of elements to insert.
value[in] Value to insert.

Definition at line 1008 of file OdVector.h.

◆ insert() [4/4]

template<class T, class A, class Mm>
VEC_ITERATOR OdVector< T, A, Mm >::insert ( iterator before,
T && value = T() )
inline

Inserts an element into the vector object.

Parameters
before[in] Position after which the first element should be inserted.
value[in] Value to insert.

Definition at line 1065 of file OdVector.h.

◆ insertAt() [1/2]

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

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

Parameters
index[in] Index where the element should be inserted.
value[in] Value to insert.
Returns
Reference to the vector object.
Remarks
0 <= index <= length() Elements starting at the index will have their indices incremented.

Definition at line 1075 of file OdVector.h.

◆ insertAt() [2/2]

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

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

Parameters
index[in] Index where the element should be inserted.
value[in] Value to insert.
Returns
Reference to the vector object.
Remarks
0 <= index <= length() Elements starting at the index will have their indices incremented.

Definition at line 1107 of file OdVector.h.

◆ insertMove()

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

Inserts a range of elements into the vector object.

Parameters
before[in] Position after which the first element should 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 vector object.

Definition at line 962 of file OdVector.h.

◆ isEmpty()

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

Indicates whether the vector is empty.

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

Definition at line 1409 of file OdVector.h.

◆ last() [1/2]

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

Returns the last element of the vector object.

Returns
Reference to the last element of the vector.

Definition at line 1509 of file OdVector.h.

◆ last() [2/2]

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

Returns the last element of the vector object.

Returns
Reference to the last element of the vector.

Definition at line 1515 of file OdVector.h.

◆ length()

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::length ( ) const
inline

Returns the length of the vector object.

Returns
The number of elements in the vector object.

Definition at line 1403 of file OdVector.h.

◆ logicalLength()

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::logicalLength ( ) const
inline

Returns the logical length of the vector object.

Returns
The number of entries in the vector object.

Definition at line 1415 of file OdVector.h.

◆ operator=() [1/2]

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::operator= ( const OdVector< T, A, Mm > & vec)
inline

Definition at line 741 of file OdVector.h.

◆ operator=() [2/2]

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::operator= ( OdVector< T, A, Mm > && vec)
inline

Definition at line 760 of file OdVector.h.

◆ operator==()

template<class T, class A, class Mm>
bool OdVector< T, A, Mm >::operator== ( const OdVector< T, A, Mm > & vec) const
inline

Definition at line 1573 of file OdVector.h.

◆ operator[]() [1/2]

template<class T, class A, class Mm>
T & OdVector< T, A, Mm >::operator[] ( size_type index)
inline

For convenient access to the data.

Definition at line 1459 of file OdVector.h.

◆ operator[]() [2/2]

template<class T, class A, class Mm>
const T & OdVector< T, A, Mm >::operator[] ( size_type index) const
inline

For convenient access to the data.

Definition at line 1452 of file OdVector.h.

◆ physicalLength()

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::physicalLength ( ) const
inline

Returns the physical length of the vector object.

Returns
The maximum logical length of the vector before it automatically grows.

Definition at line 1421 of file OdVector.h.

◆ push_back() [1/2]

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

Appends an element to the end of the vector object.

Parameters
value[in] Value to append.

Definition at line 1342 of file OdVector.h.

◆ push_back() [2/2]

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

Appends an element to the end of the vector object.

Parameters
value[in] Value to append.

Definition at line 1358 of file OdVector.h.

◆ remove()

template<class T, class A, class Mm>
bool OdVector< T, A, Mm >::remove ( const T & value,
size_type startIndex = 0 )
inline

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

Parameters
value[in] Value for which to search.
startIndex[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 startIndex.

Definition at line 1217 of file OdVector.h.

◆ removeAt()

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::removeAt ( size_type index)
inline

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

Parameters
index[in] Index of the element to remove.
Returns
Reference to the vector object.
Remarks
0 <= index < length() Elements starting at index+1 will have their indices decremented.

Definition at line 1179 of file OdVector.h.

◆ removeFirst()

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

Removes the first element from the vector object.

Definition at line 1561 of file OdVector.h.

◆ removeLast()

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

Removes the last element from the vector object.

Definition at line 1567 of file OdVector.h.

◆ removeSubArray()

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

Removes the specified elements from the vector object.

Parameters
startIndex[in] Index of the first element to remove.
endIndex[in] Index after the last element to remove.
Returns
Reference to the vector object.
Remarks
Elements from the range [startIndex, endIndex) are removed.

Definition at line 1196 of file OdVector.h.

◆ reserve()

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

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

Parameters
reserveLength[in] Minimum physical length.

Definition at line 1284 of file OdVector.h.

◆ resize() [1/2]

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

Specifies the logical length for the vector object.

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

Definition at line 1249 of file OdVector.h.

◆ resize() [2/2]

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

Specifies the logical length for the vector 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 1229 of file OdVector.h.

◆ reverse()

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

Reverses the order of the elements in the vector object.

Returns
Reference to the vector object.

Definition at line 1653 of file OdVector.h.

◆ setAll()

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

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

Parameters
value[in] Value to set.
Returns
Reference to the vector object.

Definition at line 1588 of file OdVector.h.

◆ setAt()

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::setAt ( size_type index,
const T & value )
inline

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

Parameters
arrayIndex[in] Index of the vector element for which to set the value.
value[in] Value of the element to set.
Returns
Reference to the vector.

Definition at line 1480 of file OdVector.h.

◆ setGrowLength()

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

Sets the grow length of the vector object.

Parameters
growLength[in] Grow length.
Returns
Reference to the vector object.
Remarks
The grow length is the number of entries by which the physical length will grow as required.

Definition at line 1642 of file OdVector.h.

◆ setLogicalLength()

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::setLogicalLength ( size_type logicalLength)
inline

Sets the logical length of the vector object.

Parameters
logicalLength[in] Logical length.
Returns
Reference to the vector object.
Remarks
The physical length is increased as required. The logical length is the number of entries in the vector. Initially zero.

Definition at line 1616 of file OdVector.h.

◆ setPhysicalLength()

template<class T, class A, class Mm>
OdVector< T, A, Mm > & OdVector< T, A, Mm >::setPhysicalLength ( size_type physicalLength)
inline

Sets the physical length of the vector object.

Parameters
physicalLength[in] Physical length.
Returns
Reference to the vector object.
Remarks
The logical length is decreased as required. The physical length is the maximum logical length of the vector before it automatically grows.

Definition at line 1623 of file OdVector.h.

◆ size()

template<class T, class A, class Mm>
VEC_SIZE_TYPE OdVector< T, A, Mm >::size ( ) const
inline

Returns the logical length of the vector object.

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

Definition at line 1266 of file OdVector.h.

◆ swap() [1/2]

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

Swaps buffers of the vector object and another one.

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

Definition at line 1693 of file OdVector.h.

◆ swap() [2/2]

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

Swaps the specified elements in the vector object.

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

Definition at line 1677 of file OdVector.h.


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