In file apps/support/command.h:

## class Command : public csSimpleCommand

> This class represents a command that can be send thru the console or by pressing a key from within the engine

## Inheritance:

### Public Methods

typedef bool (*CmdHandler)(char* cmd, char* arg)
  Additional command handler
static void change_boolean(char* arg, bool* value, char* what)
  Change boolean variable value
static bool change_boolean_gfx3d(char* arg, G3D_RENDERSTATEOPTION op, char* what)
  Change boolean variable value specifically for G3D.
static void change_choice(char* arg, int* value, char* what, char** choices, int num)
  Change value to one of listed in choices[]
static bool change_float(char* arg, float* value, char* what, float min, float max)
  Change float variable value
static bool change_int(char* arg, int* value, char* what, int min, int max)
  Change int variable value
static bool get_script_line(char* buf, int max_size)
  Check if a script is running and if so, return one command from the script
static void Initialize(csWorld* world, csCamera* camera, IGraphics3D* g3d, csConsole* console, ISystem* system)
  Call this first.
virtual bool Move(csVector3 Offset)
  Overridden from geObject
static bool perform(char* cmd, char* arg = NULL)
  Perform the command and return true if it was a valid command.
static bool perform_line(char* line)
  Perform the command line (split in command and args), perform the command and return true if it was a valid command
virtual bool PerformLine(char* line)
  Virtual override of csSimpleCommand.
static Command* SharedInstance()
  Return the shared instance.
static bool start_script(char* scr)
  Start a script of commands from a file.

### Private Fields

static csCamera* camera
  The corresponding camera object for this command interpreter.
static csConsole* console
  The console.
static IGraphics3D* g3d
  The IGraphics3D interface to use.
static FILE* script
  If this variable is non-NULL there is a running script from which commands are read and executed (one command every frame)
static Command* shared_instance
  The shared instance.
static ISystem* system
  The ISystem interface to use.
static csWorld* world
  The world that this command interpreter is using.

### Inherited from csSimpleCommand:

### Inherited from csBase:

## Documentation

> This class represents a command that can be send thru the console or by pressing a key from within the engine. It is a static class which contains only static data.

`virtual bool Move(csVector3 Offset)`
  Overridden from geObject

`static Command* shared_instance`
  The shared instance.

`static csWorld* world`
  The world that this command interpreter is using.

`static csCamera* camera`
  The corresponding camera object for this command interpreter.

`static IGraphics3D* g3d`
  The IGraphics3D interface to use.

`static ISystem* system`
  The ISystem interface to use.

`static csConsole* console`
  The console.

`static FILE* script`
  If this variable is non-NULL there is a running script from which commands are read and executed (one command every frame)

`static void Initialize(csWorld* world, csCamera* camera, IGraphics3D* g3d, csConsole* console, ISystem* system)`
  Call this first.

`static Command* SharedInstance()`
  Return the shared instance.

`static bool perform(char* cmd, char* arg = NULL)`
  Perform the command and return true if it was a valid command.

`static bool perform_line(char* line)`
  Perform the command line (split in command and args), perform the command and return true if it was a valid command

`virtual bool PerformLine(char* line)`
  Virtual override of csSimpleCommand.

`static bool start_script(char* scr)`
  Start a script of commands from a file.

`static bool get_script_line(char* buf, int max_size)`
  Check if a script is running and if so, return one command from the script. This routine will return false if there is no script, or if the last command from the script has been read. The script will be closed automatically in the last case.

`static void change_boolean(char* arg, bool* value, char* what)`
  Change boolean variable value

`static bool change_boolean_gfx3d(char* arg, G3D_RENDERSTATEOPTION op, char* what)`
  Change boolean variable value specifically for G3D.

`static void change_choice(char* arg, int* value, char* what, char** choices, int num)`
  Change value to one of listed in choices[]

`static bool change_float(char* arg, float* value, char* what, float min, float max)`
  Change float variable value

`static bool change_int(char* arg, int* value, char* what, int min, int max)`
  Change int variable value

`typedef bool (*CmdHandler)(char* cmd, char* arg)`
  Additional command handler. If not NULL, this handler will be called BEFORE internal handler, giving your handler a chance to override default behaviour. Should return TRUE if command has been recognized.

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de