attributes.hh File Reference
`#include <mia/core/msgstream.hh>`
`#include <mia/core/errormacro.hh>`
`#include <map>`
`#include <memory>`
`#include <string>`
`#include <cstring>`
`#include <vector>`
`#include <iostream>`
`#include <sstream>`
`#include <stdexcept>`
`#include <type_traits>`
`#include <iomanip>`
`#include <boost/any.hpp>`
`#include <boost/ref.hpp>`
`#include <boost/lexical_cast.hpp>`
`#include <mia/core/attributetype.hh>`
Include dependency graph for attributes.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | attribute_type< CAttributeMap >
class | CAttribute
| The class of all attributes of data that is considered to ve meta-data. More...
class | CAttributedData
| A collection of attributes. More...
class | CAttrTranslator
| A class to translate an attribute from a string. More...
class | CStringAttrTranslatorMap
| A singelton class to translate strings to attributes based on keys. More...
class | TAttribute< T >
| Class of an attribute that holds data of type T. More...
class | TTranslator< T >
| Generic string vs. attribute translator singleton. More...

## Typedefs

typedef TAttribute< CAttributeMap > | CAttributeList
| providing the possibility to nest attribute lists
typedef std::map< std::string, PAttribute > | CAttributeMap
| A name:attribute map.
typedef TTranslator< bool > | CBitTranslator
typedef TAttribute< double > | CDoubleAttribute
| a double attribute
typedef TAttribute< float > | CFloatAttribute
| a float attribute
typedef TTranslator< float > | CFloatTranslator
typedef TAttribute< int > | CIntAttribute
| an integer attribute
typedef TTranslator< int8_t > | CSBTranslator
typedef TTranslator< signed int > | CSITranslator
typedef TTranslator< int64_t > | CSLTranslator
typedef TTranslator< int16_t > | CSSTranslator
typedef TAttribute< std::string > | CStringAttribute
| a string attribute
typedef TTranslator< uint8_t > | CUBTranslator
typedef TTranslator< unsigned int > | CUITranslator
typedef TTranslator< uint64_t > | CULTranslator
typedef TTranslator< uint16_t > | CUSTranslator
typedef TTranslator< std::vector< bool > > | CVBitTranslator
typedef TAttribute< std::vector< double > > | CVDoubleAttribute
| a vector of doubles attribute
typedef TTranslator< std::vector< double > > | CVDoubleTranslator
typedef TAttribute< std::vector< float > > | CVFloatAttribute
typedef TTranslator< std::vector< float > > | CVFloatTranslator
typedef TAttribute< std::vector< int > > | CVIntAttribute
| a vector of integers attribute
typedef TTranslator< std::vector< int8_t > > | CVSBTranslator
typedef TTranslator< std::vector< int32_t > > | CVSITranslator
typedef TTranslator< std::vector< int64_t > > | CVSLTranslator
typedef TTranslator< std::vector< int16_t > > | CVSSTranslator
typedef TAttribute< std::vector< std::string > > | CVStringAttribute
| a vector of strings attribute
typedef TTranslator< std::vector< uint8_t > > | CVUBTranslator
typedef TTranslator< std::vector< uint32_t > > | CVUITranslator
typedef TTranslator< std::vector< uint64_t > > | CVULTranslator
typedef TTranslator< std::vector< uint16_t > > | CVUSTranslator
typedef std::shared_ptr< CAttribute > | PAttribute
| define the shared pointer wrapped attribute pointer
typedef std::shared_ptr< CAttributeMap > | PAttributeMap
| another pointer-usage easy maker

## Functions

template<>
void EXPORT_CORE | add_attribute (CAttributeMap &attributes, const std::string &key, const char *value)
template<typename T>
void EXPORT_CORE | add_attribute (CAttributeMap &attributes, const std::string &key, T value)
template<typename T>
T EXPORT_CORE | get_attribute_as (const CAttribute &attr)
std::ostream & | operator<< (std::ostream &os, const CAttribute &attr)
std::ostream & | operator<< (std::ostream &os, const CAttributedData &data)
EXPORT_CORE std::ostream & | operator<< (std::ostream &os, const CAttributeMap &data)
| Facility to write an attribute map to a stream.
bool | operator== (const CAttribute &a, const CAttribute &b)
EXPORT_CORE bool | operator== (const CAttributeMap &am, const CAttributeMap &bm)
| Compare two attribute data instances a and b.

