#include <EnumTypeInfo.hpp>
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 |
Type information for Enum types for which they are convertible to int.
Definition at line 52 of file install/include/rtt/types/EnumTypeInfo.hpp.
typedef std::map<T,string> RTT::types::EnumTypeInfo< T >::MapType [protected] |
Definition at line 70 of file rtt/types/EnumTypeInfo.hpp.
typedef std::map<T,string> RTT::types::EnumTypeInfo< T >::MapType [protected] |
Definition at line 56 of file install/include/rtt/types/EnumTypeInfo.hpp.
RTT::types::EnumTypeInfo< T >::EnumTypeInfo | ( | const char * | type | ) | [inline] |
Definition at line 58 of file install/include/rtt/types/EnumTypeInfo.hpp.
RTT::types::EnumTypeInfo< T >::EnumTypeInfo | ( | const char * | type | ) | [inline] |
Definition at line 72 of file rtt/types/EnumTypeInfo.hpp.
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.
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.
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.
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.
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()
Reimplemented from RTT::types::TemplateTypeInfo< T, false >.
Definition at line 132 of file rtt/types/EnumTypeInfo.hpp.
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()
Reimplemented from RTT::types::TemplateTypeInfo< T, false >.
Definition at line 118 of file install/include/rtt/types/EnumTypeInfo.hpp.
static int RTT::types::EnumTypeInfo< T >::enum_to_int | ( | T | e | ) | [inline, static, protected] |
Definition at line 59 of file rtt/types/EnumTypeInfo.hpp.
static int RTT::types::EnumTypeInfo< T >::enum_to_int | ( | T | e | ) | [inline, static, protected] |
Definition at line 45 of file install/include/rtt/types/EnumTypeInfo.hpp.
static T RTT::types::EnumTypeInfo< T >::int_to_enum | ( | int | i | ) | [inline, static, protected] |
Definition at line 64 of file rtt/types/EnumTypeInfo.hpp.
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.
std::map< T, string > RTT::types::EnumTypeInfo< T >::to_string [protected] |
Definition at line 55 of file install/include/rtt/types/EnumTypeInfo.hpp.