Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

ConsoleCmdCallback Class Reference

#include <callback.h>

Inheritance diagram for ConsoleCmdCallback:

Inheritance graph
[legend]
List of all members.

Detailed Description

Callback interface for console command processing To use a console command callback, derive from this class and implement interface method, and pass object of derived class to register method in console object.

Example:

class MyConsoleCmd : public ConsoleCmdCallback { public:

virtual void ConsoleCmd( const HashString &rstrCmd, const HashString &rstrArgs ) { if( rstrCmd == "mycommand" ) doSomething( rstrArgs ); } };

MyConsoleCmd kCmd; Console kConsole;

kConsole.RegisterCommand( &kCmd );
When the command mycommand is executed in the console, your callback will be called with the arguments passed to the command in the console.

You can also register a default callback in the console, which will be called for all commands that doesn't have an explicit callback registered.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

virtual void ConsoleCmd (const HashString &rstrCmd, const HashString &rstrArgs)=0


Member Function Documentation

virtual void ConsoleCmd const HashString rstrCmd,
const HashString rstrArgs
[pure virtual]
 

Process console command

Parameters:
rstrCmd Command
rstrArgs Argument string

Implemented in Config, and ProfileManager.


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:10 2004 for NeoEngine by doxygen 1.3.5