This space‐efficient, value‐semantic array class represents a sequence of TYPE elements. The interface provides functionality similar to a vector<TYPE>, however, modifiable references to individual elements are not provided. This class provides accessors that return iterators that provide non‐modifiable access to its elements. The returned iterators, unlike those returned by a vector<TYPE>, are not invalidated upon reallocation.
Synopsis
Declared in <bdlc_compactedarray.h>
template<class TYPE>
class CompactedArray;
Type Aliases
Name |
Description |
Const iterator over elements of this array. |
|
Element type stored by this array. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object |
Assign to this array the value of the specified |
|
Return the allocator used by this array to supply memory. |
|
|
|
Return a |
|
Return an iterator referring to the first element in this array, or the past‐the‐end iterator if this array is empty. The iterator remains valid as long as this array exists. |
|
Return the number of elements this array can hold, without reallocation, assuming the number of unique elements within this array does not increase. |
|
Return the past‐the‐end iterator for this array. The iterator remains valid as long as this array exists, and its length does not decrease. |
|
Return a |
|
|
|
Return |
|
Return |
|
Return the number of elements in this array. |
|
Return a |
|
Remove the last element from this array. The behavior is undefined unless |
|
Write the value of this array to the specified output |
|
Append to this array an element having the specified |
|
|
|
Remove all the elements from this array. |
|
|
|
|
|
Set the length of this array to the specified |
|
Efficiently exchange the value of this array with the value of the specified |
|
Return a |
|
Return the number of unique elements in this array. |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Exchange the values of the specified |
Created with MrDocs