OCL::TCP::RealCommand Class Reference

#include <command.hpp>

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

List of all members.

Public Member Functions

virtual bool correctSyntax (unsigned int argc, std::string *args)
virtual bool correctSyntax (unsigned int argc, std::string *args)
void execute (int argc, std::string *args)
void execute (int argc, std::string *args)
virtual RealCommandgetRealCommand (const std::vector< Command * > &cmds) const
virtual RealCommandgetRealCommand (const std::vector< Command * > &cmds) const
const char * getSyntax () const
const char * getSyntax () const
 RealCommand (std::string name, TcpReportingInterpreter *parent, unsigned int minargs=0, unsigned int maxargs=0, const char *syntax=0)
 RealCommand (std::string name, TcpReportingInterpreter *parent, unsigned int minargs=0, unsigned int maxargs=0, const char *syntax=0)
virtual ~RealCommand ()
virtual ~RealCommand ()

Protected Member Functions

virtual void maincode (int argc, std::string *args)=0
virtual void maincode (int argc, std::string *args)=0
bool sendError102 () const
bool sendError102 () const
bool sendOK () const
bool sendOK () const
Socketsocket () const
Socketsocket () const
void toupper (std::string *args, int start, int stop) const
void toupper (std::string *args, int index) const
void toupper (std::string *args, int start, int stop) const
void toupper (std::string *args, int index) const

Protected Attributes

unsigned int _maxargs
unsigned int _minargs
TcpReportingInterpreter_parent
const char * _syntax

Detailed Description

Real command which can be executed.

Definition at line 144 of file install/include/orocos/ocl/command.hpp.


Constructor & Destructor Documentation

OCL::TCP::RealCommand::RealCommand ( std::string  name,
TcpReportingInterpreter parent,
unsigned int  minargs = 0,
unsigned int  maxargs = 0,
const char *  syntax = 0 
)

Definition at line 455 of file command.cpp.

OCL::TCP::RealCommand::~RealCommand (  )  [virtual]

Definition at line 461 of file command.cpp.

OCL::TCP::RealCommand::RealCommand ( std::string  name,
TcpReportingInterpreter parent,
unsigned int  minargs = 0,
unsigned int  maxargs = 0,
const char *  syntax = 0 
)
virtual OCL::TCP::RealCommand::~RealCommand (  )  [virtual]

Member Function Documentation

virtual bool OCL::TCP::RealCommand::correctSyntax ( unsigned int  argc,
std::string *  args 
) [virtual]

Return true if the syntax is correct, false otherwise. Send an error message to the client on incorrect syntax.

bool OCL::TCP::RealCommand::correctSyntax ( unsigned int  argc,
std::string *  args 
) [virtual]

Return true if the syntax is correct, false otherwise. Send an error message to the client on incorrect syntax.

Definition at line 487 of file command.cpp.

void OCL::TCP::RealCommand::execute ( int  argc,
std::string *  args 
)

Execute this command.

void OCL::TCP::RealCommand::execute ( int  argc,
std::string *  args 
)

Execute this command.

Definition at line 501 of file command.cpp.

virtual RealCommand* OCL::TCP::RealCommand::getRealCommand ( const std::vector< Command * > &  cmds  )  const [virtual]

Returns this.

Implements OCL::TCP::Command.

RealCommand * OCL::TCP::RealCommand::getRealCommand ( const std::vector< Command * > &  cmds  )  const [virtual]

Returns this.

Implements OCL::TCP::Command.

Definition at line 496 of file command.cpp.

const char* OCL::TCP::RealCommand::getSyntax (  )  const

Return syntax information

const char * OCL::TCP::RealCommand::getSyntax (  )  const

Return syntax information

Definition at line 465 of file command.cpp.

virtual void OCL::TCP::RealCommand::maincode ( int  argc,
std::string *  args 
) [protected, pure virtual]

Main code to be implemented by children.

virtual void OCL::TCP::RealCommand::maincode ( int  argc,
std::string *  args 
) [protected, pure virtual]

Main code to be implemented by children.

bool OCL::TCP::RealCommand::sendError102 (  )  const [protected]

Send the correct syntax to the client. Return false.

bool OCL::TCP::RealCommand::sendError102 (  )  const [protected]

Send the correct syntax to the client. Return false.

Definition at line 470 of file command.cpp.

bool OCL::TCP::RealCommand::sendOK (  )  const [protected]

Send the message 101 OK to the client. Return true.

bool OCL::TCP::RealCommand::sendOK (  )  const [protected]

Send the message 101 OK to the client. Return true.

Definition at line 481 of file command.cpp.

Socket& OCL::TCP::RealCommand::socket (  )  const [inline, protected]

Return the socket for this command. Fast shortcut for _parent->getConnection()->getSocket()

Socket & OCL::TCP::RealCommand::socket (  )  const [inline, protected]

Return the socket for this command. Fast shortcut for _parent->getConnection()->getSocket()

Definition at line 522 of file command.cpp.

void OCL::TCP::RealCommand::toupper ( std::string *  args,
int  start,
int  stop 
) const [protected]

Convert all parameters between the start and stop index to upper-case. The caller has to make sure that both start and stop are valid indexes. stop must be strictly greater than start.

void OCL::TCP::RealCommand::toupper ( std::string *  args,
int  index 
) const [protected]

Convert the parameter with the given index to upper-case. The caller has to make sure that the given index is a valid index.

void OCL::TCP::RealCommand::toupper ( std::string *  args,
int  start,
int  stop 
) const [protected]

Convert all parameters between the start and stop index to upper-case. The caller has to make sure that both start and stop are valid indexes. stop must be strictly greater than start.

Definition at line 514 of file command.cpp.

void OCL::TCP::RealCommand::toupper ( std::string *  args,
int  index 
) const [protected]

Convert the parameter with the given index to upper-case. The caller has to make sure that the given index is a valid index.

Definition at line 509 of file command.cpp.


Member Data Documentation

unsigned int OCL::TCP::RealCommand::_maxargs [protected]

Definition at line 149 of file install/include/orocos/ocl/command.hpp.

unsigned int OCL::TCP::RealCommand::_minargs [protected]

Definition at line 148 of file install/include/orocos/ocl/command.hpp.

Definition at line 147 of file install/include/orocos/ocl/command.hpp.

const char * OCL::TCP::RealCommand::_syntax [protected]

Definition at line 150 of file install/include/orocos/ocl/command.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ocl
Author(s): OCL Development Team
autogenerated on Fri Jan 11 09:50:53 2013