![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A handler for configuration commands. More...
#include <ConfigCmdHandler.h>
Public Member Functions | |
ConfigCmdHandler () | |
Constructor. More... | |
~ConfigCmdHandler () | |
Destructor. More... | |
void | AddCommand (const Ogre::String &name, const Ogre::String &description, const Ogre::String ¶ms_description, ConfigCmdParams params, ConfigCmdCompletion completion) |
Adds a command to the manager. More... | |
void | ExecuteString (const Ogre::String &cmd_string) |
Executes a command. More... | |
ConfigCmd * | Find (const Ogre::String &name) const |
Finds a command by name. More... | |
int | GetConfigCmdNumber () |
Counts the commands in the manager. More... | |
ConfigCmd * | GetConfigCmd (unsigned int i) const |
Retrieves a command by index. More... | |
Private Member Functions | |
ConfigCmdHandler (const ConfigCmdHandler &rhs)=delete | |
Forbidden copy constructor. More... | |
ConfigCmdHandler | operator= (const ConfigCmdHandler &rhs)=delete |
Forbidden copy constructor. More... | |
void | InitCmd () |
Initializes the command. More... | |
Private Attributes | |
std::vector< std::unique_ptr< ConfigCmd > > | commands_ |
List of command in the manager. More... | |
A handler for configuration commands.
ConfigCmdHandler::ConfigCmdHandler | ( | ) |
Constructor.
ConfigCmdHandler::~ConfigCmdHandler | ( | ) |
Destructor.
|
privatedelete |
Forbidden copy constructor.
[in] | rhs | Manager to not copy. |
void ConfigCmdHandler::AddCommand | ( | const Ogre::String & | name, |
const Ogre::String & | description, | ||
const Ogre::String & | params_description, | ||
ConfigCmdParams | params, | ||
ConfigCmdCompletion | completion | ||
) |
Adds a command to the manager.
[in] | name | Command name. |
[in] | description | Command description. |
[in] | params_description | Command parameters description. |
[in] | params | Command parameter list. |
[in] | completion | Command completion list. |
void ConfigCmdHandler::ExecuteString | ( | const Ogre::String & | cmd_string | ) |
Executes a command.
[in] | cmd_string | The command, in string format. |
ConfigCmd * ConfigCmdHandler::Find | ( | const Ogre::String & | name | ) | const |
Finds a command by name.
[in] | name | Name of the command. |
ConfigCmd * ConfigCmdHandler::GetConfigCmd | ( | unsigned int | i | ) | const |
Retrieves a command by index.
A command index is the position at which it was added to the manager.
int ConfigCmdHandler::GetConfigCmdNumber | ( | ) |
Counts the commands in the manager.
|
private |
Initializes the command.
Initializes all available commands.
Must be called from the constructor.
|
privatedelete |
Forbidden copy constructor.
[in] | rhs | Manager to not copy. |
|
private |
List of command in the manager.