The main container manipulation class. More...
#include <data_container.hpp>
Public Types | |
typedef container_storage < KeyType, DataType, ObjectType, ObjectIdentificationTag, KeyDispatchTag, StorageTag > ::container_type | container_type |
typedef data_type_reference < DataType, container_type > ::type | reference |
Static Public Member Functions | |
static reference | access (container_type &cont, ObjectType const &obj, KeyType const &key) |
Accesses the data associated with the supplied key for the provided object. | |
static reference | access (container_type &cont, ObjectType const &obj) |
Accesses the data associated with the particular key type if type-based dispatch is used. | |
template<typename ContainerSrcType , typename ObjectSrcType > | |
static void | copy (ContainerSrcType &cont_src, ObjectSrcType const &obj_src, container_type &cont_dest, ObjectType const &obj_dest) |
Copies all data of the particular key type (including degenerate case of type based dispatch, where only single data is moved). | |
static void | reserve (container_type &cont, long num) |
Reserves memory for data using up to 'num' objects. | |
static void | erase (container_type &cont, ObjectType const &obj, KeyType const &key) |
Erases data for a particular key. | |
static void | erase (container_type &cont, ObjectType const &obj) |
Erases data for all keys of that type. | |
static DataType * | find_impl (container_type &cont, ObjectType const &obj, KeyType const &key, type_key_dispatch_tag) |
Checks whether data for a particular object with a particular key is already stored. Implementation for type-based dispatch. | |
static DataType * | find_impl (container_type &cont, ObjectType const &obj, KeyType const &key, full_key_dispatch_tag) |
Checks whether data for a particular object with a particular key is already stored. Implementation for full key dispatch. | |
static DataType * | find (container_type &cont, ObjectType const &obj, KeyType const &key) |
Checks whether data for a particular object with a particular key is already stored. | |
static DataType * | find (container_type &cont, ObjectType const &obj) |
Checks whether data for a particular object with a particular key is already stored. Key-type dispatch version. |
The main container manipulation class.
KeyType | Type of the key | |
DataType | Type of the data | |
ObjectType | Type of the object the data is stored for | |
ObjectIdentificationTag | Identification mechanism (either by address or by ID) | |
KeyDispatchTag | Dispatch by key object and type or only by type | |
StorageTag | Store data either in a dense or in a sparse manner |
typedef container_storage<KeyType, DataType, ObjectType, ObjectIdentificationTag, KeyDispatchTag, StorageTag>::container_type container_type |
typedef data_type_reference<DataType, container_type>::type reference |
static reference access | ( | container_type & | cont, | |
ObjectType const & | obj, | |||
KeyType const & | key | |||
) | [inline, static] |
Accesses the data associated with the supplied key for the provided object.
static reference access | ( | container_type & | cont, | |
ObjectType const & | obj | |||
) | [inline, static] |
Accesses the data associated with the particular key type if type-based dispatch is used.
static void copy | ( | ContainerSrcType & | cont_src, | |
ObjectSrcType const & | obj_src, | |||
container_type & | cont_dest, | |||
ObjectType const & | obj_dest | |||
) | [inline, static] |
Copies all data of the particular key type (including degenerate case of type based dispatch, where only single data is moved).
static void erase | ( | container_type & | cont, | |
ObjectType const & | obj, | |||
KeyType const & | key | |||
) | [inline, static] |
Erases data for a particular key.
static void erase | ( | container_type & | cont, | |
ObjectType const & | obj | |||
) | [inline, static] |
Erases data for all keys of that type.
static DataType* find | ( | container_type & | cont, | |
ObjectType const & | obj, | |||
KeyType const & | key | |||
) | [inline, static] |
Checks whether data for a particular object with a particular key is already stored.
static DataType* find | ( | container_type & | cont, | |
ObjectType const & | obj | |||
) | [inline, static] |
Checks whether data for a particular object with a particular key is already stored. Key-type dispatch version.
static DataType* find_impl | ( | container_type & | cont, | |
ObjectType const & | obj, | |||
KeyType const & | key, | |||
full_key_dispatch_tag | ||||
) | [inline, static] |
Checks whether data for a particular object with a particular key is already stored. Implementation for full key dispatch.
static DataType* find_impl | ( | container_type & | cont, | |
ObjectType const & | obj, | |||
KeyType const & | key, | |||
type_key_dispatch_tag | ||||
) | [inline, static] |
Checks whether data for a particular object with a particular key is already stored. Implementation for type-based dispatch.
static void reserve | ( | container_type & | cont, | |
long | num | |||
) | [inline, static] |
Reserves memory for data using up to 'num' objects.