CommanderClient Class Reference

Processor of client commands. More...

#include <commander_client.h>

Inherits Commander.

Inheritance diagram for CommanderClient:

Inheritance graph
[legend]
Collaboration diagram for CommanderClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CommanderClient ()
virtual ~CommanderClient ()

Protected Member Functions

virtual void processCommand (const std::string &command, int playerID)
 Process one command.
void command_to_server (const std::string &command)
 Send command to the server.
void command_quit (std::stringstream &args)
void command_help (std::stringstream &args)
void command_getvar (std::stringstream &args)
void command_setvar (std::stringstream &args)
void command_players (std::stringstream &args)

Detailed Description

Processor of client commands.

Accepts users commands from console and send them to the network or process them directly.

Definition at line 17 of file commander_client.h.


Constructor & Destructor Documentation

CommanderClient::CommanderClient  )  [inline]
 

Definition at line 20 of file commander_client.h.

virtual CommanderClient::~CommanderClient  )  [inline, virtual]
 

Definition at line 21 of file commander_client.h.


Member Function Documentation

void CommanderClient::command_getvar std::stringstream &  args  )  [protected]
 

Definition at line 67 of file commander_client.cpp.

References _, Console::addConsoleMessage(), Settings::exist(), g_settings, getAppClient(), ApplicationClient::getConsole(), and Settings::getString().

Here is the call graph for this function:

void CommanderClient::command_help std::stringstream &  args  )  [protected]
 

Definition at line 59 of file commander_client.cpp.

References _, Console::addConsoleMessage(), getAppClient(), and ApplicationClient::getConsole().

Here is the call graph for this function:

void CommanderClient::command_players std::stringstream &  args  )  [protected]
 

Definition at line 95 of file commander_client.cpp.

References _, Console::addConsoleMessage(), getAppClient(), ApplicationClient::getConsole(), ApplicationClient::getGame(), Player::getID(), Game::getPlayer(), and Game::getValidPlayersID().

Here is the call graph for this function:

void CommanderClient::command_quit std::stringstream &  args  )  [protected]
 

Definition at line 54 of file commander_client.cpp.

References Game::endFun(), getAppClient(), and ApplicationClient::getGame().

Here is the call graph for this function:

void CommanderClient::command_setvar std::stringstream &  args  )  [protected]
 

Definition at line 81 of file commander_client.cpp.

References _, Console::addConsoleMessage(), Settings::exist(), g_settings, getAppClient(), ApplicationClient::getConsole(), and Settings::set().

Here is the call graph for this function:

void CommanderClient::command_to_server const std::string &  command  )  [protected]
 

Send command to the server.

If first character is / the command go to server.

Definition at line 49 of file commander_client.cpp.

Referenced by processCommand().

void CommanderClient::processCommand const std::string &  command,
int  playerID
[protected, virtual]
 

Process one command.

This function will be called in main task.

Parameters:
command string with command
playerID ID of player who created the command. It is ignored on client.

Implements Commander.

Definition at line 19 of file commander_client.cpp.

References command_to_server().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 14:13:06 2006 for bjs by  doxygen 1.4.5