Simpatico
v1.10
|
Array containers that store pointers to objects, and related iterators.
The one-dimensional array with names that contain a prefix "P" all store pointers to objects. This module also includes associated iterators.
The DPArray and FPArray class templates are dynamically and statically allocated pointer arrays, respectively. A GPArray is a growable pointer array.
Each DPArray < T >, FArray <T, N>, or GPArray<T> container has a private C array of T* pointers. These containers all overload the the [] operator so as to return a T& reference, rather than a T* pointer. The append method takes a T& reference as a parameter. The destructor for a pointer array deletes the underlying array of T* pointers, but not the T objects to which they point.
An ArrayStack < T > container is a finite capacity stack that is implemented as a dynamically allocated array of T* pointers. Objects can be pushed onto or popped off the top of the stack using the push(T&) and pop() methods. An ArrayStack can be allocated only once, and cannot be resized.
An SSet< T > is a container that holds pointers to an unordered set of T objects. It provides fast addition and removal of single elements, and fast iteration through all elements. The indexing of elements is arbitrary and mutable, and may change when an element is deleted.
An ArraySet < T > is a container that holds pointers to a subset of the elements of an associated array of T objects. The indexing of elements within an ArraySet container is arbitrary and mutable.
Classes | |
class | Util::ArraySet< Data > |
A container for pointers to a subset of elements of an associated array. More... | |
class | Util::ArrayStack< Data > |
A stack of fixed capacity. More... | |
class | Util::ConstPArrayIterator< Data > |
Forward iterator for a PArray. More... | |
class | Util::DPArray< Data > |
A dynamic array that only holds pointers to its elements. More... | |
class | Util::FPArray< Data, Capacity > |
Statically allocated pointer array. More... | |
class | Util::GPArray< Data > |
An automatically growable PArray. More... | |
class | Util::GStack< Data > |
An automatically growable Stack. More... | |
class | Util::PArray< Data > |
An array that only holds pointers to its elements. More... | |
class | Util::PArrayIterator< Data > |
Forward iterator for a PArray. More... | |
class | Util::SSet< Data, Capacity > |
Statically allocated array of pointers to an unordered set. More... | |