Inheritance diagram for const_core_array:
Puts the STL const Back Insertion Sequence interface onto Core Foundation CFArrayRef. Several standard algorithms are also specialized to call the appropriate CFArrayRef functions. You get better interoperability with C++ objects and STL algorithms, more intuitive and typesafe indexing syntax and automatic release within scope.
The array maps the required Core Foundation callbacks to standard C++ object behavior:
T | The element value type, sizeof (T) == size (void*). |
Public Member Functions | |
References | |
const_reference | at (size_type i) const |
Gets the element at index i, if within bounds. | |
const_reference | back () const |
Gets the last element. | |
const_reference | front () const |
Gets the first element. | |
const_reference | operator[] (size_type i) const |
Gets the element at index i. | |
Iterators | |
const_iterator | begin () const |
Gets an iterator to the first element. | |
const_iterator | end () const |
Gets an iterator to the past-the-last element. | |
const_reverse_iterator | rbegin () const |
Gets a reverse iterator to the last element. | |
const_reverse_iterator | rend () const |
Gets a reverse iterator to the past-the-first element. | |
Constructors and Destructors | |
const_core_array (const core_array< T > &other, CFAllocatorRef allocator=kCFAllocatorDefault) | |
Copies the array, using the allocator. | |
const_core_array (const const_core_array &other) | |
Copies the array, using the allocator. | |
const_core_array (T *vals, CFIndex n, CFAllocatorRef allocator=kCFAllocatorDefault) | |
Constructs an array with n elements from vals, using the allocator. | |
~const_core_array () | |
Destructs the array. | |
Data | |
CFArrayRef | data () const |
Gets the raw data. | |
Sizers | |
bool | empty () const |
Tests whether there are no more elements. | |
size_type | size () const |
Gets the number of elements. | |
Static Public Member Functions | |
static size_type | max_size () |
Gets the maximum number of elements. | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator< (const const_core_array< T > &lhs, const const_core_array< T > &rhs) |
Tests whether lhs is lexicographically less than rhs. | |
bool | operator== (const const_core_array< T > &lhs, const const_core_array< T > &rhs) |
Tests whether lhs has equal elements to rhs. |