This space‐efficient value‐semantic array class represents a sequence of TYPE elements; TYPE must be convertible to either a signed or unsigned 64‐bit integer using static_cast. The interface provides functionality similar to a vector<int> however 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<int> are not invalidated upon reallocation.
Synopsis
Declared in <bdlc_packedintarray.h>
template<class TYPE>
class PackedIntArray;
Type Aliases
Name |
Description |
Constant iterator type for this packed array. |
|
Element value type for this packed 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 the value of the element at the back of this array. The behavior is undefined unless |
|
Assign to this object the value read from the specified input |
|
Write this value to the specified output |
|
Return an iterator referring to the first element in this array (or the past‐the‐end iterator if this array is empty). This reference remains valid as long as this array exists. |
|
Return the number of bytes currently used to store each element in this array. |
|
Return the number of elements this array can hold in terms of the current data type used to store its elements. |
|
Return an iterator referring to one element beyond the last element in this array. This reference remains valid as long as this array exists, and length does not decrease. |
|
Return the value of the element at the front of this array. The behavior is undefined unless |
|
|
|
Return |
|
Return |
|
Return number of elements in this array. |
|
Return the value of the element at the specified |
|
Remove the last element from this array. The behavior is undefined unless |
|
Write the value of this array to the specified output |
|
Append an element having the specified |
|
|
|
Remove all the elements from this array and set the storage required per element to one byte. |
|
|
|
|
|
Set the length of this array to the specified |
|
Efficiently exchange the value of this array with the value of the specified |
Static Member Functions
Name |
Description |
Return the |
Specializations
Name |
Description |
This space‐efficient value‐semantic array class represents a sequence of |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Exchange the values of the specified |
Created with MrDocs