This template class implements dynamic array objects within the ODA Platform.
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:
File: OdArray.h
Module: API Reference
TD_Db
This is the overview for the append method overload. | |
Appends the specified values to the end of this Array object. | |
This is the overview for the appendMove method overload. | |
Appends the specified value to the end of this Array object n times. | |
This is the overview for the asArrayPtr method overload. | |
Assigns the specified range of elements to the array object. | |
Assigns the specified range of elements to the array object. | |
This is the overview for the at method overload. | |
This is the overview for the begin method overload. | |
Returns the physical length of the array object. | |
Removes all elements from the array object. | |
Indicates whether the array object contains the specified value. | |
| |
Indicates whether the array object is empty. | |
This is the overview for the end method overload. | |
This is the overview for the erase method overload. | |
Indicates whether the array object contains the specified value and receives the index of the found value. | |
This is the overview for the first method overload. | |
Returns the element of the array object at the specified position. | |
Returns the data buffer of the array object. | |
Returns the grow length of the array object. | |
This is the overview for the insert method overload. | |
This is the overview for the insertAt method overload. | |
Inserts the specified value into this Array object at the specified index using move semantics. | |
Inserts a range of elements into the array object. | |
Indicates whether the array is empty. | |
This is the overview for the last method overload. | |
Returns the length of the array object. | |
Returns the logical length of the array object. | |
Returns the physical length of the array object. | |
This is the overview for the push_back method overload. | |
This is the overview for the rbegin method overload. | |
Removes the element with the specified value from the array object. | |
Removes the element at the specified index from the array object. | |
Removes the first element from the array object. | |
Removes the last element from the array object. | |
Removes the specified elements from the array object. | |
This is the overview for the rend method overload. | |
Sets the physical length of the array object to the specified reserve length if the reserve length is greater than its physical length. | |
This is the overview for the resize method overload. | |
Reverses the order of the elements in the array object. | |
Sets all the elements in the array object to the specified value. | |
Sets the element of the array object at the specified index. | |
Sets the grow length of the array object. | |
Sets the logical length of the array object. | |
Sets the physical length of the array object. | |
Returns the logical length of the array object. | |
This is the overview for the swap method overload. |
| |
This is the overview for the = operator overload. | |
| |
This is the overview for the [] operator overload. |
Copyright © 2002-2022. Open Design Alliance All rights reserved.
|