#include <CommandParserInterface.h>
Inheritance diagram for CommandParserInterface:
Public Member Functions | |
virtual char * | GetName (void) const =0 |
virtual void | OnNewIncomingConnection (PlayerID playerId, TransportInterface *transport) |
virtual void | OnConnectionLost (PlayerID playerId, TransportInterface *transport) |
virtual void | SendHelp (TransportInterface *transport, PlayerID playerId)=0 |
virtual bool | OnCommand (const char *command, unsigned numParameters, char **parameterList, TransportInterface *transport, PlayerID playerId, const char *originalString)=0 |
virtual void | OnTransportChange (TransportInterface *transport) |
virtual bool | GetRegisteredCommand (const char *command, RegisteredCommand *rc) |
virtual void | SendCommandList (TransportInterface *transport, PlayerID playerId) |
Static Public Member Functions | |
static void | ParseConsoleString (char *str, const char delineator, unsigned char delineatorToggle, unsigned *numParameters, char **parameterList, unsigned parameterListLength) |
Static Public Attributes | |
static const unsigned char | VARIABLE_NUMBER_OF_PARAMETERS = 255 |
Protected Member Functions | |
virtual void | RegisterCommand (unsigned char parameterCount, const char *command, const char *commandHelp) |
virtual void | ReturnResult (bool res, const char *command, TransportInterface *transport, PlayerID playerId) |
virtual void | ReturnResult (char *res, const char *command, TransportInterface *transport, PlayerID playerId) |
virtual void | ReturnResult (PlayerID res, const char *command, TransportInterface *transport, PlayerID playerId) |
virtual void | ReturnResult (int res, const char *command, TransportInterface *transport, PlayerID playerId) |
virtual void | ReturnResult (const char *command, TransportInterface *transport, PlayerID playerId) |
PlayerID | IntegersToPlayerID (int binaryAddress, int port) |
Protected Attributes | |
DataStructures::OrderedList< const char *, RegisteredCommand, RegisteredCommandComp > | commandList |
CommandParserInterface provides a set of functions and interfaces that plug into the ConsoleServer class. Each CommandParserInterface works at the same time as other interfaces in the system.
|
You are responsible for overriding this function and returning a static string, which will identifier your parser. This should return a static string
Implemented in LogCommandParser, RakNetCommandParser, and RakNetTransportCommandParser. |
|
Since there's no way to specify a playerID directly, the user needs to specify both the binary address and port. Given those parameters, this returns the corresponding PlayerID |
|
Given command with parameters parameterList , do whatever processing you wish.
Implemented in LogCommandParser, RakNetCommandParser, and RakNetTransportCommandParser. |
|
A callback for when playerId has disconnected, either gracefully or forcefully
Reimplemented in LogCommandParser. |
|
A callback for when playerId has connected to us.
Reimplemented in LogCommandParser. |
|
This is called every time transport interface is registered. If you want to save a copy of the TransportInterface pointer This is the place to do it
Reimplemented in LogCommandParser. |
|
Registers a command.
|
|
Just writes a string to the remote system when you are calling a function that has no return value This is not necessary to call, but makes it easier to return results of function calls
|
|
Just writes a string to the remote system based on the result ( res )of your operation This is not necessary to call, but makes it easier to return results of function calls
|
|
A callback for when you are expected to send a brief description of your parser to playerId
Implemented in LogCommandParser, RakNetCommandParser, and RakNetTransportCommandParser. |