A dispatch facility that unwraps type-erasued key-value type pairs. More...
#include <data_container.hpp>
Static Public Member Functions | |
template<typename ContainerType , typename IdType > | |
static void | erase (ContainerType &cont, IdType const &id, KeyType const &key) |
Erase data for a particular key. | |
template<typename ContainerType , typename IdType > | |
static void | erase (ContainerType &cont, IdType const &id) |
Erase all data associated with keys of the supplied type for the object. |
A dispatch facility that unwraps type-erasued key-value type pairs.
Refer to Alexandrescu, "Modern C++ Design" for details on type erasure
KeyType | The type of the key used for access | |
DataType | Type of the data that is stored for the element | |
ObjectType | The type of the object the data is associated with | |
ObjectIdentificationTag | Determines the dispatch mechanism for objects the data is associated with. Either 'pointer_based_id' (the default) or 'object_provided_id' (requires suitable overload of 'object_identifier') | |
KeyDispatchTag | Determines the method for key dispatch (either full dispatch ('full_KeyDispatchTag', default) or dispatch based on key type 'type_KeyDispatchTag') | |
StorageTag | Specifies dense ('dense_data_tag') or sparse ('storage_data_tag', default) storage of data. The former requires element-identification by id, cf. class 'object_identifier' |
static void erase | ( | ContainerType & | cont, | |
IdType const & | id, | |||
KeyType const & | key | |||
) | [inline, static] |
Erase data for a particular key.
static void erase | ( | ContainerType & | cont, | |
IdType const & | id | |||
) | [inline, static] |
Erase all data associated with keys of the supplied type for the object.