#include <ArServerHandlerCommands.h>
Public Member Functions | |
bool | addCommand (const char *name, const char *description, ArFunctor *functor, const char *commandGroup=NULL) |
Adds a command with no arguments. | |
bool | addStringCommand (const char *name, const char *description, ArFunctor1< ArArgumentBuilder * > *functor, const char *commandGroup=NULL) |
Adds a command that takes a string argument. | |
ArServerHandlerCommands (ArServerBase *server) | |
Constructor. | |
const char * | getPrefix (void) |
Gets the prefix. | |
void | netListCommands (ArServerClient *client, ArNetPacket *packet) |
The function that lists the commands. | |
void | netListStringCommands (ArServerClient *client, ArNetPacket *packet) |
The function that lists the string commands. | |
void | setPrefix (const char *prefix) |
Sets a prefix for commands. | |
virtual | ~ArServerHandlerCommands () |
Destructor. | |
Protected Member Functions | |
void | netParseCommand (ArServerClient *client, ArNetPacket *packet, ArFunctor *functor) |
void | netParseStringCommand (ArServerClient *client, ArNetPacket *packet, ArFunctor1< ArArgumentBuilder * > *functor) |
Protected Attributes | |
std::list< std::string > | myCommandDescriptions |
std::list< std::string > | myCommands |
ArFunctor2C< ArServerHandlerCommands, ArServerClient *, ArNetPacket * > | myNetListCommandsCB |
ArFunctor2C< ArServerHandlerCommands, ArServerClient *, ArNetPacket * > | myNetListStringCommandsCB |
std::string | myPrefix |
ArServerBase * | myServer |
std::list< std::string > | myStringCommandDescriptions |
std::list< std::string > | myStringCommands |
Definition at line 38 of file ArServerHandlerCommands.h.
|
Constructor.
Definition at line 30 of file ArServerHandlerCommands.cpp. References ArServerBase::addData(), myNetListCommandsCB, myNetListStringCommandsCB, and myServer. |
|
Destructor.
Definition at line 50 of file ArServerHandlerCommands.cpp. |
|
Adds a command with no arguments.
Definition at line 62 of file ArServerHandlerCommands.cpp. References ArServerBase::addData(), ArLog::log(), myCommandDescriptions, myCommands, myPrefix, myServer, and netParseCommand(). Referenced by ArServerModeRatioDrive::addControlCommands(), ArServerModeDrive::addControlCommands(), ArServerSimpleComGyro::ArServerSimpleComGyro(), and ArServerSimpleComMovementLogging::ArServerSimpleComMovementLogging(). |
|
Adds a command that takes a string argument.
Definition at line 113 of file ArServerHandlerCommands.cpp. References ArServerBase::addData(), ArLog::log(), myPrefix, myServer, myStringCommandDescriptions, myStringCommands, and netParseStringCommand(). Referenced by ArServerHandlerMapping::addSimpleCommands(), ArServerSimpleComUC::ArServerSimpleComUC(), and ArServerSimplePopup::ArServerSimplePopup(). |
|
Gets the prefix.
Definition at line 237 of file ArServerHandlerCommands.cpp. References myPrefix. |
|
The function that lists the commands.
Definition at line 196 of file ArServerHandlerCommands.cpp. References ArBasePacket::byte2ToBuf(), client, myCommandDescriptions, myCommands, ArClientBase::sendPacketTcp(), and ArBasePacket::strToBuf(). |
|
The function that lists the string commands.
Definition at line 213 of file ArServerHandlerCommands.cpp. References ArBasePacket::byte2ToBuf(), client, myStringCommandDescriptions, myStringCommands, ArClientBase::sendPacketTcp(), and ArBasePacket::strToBuf(). |
|
Definition at line 162 of file ArServerHandlerCommands.cpp. References ArFunctor3< P1, P2, P3 >::invoke(), and ArLog::log(). Referenced by addCommand(). |
|
Definition at line 174 of file ArServerHandlerCommands.cpp. References ArArgumentBuilder::add(), ArLog::log(), and ArArgumentBuilder::setFullString(). Referenced by addStringCommand(). |
|
Sets a prefix for commands.
Definition at line 232 of file ArServerHandlerCommands.cpp. References myPrefix. |
|
Definition at line 70 of file ArServerHandlerCommands.h. Referenced by addCommand(), and netListCommands(). |
|
Definition at line 69 of file ArServerHandlerCommands.h. Referenced by addCommand(), and netListCommands(). |
|
Definition at line 75 of file ArServerHandlerCommands.h. Referenced by ArServerHandlerCommands(). |
|
Definition at line 77 of file ArServerHandlerCommands.h. Referenced by ArServerHandlerCommands(). |
|
Definition at line 73 of file ArServerHandlerCommands.h. Referenced by addCommand(), addStringCommand(), getPrefix(), and setPrefix(). |
|
Definition at line 64 of file ArServerHandlerCommands.h. Referenced by addCommand(), addStringCommand(), and ArServerHandlerCommands(). |
|
Definition at line 72 of file ArServerHandlerCommands.h. Referenced by addStringCommand(), and netListStringCommands(). |
|
Definition at line 71 of file ArServerHandlerCommands.h. Referenced by addStringCommand(), and netListStringCommands(). |