Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SensorMotorInfoAble Class Reference

Abstract class for giving names to sensors and motors. More...

#include <sensormotorinfoable.h>

Inheritance diagram for SensorMotorInfoAble:
Collaboration diagram for SensorMotorInfoAble:

Public Types

typedef std::function
< std::string(int)> 
NamingFunction
 function that returns the name given the index More...
 

Public Member Functions

 SensorMotorInfoAble ()
 
void setBaseName (const std::string &basename)
 
void setBaseInfo (const SensorMotorInfo &baseinfo)
 
SensorMotorInfo getBaseInfo ()
 
void setNamingFunc (const NamingFunction &func)
 
NamingFunction getNamingFunc () const
 
void setNames (const std::vector< std::string > &names)
 set names explicitly (basename is anyway suffixed) More...
 
std::string getName (int index) const
 returns the name of a single item. Typically called from within Sensor and Motor class. More...
 
std::list< SensorMotorInfogetInfos (int number) const
 get all infos. More...
 

Static Public Member Functions

static std::string defaultNameing (int index)
 the default implementation is for index==0: basename, otherwise basename + (index+1) More...
 

Protected Attributes

NamingFunction func
 
SensorMotorInfo baseinfo
 

Detailed Description

Abstract class for giving names to sensors and motors.

Member Typedef Documentation

typedef std::function<std::string(int)> NamingFunction

function that returns the name given the index

Constructor & Destructor Documentation

SensorMotorInfoAble ( )
inline

Member Function Documentation

static std::string defaultNameing ( int  index)
inlinestatic

the default implementation is for index==0: basename, otherwise basename + (index+1)

SensorMotorInfo getBaseInfo ( )
inline
std::list<SensorMotorInfo> getInfos ( int  number) const
inline

get all infos.

Typically called from within Sensor and Motor class.

std::string getName ( int  index) const
inline

returns the name of a single item. Typically called from within Sensor and Motor class.

NamingFunction getNamingFunc ( ) const
inline
void setBaseInfo ( const SensorMotorInfo baseinfo)
inline
void setBaseName ( const std::string &  basename)
inline
void setNames ( const std::vector< std::string > &  names)
inline

set names explicitly (basename is anyway suffixed)

void setNamingFunc ( const NamingFunction func)
inline

Member Data Documentation

SensorMotorInfo baseinfo
protected
NamingFunction func
protected

The documentation for this class was generated from the following file: