CStringAttrTranslatorMap Class Reference

A singelton class to translate strings to attributes based on keys. More...

#include <mia/core/attributes.hh>

Public Member Functions

PAttribute to_attr (const std::string &key, const std::string &value) const
 

Static Public Member Functions

static CStringAttrTranslatorMapinstance ()
 

Friends

class CAttrTranslator
 

Detailed Description

A singelton class to translate strings to attributes based on keys.

This class provides a singleton to translate strings to attributes. For the translation to take place for each attribute key a CAttrTranslator needs to be registered first.

Definition at line 439 of file attributes.hh.

Member Function Documentation

◆ instance()

static CStringAttrTranslatorMap& CStringAttrTranslatorMap::instance ( )
static
Returns
an instance to the translator map singleton

Referenced by add_attribute().

◆ to_attr()

PAttribute CStringAttrTranslatorMap::to_attr ( const std::string &  key,
const std::string &  value 
) const

Converts the input string value to a PAttribute by using the translator that was registered for the given key.

Parameters
key
value
Returns
the respective attribute

Referenced by add_attribute().

Friends And Related Function Documentation

◆ CAttrTranslator

friend class CAttrTranslator
friend

Definition at line 453 of file attributes.hh.


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