Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
OCL::TCP::Command Class Referenceabstract

#include <command.hpp>

Inheritance diagram for OCL::TCP::Command:
Inheritance graph
[legend]

Public Member Functions

 Command (std::string name)
 
const std::string & getName () const
 
virtual RealCommandgetRealCommand (const std::vector< Command * > &cmds) const =0
 
virtual bool is (std::string &cmd) const
 
bool operator!= (const std::string &cmp) const
 
bool operator< (const Command &cmp) const
 
bool operator== (const std::string &cmp) const
 
virtual ~Command ()
 

Static Public Member Functions

static Commandfind (const std::vector< Command * > &cmds, const std::string &cmp)
 

Protected Attributes

std::string _name
 

Detailed Description

Command pattern

Definition at line 91 of file command.hpp.

Constructor & Destructor Documentation

OCL::TCP::Command::Command ( std::string  name)

Definition at line 394 of file command.cpp.

OCL::TCP::Command::~Command ( )
virtual

Definition at line 399 of file command.cpp.

Member Function Documentation

Command * OCL::TCP::Command::find ( const std::vector< Command * > &  cmds,
const std::string &  cmp 
)
static

Find the command with the given name in the vector.

Definition at line 403 of file command.cpp.

const std::string & OCL::TCP::Command::getName ( void  ) const

Get the name of this command.

Definition at line 415 of file command.cpp.

virtual RealCommand* OCL::TCP::Command::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 OCL::TCP::RealCommand, and OCL::TCP::AliasCommand.

bool OCL::TCP::Command::is ( std::string &  cmd) const
virtual

Definition at line 420 of file command.cpp.

bool OCL::TCP::Command::operator!= ( const std::string &  cmp) const

Definition at line 430 of file command.cpp.

bool OCL::TCP::Command::operator< ( const Command cmp) const

Definition at line 435 of file command.cpp.

bool OCL::TCP::Command::operator== ( const std::string &  cmp) const

Compare on name

Definition at line 425 of file command.cpp.

Member Data Documentation

std::string OCL::TCP::Command::_name
protected

Definition at line 94 of file command.hpp.


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


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:20