Static Public Member Functions
TTranslator< T > Class Template Reference

Generic string vs. attribute translator singleton. More...

#include <mia/core/attributes.hh>

Inheritance diagram for TTranslator< T >:
CAttrTranslator

Static Public Member Functions

static void 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 ()
 
void do_register (const std::string &key)
 

Detailed Description

template<typename T>
class TTranslator< T >

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 467 of file attributes.hh.

Member Function Documentation

template<typename T >
void TTranslator< T >::register_for ( const std::string &  key)
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.

Definition at line 688 of file attributes.hh.

References CAttrTranslator::do_register().


The documentation for this class was generated from the following file: