All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dynamicgraph::Entity Class Reference

This class represents an entity, i.e. More...

#include <dynamic-graph/entity.h>

Inheritance diagram for dynamicgraph::Entity:
[legend]
Collaboration diagram for dynamicgraph::Entity:
[legend]

Public Types

typedef std::map< std::string,
SignalBase< int > * > 
SignalMap
 
typedef std::map< const
std::string, command::Command * > 
CommandMap_t
 

Public Member Functions

 Entity (const std::string &name)
 
virtual ~Entity ()
 
const std::string & getName () const
 
virtual const std::string & getClassName () const
 
virtual std::string getDocString () const
 
bool hasSignal (const std::string &signame) const
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual void display (std::ostream &os) const
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
const std::string & getCommandList () const
 
CommandMap_t getNewStyleCommandMap ()
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
SignalMap getSignalMap () const
 

Logger related methods

std::string name
 
SignalMap signalMap
 
CommandMap_t commandMap
 
Logger logger_
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0)
 Send messages. More...
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 Specify the verbosity level of the logger. More...
 
LoggerVerbosity getLoggerVerbosityLevel ()
 Get the logger's verbosity level. More...
 
void addCommand (const std::string &name, command::Command *command)
 
void entityRegistration ()
 
void entityDeregistration ()
 
void signalRegistration (const SignalArray< int > &signals)
 
void signalDeregistration (const std::string &name)
 

Detailed Description

This class represents an entity, i.e.

a generic computational unit that provides input and output signals.

These signals link the entities together to form a complete computation graph. To declare a new entity, please see the DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN macro in factory.h.

Member Typedef Documentation

typedef std::map<const std::string, command::Command*> dynamicgraph::Entity::CommandMap_t
typedef std::map< std::string,SignalBase<int>* > dynamicgraph::Entity::SignalMap

Constructor & Destructor Documentation

dynamicgraph::Entity::Entity ( const std::string &  name)
explicit
virtual dynamicgraph::Entity::~Entity ( )
virtual

Member Function Documentation

void dynamicgraph::Entity::addCommand ( const std::string &  name,
command::Command command 
)
protected
virtual void dynamicgraph::Entity::display ( std::ostream &  os) const
virtual
std::ostream& dynamicgraph::Entity::displaySignalList ( std::ostream &  os) const
void dynamicgraph::Entity::entityDeregistration ( )
protected
void dynamicgraph::Entity::entityRegistration ( )
protected
virtual const std::string& dynamicgraph::Entity::getClassName ( ) const
inlinevirtual
const std::string& dynamicgraph::Entity::getCommandList ( ) const
virtual std::string dynamicgraph::Entity::getDocString ( ) const
virtual
LoggerVerbosity dynamicgraph::Entity::getLoggerVerbosityLevel ( )
inline

Get the logger's verbosity level.

const std::string& dynamicgraph::Entity::getName ( ) const
inline
command::Command* dynamicgraph::Entity::getNewStyleCommand ( const std::string &  cmdName)
CommandMap_t dynamicgraph::Entity::getNewStyleCommandMap ( )
SignalBase<int>& dynamicgraph::Entity::getSignal ( const std::string &  signalName)
const SignalBase<int>& dynamicgraph::Entity::getSignal ( const std::string &  signalName) const
SignalMap dynamicgraph::Entity::getSignalMap ( ) const
bool dynamicgraph::Entity::hasSignal ( const std::string &  signame) const
void dynamicgraph::Entity::sendMsg ( const std::string &  msg,
MsgType  t = MSG_TYPE_INFO,
const char *  file = "",
int  line = 0 
)

Send messages.

Parameters
msgwith level t. Add string file and line to message.
void dynamicgraph::Entity::setLoggerVerbosityLevel ( LoggerVerbosity  lv)
inline

Specify the verbosity level of the logger.

void dynamicgraph::Entity::signalDeregistration ( const std::string &  name)
protected
void dynamicgraph::Entity::signalRegistration ( const SignalArray< int > &  signals)
protected
virtual SignalBase<int>* dynamicgraph::Entity::test ( )
inlinevirtual
virtual void dynamicgraph::Entity::test2 ( SignalBase< int > *  )
inlinevirtual
virtual std::ostream& dynamicgraph::Entity::writeCompletionList ( std::ostream &  os) const
virtual
virtual std::ostream& dynamicgraph::Entity::writeGraph ( std::ostream &  os) const
virtual

Member Data Documentation

CommandMap_t dynamicgraph::Entity::commandMap
protected
Logger dynamicgraph::Entity::logger_
protected
std::string dynamicgraph::Entity::name
protected
SignalMap dynamicgraph::Entity::signalMap
protected