This class holds (key-type, data-type) pairs. Uses a singleton pattern to.
More...
#include <key_value_registration.hpp>
Public Member Functions |
template<typename KeyType , typename DataType > |
void | add () |
| Adds a new key-value type pair (if not already existing).
|
template<typename KeyType > |
void | erase_key_all (ObjectType const &obj) const |
| Erases all data associated with the provided object for a particular key.
|
template<typename DataType > |
void | erase_all_value (ObjectType const &obj) const |
| Erases all data of a particular value type, no matter which key has been used.
|
void | erase_all_all (ObjectType const &obj) const |
| Erase all data associated with the provided object.
|
template<typename KeyType > |
void | copy_key_all (ObjectType const &src, ObjectType const &dest) const |
| Copies all data associated with particular keys of the supplied type to another object.
|
template<typename value_type > |
void | copy_all_value (ObjectType const &src, ObjectType const &dest) const |
| Copy all data of a certain type to another object, no matter which key was used.
|
void | copy_all_all (ObjectType const &src, ObjectType const &dest) const |
| Copies all data to another object.
|
Static Public Member Functions |
static key_value_registration & | instance () |
| Returns the only instance of that type (singleton pattern).
|
Detailed Description
template<typename ObjectType>
class viennadata::key_value_registration< ObjectType >
This class holds (key-type, data-type) pairs. Uses a singleton pattern to.
- Template Parameters:
-
| object_type | Type of the object for which the data is stored |
Member Function Documentation
Adds a new key-value type pair (if not already existing).
void copy_all_all |
( |
ObjectType const & |
src, |
|
|
ObjectType const & |
dest | |
|
) |
| | const [inline] |
Copies all data to another object.
- Parameters:
-
| src | The source object |
| dest | The destination object |
void copy_all_value |
( |
ObjectType const & |
src, |
|
|
ObjectType const & |
dest | |
|
) |
| | const [inline] |
Copy all data of a certain type to another object, no matter which key was used.
- Parameters:
-
| src | The source object |
| dest | The destination object |
void copy_key_all |
( |
ObjectType const & |
src, |
|
|
ObjectType const & |
dest | |
|
) |
| | const [inline] |
Copies all data associated with particular keys of the supplied type to another object.
- Parameters:
-
| src | The source object |
| dest | The destination object |
void erase_all_all |
( |
ObjectType const & |
obj |
) |
const [inline] |
Erase all data associated with the provided object.
void erase_all_value |
( |
ObjectType const & |
obj |
) |
const [inline] |
Erases all data of a particular value type, no matter which key has been used.
void erase_key_all |
( |
ObjectType const & |
obj |
) |
const [inline] |
Erases all data associated with the provided object for a particular key.
Returns the only instance of that type (singleton pattern).
The documentation for this class was generated from the following file: