39 #include "../rtt-config.h" 78 if (!
Types()->type(
"int")) {
79 log(
Error) <<
"Failed to register enum <-> int conversion because type int is not known in type system."<<
endlog();
102 if (result->update(source.get()))
112 menum->
set( (T)ds->
get() );
123 for(
typename MapType::const_iterator it = to_string.begin(); it != to_string.end(); ++it)
124 if ( it->second == dss->
get() ) {
125 menum->
set( it->first );
147 if ( to_string.count( ds->
get() ) == 0 ) {
virtual result_t get() const =0
void addConstructor(TypeConstructor *tb)
virtual bool composeType(base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const
virtual void set(param_t t)=0
virtual base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const
EnumTypeInfo(std::string type)
TypeConstructor * newConstructor(Function *foo, bool automatic=false)
std::map< T, std::string > to_string
std::map< T, std::string > MapType
static AssignableDataSource< T > * narrow(base::DataSourceBase *db)
TypeInfoRepository::shared_ptr Types()
boost::intrusive_ptr< DataSource< T > > shared_ptr
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
static DataSource< T > * narrow(base::DataSourceBase *db)
bool installTypeInfoObject(TypeInfo *ti)
bool installTypeInfoObject(TypeInfo *ti)
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static T int_to_enum(int i)
static int enum_to_int(T e)
static Logger::LogFunction endlog()
boost::intrusive_ptr< ValueDataSource< T > > shared_ptr