OrocosComponentLibrary  2.9.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Command Class Referenceabstract

Command pattern. More...

#include <command.hpp>

Inheritance diagram for Command:
AliasCommand RealCommand

Public Member Functions

 Command (std::string name)
 
virtual bool is (std::string &cmd) const
 
virtual RealCommandgetRealCommand (const std::vector< Command * > &cmds) const =0
 Return a reference to the object which is really responsible for executing this command. More...
 
bool operator== (const std::string &cmp) const
 Compare on name.
 
bool operator!= (const std::string &cmp) const
 
bool operator< (const Command &cmp) const
 
const std::string & getName () const
 Get the name of this command.
 

Static Public Member Functions

static Commandfind (const std::vector< Command * > &cmds, const std::string &cmp)
 Find the command with the given name in the vector.
 

Protected Attributes

std::string _name
 

Detailed Description

Command pattern.

Definition at line 91 of file command.hpp.

Member Function Documentation

virtual RealCommand* getRealCommand ( const std::vector< Command * > &  cmds) const
pure virtual

Return a reference to the object which is really responsible for executing this command.

This enables multiple names for the same command. Return 0 if no such command is founded.

Implemented in RealCommand, and AliasCommand.

Referenced by TcpReportingInterpreter::getConnection(), and AliasCommand::getRealCommand().


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