OpenIG  2.0.4
cross-platform open-source OpenSceneGraph Image Generator
Public Member Functions | List of all members
OpenIG::Base::Commands::Command Class Referenceabstract

The Command class. More...

#include <Commands.h>

Inheritance diagram for OpenIG::Base::Commands::Command:

Public Member Functions

virtual int exec (const StringUtils::Tokens &tokens)=0
 Custom command execution implementation. More...
 
virtual const std::string getUsage () const =0
 Gets the command usage, brief, like the syntax. More...
 
virtual const std::string getDescription () const =0
 Gets a detailed command description. More...
 
virtual const std::string getArgumentsFormat () const =0
 Gets format of all the arguments. This is the available formats encoded: D - float I - integer S - String {}- List, example: {item1;item2;...} F - File name B - boolean P - position, x y z O - orientation, h p r C - color, r g b an example format can be like this: "F:I:S:{item1;item2;...}:F:B". More...
 

Detailed Description

The Command class.

Abstract for a single command

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Member Function Documentation

virtual int OpenIG::Base::Commands::Command::exec ( const StringUtils::Tokens &  tokens)
pure virtual

Custom command execution implementation.

Inheritants are expected to implement the command execution

Parameters
tokensContains the arguments
Returns
Should return 0 on succes, -1 on failure
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual const std::string OpenIG::Base::Commands::Command::getArgumentsFormat ( ) const
pure virtual

Gets format of all the arguments. This is the available formats encoded: D - float I - integer S - String {}- List, example: {item1;item2;...} F - File name B - boolean P - position, x y z O - orientation, h p r C - color, r g b an example format can be like this: "F:I:S:{item1;item2;...}:F:B".

Returns
The arguments format
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Nov 14 2015
virtual const std::string OpenIG::Base::Commands::Command::getDescription ( ) const
pure virtual

Gets a detailed command description.

Returns
The description
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual const std::string OpenIG::Base::Commands::Command::getUsage ( ) const
pure virtual

Gets the command usage, brief, like the syntax.

Returns
Brief description on how to use this command
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

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