## Variables

NEVER typedef TTranslator< double > | CDoubleTranslator
| *‍/

## Typedef Documentation

## CBitTranslator

typedef TTranslator<bool> CBitTranslator

Definition at line 859 of file attributes.hh.

## CFloatTranslator

typedef TTranslator<float> CFloatTranslator

Definition at line 832 of file attributes.hh.

## CSBTranslator

typedef TTranslator<int8_t> CSBTranslator

Definition at line 856 of file attributes.hh.

## CSITranslator

typedef TTranslator<signed int> CSITranslator

Definition at line 844 of file attributes.hh.

## CSLTranslator

typedef TTranslator<int64_t> CSLTranslator

Definition at line 838 of file attributes.hh.

## CSSTranslator

typedef TTranslator<int16_t> CSSTranslator

Definition at line 850 of file attributes.hh.

## CUBTranslator

typedef TTranslator<uint8_t> CUBTranslator

Definition at line 853 of file attributes.hh.

## CUITranslator

typedef TTranslator<unsigned int> CUITranslator

Definition at line 841 of file attributes.hh.

## CULTranslator

typedef TTranslator<uint64_t> CULTranslator

Definition at line 835 of file attributes.hh.

## CUSTranslator

typedef TTranslator<uint16_t> CUSTranslator

Definition at line 847 of file attributes.hh.

## CVBitTranslator

typedef TTranslator<std::vector<bool> > CVBitTranslator

Definition at line 860 of file attributes.hh.

## CVDoubleTranslator

typedef TTranslator<std::vector<double> > CVDoubleTranslator

Definition at line 830 of file attributes.hh.

## CVFloatTranslator

typedef TTranslator<std::vector<float> > CVFloatTranslator

Definition at line 833 of file attributes.hh.

## CVSBTranslator

typedef TTranslator<std::vector<int8_t> > CVSBTranslator

Definition at line 857 of file attributes.hh.

## CVSITranslator

typedef TTranslator<std::vector<int32_t> > CVSITranslator

Definition at line 845 of file attributes.hh.

## CVSLTranslator

typedef TTranslator<std::vector<int64_t> > CVSLTranslator

Definition at line 839 of file attributes.hh.

## CVSSTranslator

typedef TTranslator<std::vector<int16_t> > CVSSTranslator

Definition at line 851 of file attributes.hh.

## CVUBTranslator

typedef TTranslator<std::vector<uint8_t> > CVUBTranslator

Definition at line 854 of file attributes.hh.

## CVUITranslator

typedef TTranslator<std::vector<uint32_t> > CVUITranslator

Definition at line 842 of file attributes.hh.

## CVULTranslator

typedef TTranslator<std::vector<uint64_t> > CVULTranslator

Definition at line 836 of file attributes.hh.

## CVUSTranslator

typedef TTranslator<std::vector<uint16_t> > CVUSTranslator

Definition at line 848 of file attributes.hh.

## PAttribute

typedef std::shared_ptr<CAttribute > PAttribute

define the shared pointer wrapped attribute pointer

Definition at line 102 of file attributes.hh.

## Function Documentation

## add_attribute()

template<>

void EXPORT_CORE add_attribute | ( | CAttributeMap & | attributes,
|  | const std::string & | key,
|  | const char * | value )

inline

Definition at line 496 of file attributes.hh.

References cvdebug(), EXPORT_CORE, CStringAttrTranslatorMap::instance(), and CStringAttrTranslatorMap::to_attr().

## operator<<() [1/2]

std::ostream & operator<< | ( | std::ostream & | os,
|  | const CAttribute & | attr )

inline

Definition at line 89 of file attributes.hh.

References CAttribute::as_string().

## operator<<() [2/2]

std::ostream & operator<< | ( | std::ostream & | os,
|  | const CAttributedData & | data )

inline

Definition at line 389 of file attributes.hh.

References CAttributedData::print().

## operator==()

bool operator== | ( | const CAttribute & | a,
|  | const CAttribute & | b )

inline

Definition at line 95 of file attributes.hh.

References CAttribute::is_equal().

## Variable Documentation

## CDoubleTranslator

NEVER typedef TTranslator<double> CDoubleTranslator

*‍/

Definition at line 829 of file attributes.hh.