Data Structures | Typedefs | Functions
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 <boost/any.hpp>
#include <boost/ref.hpp>
#include <mia/core/defines.hh>

Go to the source code of this file.

Data Structures

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...
struct  pattr_less
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< CAttributeMapCAttributeList
 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 TTranslator< double > CDoubleTranslator
typedef TAttribute< float > CFloatAttribute
 a float attribute
typedef TTranslator< float > CFloatTranslator
typedef TAttribute< int > CIntAttribute
 an integer attribute
typedef TTranslator< signed char > CSBTranslator
typedef TTranslator< signed int > CSITranslator
typedef TTranslator< signed short > CSSTranslator
typedef TAttribute< std::string > CStringAttribute
 a string attribute
typedef TTranslator< unsigned
char > 
CUBTranslator
typedef TTranslator< unsigned int > CUITranslator
typedef TTranslator< unsigned
short > 
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< signed char > > 
CVSBTranslator
typedef TTranslator
< std::vector< signed int > > 
CVSITranslator
typedef TTranslator
< std::vector< signed short > > 
CVSSTranslator
typedef TAttribute
< std::vector< std::string > > 
CVStringAttribute
 a vector of strings attribute
typedef TTranslator
< std::vector< unsigned char > > 
CVUBTranslator
typedef TTranslator
< std::vector< unsigned int > > 
CVUITranslator
typedef TTranslator
< std::vector< unsigned short > > 
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<typename T >
void EXPORT_CORE add_attribute (CAttributeMap &attributes, const std::string &key, T value)
template<>
void EXPORT_CORE add_attribute (CAttributeMap &attributes, const std::string &key, const char *value)
template<typename T >
T EXPORT_CORE get_attribute_as (const CAttribute &attr)
bool operator< (const CAttribute &a, const CAttribute &b)
std::ostream & operator<< (std::ostream &os, const CAttribute &attr)
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.

Typedef Documentation

typedef TTranslator<bool> CBitTranslator

Definition at line 744 of file attributes.hh.

typedef TTranslator<double> CDoubleTranslator

Definition at line 712 of file attributes.hh.

typedef TTranslator<float> CFloatTranslator

Definition at line 715 of file attributes.hh.

typedef TTranslator<signed char> CSBTranslator

Definition at line 741 of file attributes.hh.

typedef TTranslator<signed int> CSITranslator

Definition at line 729 of file attributes.hh.

typedef TTranslator<signed short> CSSTranslator

Definition at line 735 of file attributes.hh.

typedef TTranslator<unsigned char> CUBTranslator

Definition at line 738 of file attributes.hh.

typedef TTranslator<unsigned int> CUITranslator

Definition at line 726 of file attributes.hh.

typedef TTranslator<unsigned short> CUSTranslator

Definition at line 732 of file attributes.hh.

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

Definition at line 745 of file attributes.hh.

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

Definition at line 713 of file attributes.hh.

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

Definition at line 716 of file attributes.hh.

typedef TTranslator<std::vector<signed char> > CVSBTranslator

Definition at line 742 of file attributes.hh.

typedef TTranslator<std::vector<signed int> > CVSITranslator

Definition at line 730 of file attributes.hh.

typedef TTranslator<std::vector<signed short> > CVSSTranslator

Definition at line 736 of file attributes.hh.

typedef TTranslator<std::vector<unsigned char> > CVUBTranslator

Definition at line 739 of file attributes.hh.

typedef TTranslator<std::vector<unsigned int> > CVUITranslator

Definition at line 727 of file attributes.hh.

typedef TTranslator<std::vector<unsigned short> > CVUSTranslator

Definition at line 733 of file attributes.hh.

typedef std::shared_ptr<CAttribute > PAttribute

define the shared pointer wrapped attribute pointer

Definition at line 98 of file attributes.hh.

Function Documentation

bool operator< ( const CAttribute a,
const CAttribute b 
)
inline

Definition at line 92 of file attributes.hh.

References CAttribute::is_less().

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

Definition at line 82 of file attributes.hh.

References CAttribute::as_string().

bool operator== ( const CAttribute a,
const CAttribute b 
)
inline

Definition at line 87 of file attributes.hh.

References CAttribute::is_equal().