#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 |
| std::list< ArFunctor3< ArServerClient *, ArNetPacket *, ArFunctor * > * > | myFunctors |
| 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 |
| std::list< ArFunctor3< ArServerClient *, ArNetPacket *, ArFunctor1< ArArgumentBuilder * > * > * > | myStringFunctors |
| ArServerHandlerCommands::ArServerHandlerCommands | ( | ArServerBase * | server | ) |
Constructor.
| ArServerHandlerCommands::~ArServerHandlerCommands | ( | ) | [virtual] |
Destructor.
| bool ArServerHandlerCommands::addCommand | ( | const char * | name, | |
| const char * | description, | |||
| ArFunctor * | functor, | |||
| const char * | commandGroup = NULL | |||
| ) |
Adds a command with no arguments.
| name | the name of the command to add | |
| description | the description used for this command | |
| functor | the functor to call | |
| commandGroup | the command group this should be in, if NULL defaults to CustomCommands |
| bool ArServerHandlerCommands::addStringCommand | ( | const char * | name, | |
| const char * | description, | |||
| ArFunctor1< ArArgumentBuilder * > * | functor, | |||
| const char * | commandGroup = NULL | |||
| ) |
Adds a command that takes a string argument.
| name | the name of the command to add | |
| description | the description used for this command | |
| functor | the functor to call (takes an argument builder) | |
| commandGroup | the command group this should be in, if NULL defaults to CustomCommands |
| const char * ArServerHandlerCommands::getPrefix | ( | void | ) |
Gets the prefix.
| void ArServerHandlerCommands::netListCommands | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
The function that lists the commands.
| void ArServerHandlerCommands::netListStringCommands | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
The function that lists the string commands.
| void ArServerHandlerCommands::netParseCommand | ( | ArServerClient * | client, | |
| ArNetPacket * | packet, | |||
| ArFunctor * | functor | |||
| ) | [protected] |
| void ArServerHandlerCommands::netParseStringCommand | ( | ArServerClient * | client, | |
| ArNetPacket * | packet, | |||
| ArFunctor1< ArArgumentBuilder * > * | functor | |||
| ) | [protected] |
| void ArServerHandlerCommands::setPrefix | ( | const char * | prefix | ) |
Sets a prefix for commands.
std::list<std::string> ArServerHandlerCommands::myCommandDescriptions [protected] |
std::list<std::string> ArServerHandlerCommands::myCommands [protected] |
std::list<ArFunctor3<ArServerClient *, ArNetPacket *, ArFunctor *> *> ArServerHandlerCommands::myFunctors [protected] |
ArFunctor2C<ArServerHandlerCommands, ArServerClient *, ArNetPacket *> ArServerHandlerCommands::myNetListCommandsCB [protected] |
ArFunctor2C<ArServerHandlerCommands, ArServerClient *, ArNetPacket *> ArServerHandlerCommands::myNetListStringCommandsCB [protected] |
std::string ArServerHandlerCommands::myPrefix [protected] |
ArServerBase* ArServerHandlerCommands::myServer [protected] |
std::list<std::string> ArServerHandlerCommands::myStringCommandDescriptions [protected] |
std::list<std::string> ArServerHandlerCommands::myStringCommands [protected] |
std::list<ArFunctor3<ArServerClient *, ArNetPacket *, ArFunctor1<ArArgumentBuilder *> *> *> ArServerHandlerCommands::myStringFunctors [protected] |
1.4.7