#include <LogCommandParser.h>
Inheritance diagram for LogCommandParser:
Public Member Functions | |
bool | OnCommand (const char *command, unsigned numParameters, char **parameterList, TransportInterface *transport, PlayerID playerId, const char *originalString) |
char * | GetName (void) const |
void | SendHelp (TransportInterface *transport, PlayerID playerId) |
void | AddChannel (const char *channelName) |
void | WriteLog (const char *channelName, const char *format,...) |
void | OnNewIncomingConnection (PlayerID playerId, TransportInterface *transport) |
void | OnConnectionLost (PlayerID playerId, TransportInterface *transport) |
void | OnTransportChange (TransportInterface *transport) |
Protected Member Functions | |
void | PrintChannels (PlayerID playerId, TransportInterface *transport) const |
unsigned | Unsubscribe (PlayerID playerId, const char *channelName) |
unsigned | Subscribe (PlayerID playerId, const char *channelName) |
unsigned | GetChannelIndexFromName (const char *channelName) |
Protected Attributes | |
DataStructures::List< PlayerIDAndChannel > | remoteUsers |
The list of remote users. Added to when users subscribe, removed when they disconnect or unsubscribe. | |
const char * | channelNames [32] |
Names of the channels at each bit, or 0 for an unused channel. | |
TransportInterface * | trans |
This is so I can save the current transport provider, solely so I can use it without having the user pass it to Log. | |
Classes | |
struct | PlayerIDAndChannel |
One of these structures is created per player. More... |
|
|
|
Given the name of a channel, return the index into channelNames where it is located
|
|
You are responsible for overriding this function and returning a static string, which will identifier your parser. This should return a static string
Implements CommandParserInterface. |
|
Given command with parameters parameterList , do whatever processing you wish.
Implements CommandParserInterface. |
|
A callback for when playerId has disconnected, either gracefully or forcefully
Reimplemented from CommandParserInterface. |
|
A callback for when playerId has connected to us.
Reimplemented from CommandParserInterface. |
|
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 from CommandParserInterface. |
|
Sends the currently active channels to the user
|
|
A callback for when you are expected to send a brief description of your parser to playerId
Implements CommandParserInterface. |
|
Subscribe a user to a channel (or to all channels)
|
|
Unsubscribe a user from a channel (or from all channels)
|
|
Write a log to a channel. Logs are not buffered, so only remote consoles connected and subscribing at the time you write will get the output.
|