Open CASCADE Technology 7.8.0
|
Class NCollection_DynamicArray (dynamic array of objects) More...
#include <NCollection_DynamicArray.hxx>
Public Types | |
typedef NCollection_OccAllocator< TheItemType > | allocator_type |
Memory allocation. | |
typedef NCollection_BasePointerVector | vector |
using | value_type = TheItemType |
using | size_type = size_t |
using | difference_type = size_t |
using | pointer = TheItemType * |
using | const_pointer = TheItemType & |
using | reference = TheItemType & |
using | const_reference = const TheItemType & |
using | iterator = NCollection_IndexedIterator< std::random_access_iterator_tag, NCollection_DynamicArray, value_type, false > |
using | const_iterator = NCollection_IndexedIterator< std::random_access_iterator_tag, NCollection_DynamicArray, value_type, true > |
using | Iterator = NCollection_Iterator< NCollection_DynamicArray< TheItemType > > |
Public Member Functions | |
const_iterator | begin () const |
iterator | begin () |
const_iterator | cbegin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cend () const |
Class NCollection_DynamicArray (dynamic array of objects)
The array's indices always start at 0.
The Vector is always created with 0 length. It can be enlarged by two means:
The methods Append and SetValue return a non-const reference to the copied object inside the vector. This reference is guaranteed to be valid until the vector is destroyed. It can be used to access the vector member directly or to pass its address to other data structures.
The vector iterator remembers the length of the vector at the moment of the creation or initialisation of the iterator. Therefore the iteration begins at index 0 and stops at the index equal to (remembered_length-1). It is OK to enlarge the vector during the iteration.
typedef NCollection_OccAllocator<TheItemType> NCollection_DynamicArray< TheItemType >::allocator_type |
Memory allocation.
using NCollection_DynamicArray< TheItemType >::const_iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_DynamicArray, value_type, true> |
using NCollection_DynamicArray< TheItemType >::const_pointer = TheItemType& |
using NCollection_DynamicArray< TheItemType >::const_reference = const TheItemType& |
using NCollection_DynamicArray< TheItemType >::difference_type = size_t |
using NCollection_DynamicArray< TheItemType >::iterator = NCollection_IndexedIterator<std::random_access_iterator_tag, NCollection_DynamicArray, value_type, false> |
using NCollection_DynamicArray< TheItemType >::Iterator = NCollection_Iterator<NCollection_DynamicArray<TheItemType> > |
using NCollection_DynamicArray< TheItemType >::pointer = TheItemType* |
using NCollection_DynamicArray< TheItemType >::reference = TheItemType& |
using NCollection_DynamicArray< TheItemType >::size_type = size_t |
using NCollection_DynamicArray< TheItemType >::value_type = TheItemType |
typedef NCollection_BasePointerVector NCollection_DynamicArray< TheItemType >::vector |
|
inline |
Copy constructor.
|
inlineexplicit |
Copy constructor.
|
inlineexplicit |
Copy constructor.
|
inline |
Copy constructor.
|
inlinenoexcept |
Copy constructor.
|
inline |
Copy constructor.
|
inline |
Append.
|
inline |
Append.
|
inline |
Appends an empty value and returns the reference to it.
|
inline |
Assignment to the collection of the same type.
|
inline |
Copy constructor.
|
inlineprotected |
Copy constructor.
|
inlineprotected |
Copy constructor.
|
inlineprotected |
Copy constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Copy constructor.
|
inline |
Copy constructor.
|
inlineprotected |
Copy constructor.
|
inline |
|
inline |
|
inline |
Copy constructor.
|
inlineprotected |
Copy constructor.
|
inline |
|
inlineprotected |
Wrapper to extract array.
|
inline |
Empty query.
|
inline |
|
inline |
Total number of items.
|
inline |
Method for consistency with other collections.
|
inline |
Operator() - query the value.
|
inline |
Operator() - query the const value.
|
inline |
Assignment operator.
|
inline |
Assignment operator.
|
inline |
Operator[] - query the value.
|
inline |
Operator[] - query the const value.
|
inline |
Operator[] - query the value.
|
inline |
Operator[] - query the const value.
|
inline |
Copy constructor.
|
inline |
SetValue () - set or append a value.
|
inline |
SetValue () - set or append a value.
|
inline |
Total number of items in the vector.
|
inline |
Method for consistency with other collections.
|
inline |
Copy constructor.
friend NCollection_DynamicArray< TheItemType >::const_iterator |
Copy constructor.
friend NCollection_DynamicArray< TheItemType >::iterator |
Copy constructor.
|
protected |
Copy constructor.
|
protected |
Copy constructor.
|
protected |
Copy constructor.
|
protected |
Copy constructor.