Generic string vs. attribute translator singleton. More...
#include <mia/core/attributes.hh>
Static Public Member Functions | |
static bool | register_for (const std::string &key) |
Additional Inherited Members | |
Public Member Functions inherited from CAttrTranslator | |
PAttribute | from_string (const std::string &value) const |
virtual | ~CAttrTranslator () |
The virtual destructor just ensures virtual destruction and silences a warning. More... | |
Protected Member Functions inherited from CAttrTranslator | |
CAttrTranslator () | |
bool | do_register (const std::string &key) |
Generic string vs. attribute translator singleton.
This class defines a generic translator between strings and a specific attribute type. All translaters are registered to a global map of type CStringAttrTranslatorMap that selects the conversion based on a key. The global map is implemented as a singleton can be accessed via CStringAttrTranslatorMap::instance()
Definition at line 509 of file attributes.hh.
|
static |
Register this translator for attributed for the given key. The translator is handled as a singleton and is stateless. Any translator type can be registered multiple times but keys must be different if the target translation type is different.