#include <ArServerHandlerCommands.h>
You can add commands with addCommand and addStringCommand, you can get the list of commands by requesting the data "listCommands" and "listStringCommands".
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 |
1.5.1