Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Static Public Member Functions | Protected Attributes
RakNet::RakNetCommandParser Class Reference

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

#include <RakNetCommandParser.h>

Inheritance diagram for RakNet::RakNetCommandParser:

List of all members.

Public Member Functions

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

Static Public Member Functions

static void DestroyInstance (RakNetCommandParser *i)
static RakNetCommandParserGetInstance (void)

Protected Attributes

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

Detailed Description

Definition at line 22 of file RakNetCommandParser.h.


Constructor & Destructor Documentation

RakNet::RakNetCommandParser::RakNetCommandParser ( )
RakNet::RakNetCommandParser::~RakNetCommandParser ( )

Member Function Documentation

static void RakNet::RakNetCommandParser::DestroyInstance ( RakNetCommandParser i) [static]
static RakNetCommandParser* RakNet::RakNetCommandParser::GetInstance ( void  ) [static]
const char* RakNet::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 RakNet::CommandParserInterface.

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

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

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

Implements RakNet::CommandParserInterface.

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

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

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

Implements RakNet::CommandParserInterface.

void RakNet::RakNetCommandParser::SetRakPeerInterface ( RakNet::RakPeerInterface rakPeer)

Records the instance of RakPeer to perform the desired commands on

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

Member Data Documentation

Definition at line 56 of file RakNetCommandParser.h.


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

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net