Class of an attribute that holds data of type T. More...
#include <mia/core/attributes.hh>
Public Member Functions | |
operator T () const | |
virtual const char * | typedescr () const |
Constructors | |
TAttribute (typename::boost::reference_wrapper< T >::type value) | |
![]() | |
std::string | as_string () const |
returns the value as a atring More... | |
bool | is_equal (const CAttribute &other) const |
bool | is_less (const CAttribute &other) const |
virtual | ~CAttribute () |
virtual destructor since derived classes may define dynamic objetcs More... | |
Protected Member Functions | |
const T & | get_value () const |
Class of an attribute that holds data of type T.
This class is the templated derivative of CAttribute that provides the container for most attributes you will come across. The value is stored read-only. It implements implements the abstract methods typedescr, do_as_string, do_is_equal, do_is_less For this type, is_equal returns true if the other attribute has the same type and holds the same value. is_less returns true of either the type is equal and the value is less, or with different types if a string-compare strcmp between the type descriptions returns -1.
Definition at line 121 of file attributes.hh.
TAttribute< T >::TAttribute | ( | typename::boost::reference_wrapper< T >::type | value) |
Construct the attribute by setting its value to
value |
Definition at line 484 of file attributes.hh.
|
protected |
Definition at line 496 of file attributes.hh.
TAttribute< T >::operator T | ( | ) | const |
provide a transparent conversion to the content type
Definition at line 490 of file attributes.hh.
|
virtual |
Implements CAttribute.
Definition at line 502 of file attributes.hh.