Space‐efficient value‐semantic array of packed TYPE integers.
Synopsis
Declared in <bdlc_packedintarray.h>
template<class TYPE>
class PackedIntArray;
Description
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.
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. |
|
Assign to this object the value read from the specified input stream. |
|
Write this value to the specified output |
|
Return an iterator to the first element (or |
|
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 one past the last element in this array. |
|
Return the value of the element at the front of this array. |
|
|
|
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 that of |
Static Member Functions
Name |
Description |
Return the BDEX version for the given |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Exchange the values of the specified |
Created with MrDocs