CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
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 = typename std::conditional< std::is_pointer< T >::value, typename std::add_const< typename std::remove_pointer< T >::type >::type *, T >::type
 

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)
 
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)
 
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)
 

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 = typename std::conditional<std::is_pointer<T>::value, typename std::add_const<typename std::remove_pointer<T>::type>::type*, T>::type

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 656 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 672 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 678 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 692 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 703 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 1451 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 1458 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 1438 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 1472 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 1444 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 1465 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 1362 of file OdVector.h.

◆ asArrayPtr() [2/2]

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

Returns the data buffer of the vector object.

Returns
Pointer to the data buffer.

Definition at line 1350 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 1229 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 1240 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 1383 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 1390 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 861 of file OdVector.h.

◆ begin() [2/2]

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

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

Definition at line 867 of file OdVector.h.

◆ capacity()

template<class T , class A , class Mm >
VEC_SIZE_TYPE OdVector< T, A, Mm >::capacity
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 1216 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 1272 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 1312 of file OdVector.h.

◆ empty()

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

Indicates whether the vector is empty.

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

Definition at line 1210 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 873 of file OdVector.h.

◆ end() [2/2]

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

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

Definition at line 879 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 1251 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 1262 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 1514 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 1414 of file OdVector.h.

◆ first() [2/2]

template<class T , class A , class Mm >
const 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 1420 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 1407 of file OdVector.h.

◆ getPtr()

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

Returns the data buffer of the vector object.

Returns
Pointer to the data buffer.

Definition at line 1356 of file OdVector.h.

◆ growLength()

template<class T , class A , class Mm >
int OdVector< T, A, Mm >::growLength
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 1344 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 1032 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 885 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 985 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 1042 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 first 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 1052 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 first 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 1084 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 935 of file OdVector.h.

◆ isEmpty()

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

Indicates whether the vector is empty.

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

Definition at line 1326 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 1426 of file OdVector.h.

◆ last() [2/2]

template<class T , class A , class Mm >
const 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 1432 of file OdVector.h.

◆ length()

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

Returns the length of the vector object.

Returns
The number of elements in the vector object.

Definition at line 1320 of file OdVector.h.

◆ logicalLength()

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

Returns the logical length of the vector object.

Returns
The number of entries in the vector object.

Definition at line 1332 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 709 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 728 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 1490 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 1376 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 1369 of file OdVector.h.

◆ physicalLength()

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

Returns the physical length of the vector object.

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

Definition at line 1338 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 1280 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 1296 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 1154 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 1116 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 1478 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 1484 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] Start element index.
endIndex[in] End element index.
Returns
Reference to the vector object.
Remarks
Elements from startIndex to endIndex inclusive are removed.

Definition at line 1133 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 1222 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 1186 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 1166 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 1570 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 1505 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 1397 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 1559 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 1533 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 1540 of file OdVector.h.

◆ size()

template<class T , class A , class Mm >
VEC_SIZE_TYPE OdVector< T, A, Mm >::size
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 1204 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 1610 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 1594 of file OdVector.h.


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