RTT::types::EnumTypeInfo< T > Struct Template Reference

#include <EnumTypeInfo.hpp>

Inheritance diagram for RTT::types::EnumTypeInfo< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool composeType (base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const
virtual bool composeType (base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const
virtual
base::DataSourceBase::shared_ptr 
decomposeType (base::DataSourceBase::shared_ptr source) const
virtual
base::DataSourceBase::shared_ptr 
decomposeType (base::DataSourceBase::shared_ptr source) const
 EnumTypeInfo (const char *type)
 EnumTypeInfo (const char *type)

Protected Types

typedef std::map< T, string > MapType
typedef std::map< T, string > MapType

Static Protected Member Functions

static int enum_to_int (T e)
static int enum_to_int (T e)
static T int_to_enum (int i)
static T int_to_enum (int i)

Protected Attributes

std::map< T, string > to_string

Detailed Description

template<class T>
struct RTT::types::EnumTypeInfo< T >

Type information for Enum types for which they are convertible to int.

See also:
StructTypeInfo

Definition at line 52 of file install/include/rtt/types/EnumTypeInfo.hpp.


Member Typedef Documentation

template<class T >
typedef std::map<T,string> RTT::types::EnumTypeInfo< T >::MapType [protected]

Definition at line 70 of file rtt/types/EnumTypeInfo.hpp.

template<class T >
typedef std::map<T,string> RTT::types::EnumTypeInfo< T >::MapType [protected]

Definition at line 56 of file install/include/rtt/types/EnumTypeInfo.hpp.


Constructor & Destructor Documentation

template<class T >
RTT::types::EnumTypeInfo< T >::EnumTypeInfo ( const char *  type  )  [inline]

Definition at line 58 of file install/include/rtt/types/EnumTypeInfo.hpp.

template<class T >
RTT::types::EnumTypeInfo< T >::EnumTypeInfo ( const char *  type  )  [inline]

Definition at line 72 of file rtt/types/EnumTypeInfo.hpp.


Member Function Documentation

template<class T >
virtual bool RTT::types::EnumTypeInfo< T >::composeType ( base::DataSourceBase::shared_ptr  source,
base::DataSourceBase::shared_ptr  result 
) const [inline, virtual]

Composition also checks if source is an int or string, and if so, converts it to the enum of type T kept in result.

Parameters:
source a DataSource<int> or DataSource<string>, generated by decomposeType().
result An AssignableDataSource<T> that will get the new enum value.

Reimplemented from RTT::types::TemplateTypeInfo< T, false >.

Definition at line 90 of file rtt/types/EnumTypeInfo.hpp.

template<class T >
virtual bool RTT::types::EnumTypeInfo< T >::composeType ( base::DataSourceBase::shared_ptr  source,
base::DataSourceBase::shared_ptr  result 
) const [inline, virtual]

Composition also checks if source is an int or string, and if so, converts it to the enum of type T kept in result.

Parameters:
source a DataSource<int> or DataSource<string>, generated by decomposeType().
result An AssignableDataSource<T> that will get the new enum value.

Reimplemented from RTT::types::TemplateTypeInfo< T, false >.

Definition at line 76 of file install/include/rtt/types/EnumTypeInfo.hpp.

template<class T >
virtual base::DataSourceBase::shared_ptr RTT::types::EnumTypeInfo< T >::decomposeType ( base::DataSourceBase::shared_ptr  source  )  const [inline, virtual]

Converts the enum to a string in case source is an enum and the string mapping is known. In case there is no string mapping, an int is returned. The conversion the other way around is done by composeType()

Returns:
a new DataSource containing an int or a string, null if source is not an enum of this type.

Reimplemented from RTT::types::TemplateTypeInfo< T, false >.

Definition at line 132 of file rtt/types/EnumTypeInfo.hpp.

template<class T >
virtual base::DataSourceBase::shared_ptr RTT::types::EnumTypeInfo< T >::decomposeType ( base::DataSourceBase::shared_ptr  source  )  const [inline, virtual]

Converts the enum to a string in case source is an enum and the string mapping is known. In case there is no string mapping, an int is returned. The conversion the other way around is done by composeType()

Returns:
a new DataSource containing an int or a string, null if source is not an enum of this type.

Reimplemented from RTT::types::TemplateTypeInfo< T, false >.

Definition at line 118 of file install/include/rtt/types/EnumTypeInfo.hpp.

template<class T >
static int RTT::types::EnumTypeInfo< T >::enum_to_int ( e  )  [inline, static, protected]

Definition at line 59 of file rtt/types/EnumTypeInfo.hpp.

template<class T >
static int RTT::types::EnumTypeInfo< T >::enum_to_int ( e  )  [inline, static, protected]

Definition at line 45 of file install/include/rtt/types/EnumTypeInfo.hpp.

template<class T >
static T RTT::types::EnumTypeInfo< T >::int_to_enum ( int  i  )  [inline, static, protected]

Definition at line 64 of file rtt/types/EnumTypeInfo.hpp.

template<class T >
static T RTT::types::EnumTypeInfo< T >::int_to_enum ( int  i  )  [inline, static, protected]

Definition at line 50 of file install/include/rtt/types/EnumTypeInfo.hpp.


Member Data Documentation

template<class T >
std::map< T, string > RTT::types::EnumTypeInfo< T >::to_string [protected]

Definition at line 55 of file install/include/rtt/types/EnumTypeInfo.hpp.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:17 2013