|
CFx SDK Documentation 2026 SP0
|
#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 |
This template class implements dynamic vector objects within the ODA Platform.
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:
<group Other_Classes>
Definition at line 64 of file OdVector.h.
| using OdVector< T, A, Mm >::const_iterator = const T* |
Definition at line 69 of file OdVector.h.
| using OdVector< T, A, Mm >::const_reference = const T& |
Definition at line 72 of file OdVector.h.
| using OdVector< T, A, Mm >::ConstForPtrT |
Definition at line 74 of file OdVector.h.
| using OdVector< T, A, Mm >::iterator = T* |
Definition at line 68 of file OdVector.h.
| using OdVector< T, A, Mm >::reference = T& |
Definition at line 73 of file OdVector.h.
| using OdVector< T, A, Mm >::size_type = typename A::size_type |
Definition at line 67 of file OdVector.h.
| using OdVector< T, A, Mm >::value_type = T |
Definition at line 71 of file OdVector.h.
|
inlineexplicit |
Creates a new instance of an OdVector object.
| physicalLength | [in] Initial physical length. |
| growLength | [in] Initial grow length. The default value is 8. |
Definition at line 688 of file OdVector.h.
|
inline |
Default constructor for an OdVector object.
Definition at line 704 of file OdVector.h.
|
inline |
Copy constructor. Creates a vector and initializes it with parameters of the specified vector.
| vec | [in] Vector object to copy. |
Definition at line 710 of file OdVector.h.
|
inline |
Move constructor. Creates a vector and initializes it with parameters of the specified vector, that is then cleared.
| vec | [in] Vector object to move. |
Definition at line 724 of file OdVector.h.
Destroys a vector instance.
Definition at line 735 of file OdVector.h.
|
inline |
Returns an interator to the first element after the last element in the array.
Definition at line 1534 of file OdVector.h.
|
inline |
Appends the specified vector object to the end of the vector object.
| vec | [in] Vector to append. |
Definition at line 1541 of file OdVector.h.
|
inline |
Appends the specified value to the end of the vector object.
| value | [in] Value to append. |
Definition at line 1521 of file OdVector.h.
|
inline |
Appends the specified vector object to the end of the vector object.
| vec | [in] Vector to append. |
Definition at line 1555 of file OdVector.h.
|
inline |
Appends the specified value to the end of the vector object.
| value | [in] Value to append. |
Definition at line 1527 of file OdVector.h.
|
inline |
Appends the specified vector object to the end of the vector object.
| vec | [in] Vector to append. |
Definition at line 1548 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1445 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1433 of file OdVector.h.
|
inline |
Assigns the specified range of elements to the vector object.
| 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 1291 of file OdVector.h.
|
inline |
Assigns the specified range of elements to the vector object.
| 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 1302 of file OdVector.h.
Returns the element of the vector object at the specified index.
| arrayIndex | [in] Index of the vector element. |
Definition at line 1466 of file OdVector.h.
|
inline |
Returns the element of the vector object at the specified index.
| arrayIndex | [in] Index of the vector element. |
Definition at line 1473 of file OdVector.h.
|
inline |
Returns an iterator referring to the first element in this vector object.
Definition at line 892 of file OdVector.h.
|
inline |
Returns an iterator referring to the first element in this vector object.
Definition at line 898 of file OdVector.h.
|
inline |
Returns the physical length of the vector object.
Definition at line 1278 of file OdVector.h.
Removes all elements from the vector object.
Definition at line 1334 of file OdVector.h.
|
inline |
Indicates whether the vector object contains ths specified value.
| value | [in] Value for which to search. |
| startIndex | [in] Start index of the search. |
Definition at line 1395 of file OdVector.h.
| iterator OdVector< T, A, Mm >::emplace | ( | iterator | before, |
| Args &&... | args ) |
Constructs an element and places it into the vector object at the specified position.
| before | [in] Position where the element is to be inserted. |
| args | [in] Constructor arguments. |
|
inline |
Definition at line 1140 of file OdVector.h.
|
inline |
Constructs an element and places it to the end of the vector object.
| args | [in] Constructor arguments. |
Definition at line 1375 of file OdVector.h.
| 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.
| index | [in] Index where the element should be inserted. |
| args | [in] Constructor arguments. |
Elements starting at index will have their indices incremented.
|
inline |
Definition at line 1151 of file OdVector.h.
|
inline |
Indicates whether the vector is empty.
Definition at line 1272 of file OdVector.h.
|
inline |
Returns an iterator referring to the past-the-end element in this vector object.
Definition at line 904 of file OdVector.h.
|
inline |
Returns an iterator referring to the past-the-end element in this vector object.
Definition at line 910 of file OdVector.h.
|
inline |
Removes a range of elements from the vector object.
| 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.
|
inline |
Removes the specified element from the vector object.
| where | [in] Element to remove. |
Definition at line 1324 of file OdVector.h.
|
inline |
Indicates whether the vector object contains the specified value and receives the index of the found value.
| value | [in] Value to search for. |
| index | [out] Receives the index of the found value. |
| startIndex | [in] Start index of the search. |
Definition at line 1597 of file OdVector.h.
|
inline |
Returns the first element of the vector object.
Definition at line 1497 of file OdVector.h.
|
inline |
Returns the first element of the vector object.
Definition at line 1503 of file OdVector.h.
|
inline |
Returns the element of the vector object at the specified position.
| arrayIndex | [in] Index of the vector element for which to return the value. |
Definition at line 1490 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1439 of file OdVector.h.
|
inline |
Returns the grow length of the vector object.
Definition at line 1427 of file OdVector.h.
|
inline |
Inserts an element into the vector object.
| before | [in] Position after which the first element should be inserted. |
| value | [in] Value to insert. |
Definition at line 1055 of file OdVector.h.
|
inline |
Inserts a range of elements into the vector object.
| 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. |
Definition at line 916 of file OdVector.h.
|
inline |
Inserts an element into the vector object.
| 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.
|
inline |
Inserts an element into the vector object.
| before | [in] Position after which the first element should be inserted. |
| value | [in] Value to insert. |
Definition at line 1065 of file OdVector.h.
|
inline |
Inserts the specified value into the vector object at the specified index.
| index | [in] Index where the element should be inserted. |
| value | [in] Value to insert. |
Definition at line 1075 of file OdVector.h.
|
inline |
Inserts the specified value into the vector object at the specified index.
| index | [in] Index where the element should be inserted. |
| value | [in] Value to insert. |
Definition at line 1107 of file OdVector.h.
|
inline |
Inserts a range of elements into the vector object.
| 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. |
Definition at line 962 of file OdVector.h.
|
inline |
Indicates whether the vector is empty.
Definition at line 1409 of file OdVector.h.
|
inline |
Returns the last element of the vector object.
Definition at line 1509 of file OdVector.h.
|
inline |
Returns the last element of the vector object.
Definition at line 1515 of file OdVector.h.
|
inline |
Returns the length of the vector object.
Definition at line 1403 of file OdVector.h.
|
inline |
Returns the logical length of the vector object.
Definition at line 1415 of file OdVector.h.
|
inline |
Definition at line 741 of file OdVector.h.
|
inline |
Definition at line 760 of file OdVector.h.
|
inline |
Definition at line 1573 of file OdVector.h.
For convenient access to the data.
Definition at line 1459 of file OdVector.h.
|
inline |
For convenient access to the data.
Definition at line 1452 of file OdVector.h.
|
inline |
Returns the physical length of the vector object.
Definition at line 1421 of file OdVector.h.
Appends an element to the end of the vector object.
| value | [in] Value to append. |
Definition at line 1342 of file OdVector.h.
Appends an element to the end of the vector object.
| value | [in] Value to append. |
Definition at line 1358 of file OdVector.h.
|
inline |
Removes the element with the specified value from the vector object.
| value | [in] Value for which to search. |
| startIndex | [in] Start index of the search. |
Definition at line 1217 of file OdVector.h.
|
inline |
Removes the element at the specified index from the vector object.
| index | [in] Index of the element to remove. |
Definition at line 1179 of file OdVector.h.
|
inline |
Removes the first element from the vector object.
Definition at line 1561 of file OdVector.h.
|
inline |
Removes the last element from the vector object.
Definition at line 1567 of file OdVector.h.
|
inline |
Removes the specified elements from the vector object.
| startIndex | [in] Index of the first element to remove. |
| endIndex | [in] Index after the last element to remove. |
Definition at line 1196 of file OdVector.h.
|
inline |
Sets the physical length of the vector object to the specified reserve length if the reserve length is greater than its physical length.
| reserveLength | [in] Minimum physical length. |
Definition at line 1284 of file OdVector.h.
|
inline |
Specifies the logical length for the vector object.
| logicalLength | [in] Logical length. |
Definition at line 1249 of file OdVector.h.
|
inline |
Specifies the logical length for the vector object.
| logicalLength | [in] Logical length. |
| value | [in] Value for the elements that are added to obtain the new logical length. |
Definition at line 1229 of file OdVector.h.
|
inline |
Reverses the order of the elements in the vector object.
Definition at line 1653 of file OdVector.h.
|
inline |
Sets all the elements in the vector object to the specified value.
| value | [in] Value to set. |
Definition at line 1588 of file OdVector.h.
|
inline |
Sets the element of the vector object at the specified index.
| arrayIndex | [in] Index of the vector element for which to set the value. |
| value | [in] Value of the element to set. |
Definition at line 1480 of file OdVector.h.
|
inline |
Sets the grow length of the vector object.
| growLength | [in] Grow length. |
Definition at line 1642 of file OdVector.h.
|
inline |
Sets the logical length of the vector object.
| logicalLength | [in] Logical length. |
Definition at line 1616 of file OdVector.h.
|
inline |
Sets the physical length of the vector object.
| physicalLength | [in] Physical length. |
Definition at line 1623 of file OdVector.h.
|
inline |
Returns the logical length of the vector object.
Definition at line 1266 of file OdVector.h.
|
inline |
Swaps buffers of the vector object and another one.
| other | [in,out] The other vector to swap buffers with. |
Definition at line 1693 of file OdVector.h.
|
inline |
Swaps the specified elements in the vector object.
| firstIndex | [in] Index of the first element. |
| secondIndex | [in] Index of the second element. |
Definition at line 1677 of file OdVector.h.