Public Member Functions | Protected Attributes

RakNetCommandParser Class Reference

This allows a console client to call most of the functions in RakPeer. More...

#include <RakNetCommandParser.h>

Inherits CommandParserInterface.

Collaboration diagram for RakNetCommandParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RakNetCommandParser ()
 ~RakNetCommandParser ()
bool OnCommand (const char *command, unsigned numParameters, char **parameterList, TransportInterface *transport, SystemAddress systemAddress, const char *originalString)
const char * GetName (void) const
void SendHelp (TransportInterface *transport, SystemAddress systemAddress)
void SetRakPeerInterface (RakPeerInterface *rakPeer)

Protected Attributes

RakPeerInterfacepeer
 Which instance of RakPeer we are working on. Set from SetRakPeerInterface().

Detailed Description

This allows a console client to call most of the functions in RakPeer.

Definition at line 19 of file RakNetCommandParser.h.


Constructor & Destructor Documentation

RakNetCommandParser::RakNetCommandParser (  ) 

Definition at line 17 of file RakNetCommandParser.cpp.

Here is the call graph for this function:

RakNetCommandParser::~RakNetCommandParser (  ) 

Definition at line 60 of file RakNetCommandParser.cpp.


Member Function Documentation

const char * RakNetCommandParser::GetName ( void   )  const [virtual]

You are responsible for overriding this function and returning a static string, which will identifier your parser. This should return a static string

Returns:
The name that you return.

Implements CommandParserInterface.

Definition at line 287 of file RakNetCommandParser.cpp.

bool RakNetCommandParser::OnCommand ( const char *  command,
unsigned  numParameters,
char **  parameterList,
TransportInterface transport,
SystemAddress  systemAddress,
const char *  originalString 
) [virtual]

Given command with parameters parameterList , do whatever processing you wish.

Parameters:
[in] command The command to process
[in] numParameters How many parameters were passed along with the command
[in] parameterList The list of parameters. parameterList[0] is the first parameter and so on.
[in] transport The transport interface we can use to write to
[in] systemAddress The player that sent this command.
[in] originalString The string that was actually sent over the network, in case you want to do your own parsing

Implements CommandParserInterface.

Definition at line 67 of file RakNetCommandParser.cpp.

Here is the call graph for this function:

void RakNetCommandParser::SendHelp ( TransportInterface transport,
SystemAddress  systemAddress 
) [virtual]

A callback for when you are expected to send a brief description of your parser to systemAddress

Parameters:
[in] transport The transport interface we can use to write to
[in] systemAddress The player that requested help.

Implements CommandParserInterface.

Definition at line 291 of file RakNetCommandParser.cpp.

Here is the call graph for this function:

void RakNetCommandParser::SetRakPeerInterface ( RakPeerInterface rakPeer  ) 

Records the instance of RakPeer to perform the desired commands on

Parameters:
[in] rakPeer The RakPeer instance, or a derived class (e.g. RakPeer or RakPeer)

Definition at line 63 of file RakNetCommandParser.cpp.


Member Data Documentation

Which instance of RakPeer we are working on. Set from SetRakPeerInterface().

Definition at line 50 of file RakNetCommandParser.h.


The documentation for this class was generated from the following files: