#include <command.hpp>
Real command which can be executed.
Definition at line 144 of file command.hpp.
OCL::TCP::RealCommand::RealCommand |
( |
std::string |
name, |
|
|
TcpReportingInterpreter * |
parent, |
|
|
unsigned int |
minargs = 0 , |
|
|
unsigned int |
maxargs = 0 , |
|
|
const char * |
syntax = 0 |
|
) |
| |
OCL::TCP::RealCommand::~RealCommand |
( |
| ) |
|
|
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.
Definition at line 487 of file command.cpp.
void OCL::TCP::RealCommand::execute |
( |
int |
argc, |
|
|
std::string * |
args |
|
) |
| |
RealCommand * OCL::TCP::RealCommand::getRealCommand |
( |
const std::vector< Command * > & |
cmds | ) |
const |
|
virtual |
const char * OCL::TCP::RealCommand::getSyntax |
( |
| ) |
const |
virtual void OCL::TCP::RealCommand::maincode |
( |
int |
argc, |
|
|
std::string * |
args |
|
) |
| |
|
protectedpure virtual |
Main code to be implemented by children.
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.
Definition at line 481 of file command.cpp.
Socket & OCL::TCP::RealCommand::socket |
( |
| ) |
const |
|
inlineprotected |
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 |
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.
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.
unsigned int OCL::TCP::RealCommand::_maxargs |
|
protected |
unsigned int OCL::TCP::RealCommand::_minargs |
|
protected |
const char* OCL::TCP::RealCommand::_syntax |
|
protected |
The documentation for this class was generated from the following files: