CFx SDK Documentation 2024 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 = typename std::conditional< std::is_pointer< T >::value, typename std::add_const< typename std::remove_pointer< T >::type >::type *, T >::type |
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 = 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.
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 656 of file OdVector.h.
|
inline |
Default constructor for an OdVector object.
Definition at line 672 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 678 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 692 of file OdVector.h.
Destroys a vector instance.
Definition at line 703 of file OdVector.h.
|
inline |
Returns an interator to the first element after the last element in the array.
Definition at line 1451 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 1458 of file OdVector.h.
|
inline |
Appends the specified value to the end of the vector object.
value | [in] Value to append. |
Definition at line 1438 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 1472 of file OdVector.h.
|
inline |
Appends the specified value to the end of the vector object.
value | [in] Value to append. |
Definition at line 1444 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 1465 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1362 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1350 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 1229 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 1240 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 1383 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 1390 of file OdVector.h.
|
inline |
Returns an iterator referring to the first element in this vector object.
Definition at line 861 of file OdVector.h.
|
inline |
Returns an iterator referring to the first element in this vector object.
Definition at line 867 of file OdVector.h.
|
inline |
Returns the physical length of the vector object.
Definition at line 1216 of file OdVector.h.
Removes all elements from the vector object.
Definition at line 1272 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 1312 of file OdVector.h.
|
inline |
Indicates whether the vector is empty.
Definition at line 1210 of file OdVector.h.
|
inline |
Returns an iterator referring to the past-the-end element in this vector object.
Definition at line 873 of file OdVector.h.
|
inline |
Returns an iterator referring to the past-the-end element in this vector object.
Definition at line 879 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 1251 of file OdVector.h.
|
inline |
Removes the specified element from the vector object.
where | [in] Element to remove. |
Definition at line 1262 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 1514 of file OdVector.h.
|
inline |
Returns the first element of the vector object.
Definition at line 1414 of file OdVector.h.
|
inline |
Returns the first element of the vector object.
Definition at line 1420 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 1407 of file OdVector.h.
|
inline |
Returns the data buffer of the vector object.
Definition at line 1356 of file OdVector.h.
|
inline |
Returns the grow length of the vector object.
Definition at line 1344 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 1032 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 885 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 985 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 1042 of file OdVector.h.
|
inline |
Inserts the specified value into the vector object at the specified index.
index | [in] Index where the first element should be inserted. |
value | [in] Value to insert. |
Definition at line 1052 of file OdVector.h.
|
inline |
Inserts the specified value into the vector object at the specified index.
index | [in] Index where the first element should be inserted. |
value | [in] Value to insert. |
Definition at line 1084 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 935 of file OdVector.h.
|
inline |
Indicates whether the vector is empty.
Definition at line 1326 of file OdVector.h.
|
inline |
Returns the last element of the vector object.
Definition at line 1426 of file OdVector.h.
|
inline |
Returns the last element of the vector object.
Definition at line 1432 of file OdVector.h.
|
inline |
Returns the length of the vector object.
Definition at line 1320 of file OdVector.h.
|
inline |
Returns the logical length of the vector object.
Definition at line 1332 of file OdVector.h.
|
inline |
Definition at line 709 of file OdVector.h.
|
inline |
Definition at line 728 of file OdVector.h.
|
inline |
Definition at line 1490 of file OdVector.h.
|
inline |
For convenient access to the data.
Definition at line 1376 of file OdVector.h.
|
inline |
For convenient access to the data.
Definition at line 1369 of file OdVector.h.
|
inline |
Returns the physical length of the vector object.
Definition at line 1338 of file OdVector.h.
|
inline |
Appends an element to the end of the vector object.
value | [in] Value to append. |
Definition at line 1280 of file OdVector.h.
Appends an element to the end of the vector object.
value | [in] Value to append. |
Definition at line 1296 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 1154 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 1116 of file OdVector.h.
|
inline |
Removes the first element from the vector object.
Definition at line 1478 of file OdVector.h.
|
inline |
Removes the last element from the vector object.
Definition at line 1484 of file OdVector.h.
|
inline |
Removes the specified elements from the vector object.
startIndex | [in] Start element index. |
endIndex | [in] End element index. |
Definition at line 1133 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 1222 of file OdVector.h.
|
inline |
Specifies the logical length for the vector object.
logicalLength | [in] Logical length. |
Definition at line 1186 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 1166 of file OdVector.h.
Reverses the order of the elements in the vector object.
Definition at line 1570 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 1505 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 1397 of file OdVector.h.
|
inline |
Sets the grow length of the vector object.
growLength | [in] Grow length. |
Definition at line 1559 of file OdVector.h.
|
inline |
Sets the logical length of the vector object.
logicalLength | [in] Logical length. |
Definition at line 1533 of file OdVector.h.
|
inline |
Sets the physical length of the vector object.
physicalLength | [in] Physical length. |
Definition at line 1540 of file OdVector.h.
|
inline |
Returns the logical length of the vector object.
Definition at line 1204 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 1610 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 1594 of file OdVector.h.