CStringAttrTranslatorMap Class Reference
Basic data strctures and functions

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 CStringAttrTranslatorMap & | instance ()

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

## Member Function Documentation

## instance()

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 Symbol Documentation

## CAttrTranslator

friend class CAttrTranslator

friend

Definition at line 461 of file attributes.hh.

References CAttrTranslator.

Referenced by CAttrTranslator.

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

- attributes.hh