Inheritance diagram for core_array:

Puts the STL Back Insertion Sequence interface on Core Foundation CFMutableArrayRef. Several standard algorithms are also specialized to call the appropriate CFMutableArrayRef functions. You get better interoperability with C++ objects and STL algorithms, more natural 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 | |
| base::reference | at (typename base::size_type i) |
| Gets the element at index i, if within bounds. | |
| base::reference | back () |
| Gets the last element. | |
| base::reference | front () |
| Gets the first element. | |
| base::reference | operator[] (typename base::size_type i) |
| Gets the element at index i. | |
Iterators | |
| base::iterator | begin () |
| Gets an iterator to the first element. | |
| base::iterator | end () |
| Gets an iterator to the past-the-last element. | |
| base::reverse_iterator | rbegin () |
| Gets a reverse iterator to the last element. | |
| base::reverse_iterator | rend () |
| Gets a reverse iterator to the past-the-first element. | |
Erasers | |
| void | clear () |
| Erases entire array. | |
| base::iterator | erase (typename base::iterator first, typename base::iterator last) |
| Erases the range first to last. | |
| base::iterator | erase (typename base::iterator first) |
| Erases the element at pos. | |
| void | pop_back () |
| Erases the last element. | |
Constructors | |
| core_array (const core_array &other, CFAllocatorRef allocator=kCFAllocatorDefault) | |
| Copies the array, using the allocator. | |
| template<typename Iter> | |
| core_array (Iter first, Iter last, CFAllocatorRef allocator=kCFAllocatorDefault) | |
| Constructs an array with the range from first to last, using the allocator. | |
| core_array (typename base::size_type n, const T &val=T(), CFAllocatorRef allocator=kCFAllocatorDefault) | |
| Constructs an array with n copies of val, using the allocator. | |
| core_array (CFAllocatorRef allocator=kCFAllocatorDefault) | |
| Constructs an empty array, using the allocator. | |
Data | |
| CFMutableArrayRef | data () const |
| Gets the raw data. | |
Inserters | |
| template<typename Iter> | |
| void | insert (typename base::iterator pos, Iter first, Iter last) |
| Inserts at pos the range from first to last. | |
| void | insert (typename base::iterator pos, typename base::size_type n, const T &val) |
| Inserts at pos n copies of val. | |
| base::iterator | insert (typename base::iterator pos, const T &val) |
| Inserts at pos a copy of val. | |
| void | push_back (const T &val) |
| Inserts the value val at the end. | |
Assignments | |
| core_array & | operator= (const core_array &other) |
| Assigns the other array. | |
| void | swap (core_array< T > &other) |
| Swaps contents with other array. | |
Resizers | |
| void | resize (typename base::size_type sz, const T &val=T()) |
| Changes the size of the array to sz, filling with val elements if necessary. | |