Planeshift
Public Member Functions | Public Attributes

AdminCmdSubCommandParser Class Reference

Class for storing subcommands for a specific word position. More...

#include <adminmanager.h>

List of all members.

Public Member Functions

 AdminCmdSubCommandParser ()
 initializes subcommands list without any commands.
 AdminCmdSubCommandParser (csString commandList)
 initializes the subCommands List by splitting the string.
virtual csString GetHelpMessage ()
 Retrieve help message for the list of subcommands.
virtual csString GetHelpMessage (const csString &subcommand)
 Retrieve help message for a specific subcommand.
bool IsSubCommand (const csString &word)
 test if a single word is a subcommand.
void Push (csString subcommand, csString helpmsg)
 add a new sub command with help text.
virtual ~AdminCmdSubCommandParser ()

Public Attributes

csHash< csString, csString > subCommands
 list of subcommands

Detailed Description

Class for storing subcommands for a specific word position.

Definition at line 509 of file adminmanager.h.


Constructor & Destructor Documentation

AdminCmdSubCommandParser::AdminCmdSubCommandParser ( ) [inline]

initializes subcommands list without any commands.

Definition at line 516 of file adminmanager.h.

AdminCmdSubCommandParser::AdminCmdSubCommandParser ( csString  commandList)

initializes the subCommands List by splitting the string.

Fast initialization by supplying a string with the commands that are seperated by white spaces.

Parameters:
commandListspace separated list of commands
virtual AdminCmdSubCommandParser::~AdminCmdSubCommandParser ( ) [inline, virtual]

Definition at line 527 of file adminmanager.h.


Member Function Documentation

virtual csString AdminCmdSubCommandParser::GetHelpMessage ( ) [virtual]

Retrieve help message for the list of subcommands.

Returns:
a help message to send back to the client
virtual csString AdminCmdSubCommandParser::GetHelpMessage ( const csString &  subcommand) [virtual]

Retrieve help message for a specific subcommand.

Returns:
a help message for a subcommand when the help was registered.
bool AdminCmdSubCommandParser::IsSubCommand ( const csString &  word)

test if a single word is a subcommand.

Parameters:
wordsingle word (no whitespaces)
Returns:
true when it is in the list of subcommands, otherwise false.
void AdminCmdSubCommandParser::Push ( csString  subcommand,
csString  helpmsg 
)

add a new sub command with help text.

Parameters:
subcommandto register
helpmsghelp message for the command
Returns:
true when it is in the list of subcommands, otherwise false.

Member Data Documentation

csHash<csString, csString> AdminCmdSubCommandParser::subCommands

list of subcommands

Definition at line 512 of file adminmanager.h.


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