ArServerHandlerCommands Class Reference

#include <ArServerHandlerCommands.h>

List of all members.


Detailed Description

Class for having commands that can be called easily on the client.

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
ArServerBasemyServer
std::list< std::string > myStringCommandDescriptions
std::list< std::string > myStringCommands
std::list< ArFunctor3< ArServerClient *,
ArNetPacket *, ArFunctor1<
ArArgumentBuilder * > * > * > 
myStringFunctors


The documentation for this class was generated from the following file:
Generated on Thu Aug 6 09:40:12 2009 for ArNetworking by  doxygen 1.5.1