Console command.
More...
#include <ConsoleCommand.h>
List of all members.
Classes |
class | Variable |
| Console variable. More...
|
Public Types |
enum | EMsgParamID {
ParamUnknown,
ParamFloat,
ParamInt,
ParamString,
ParamBool
} |
| Console message parameter types. More...
|
Public Member Functions |
PL_API | ConsoleCommand (bool bDebug, const PLCore::String &sCommand, const PLCore::String &sParameters, const PLCore::String &sHelp, const PLCore::Functor< void, ConsoleCommand & > &cFunctor) |
| Constructor.
|
PL_API | ConsoleCommand (const ConsoleCommand &cSource) |
| Copy constructor.
|
PL_API | ~ConsoleCommand () |
| Destructor.
|
PL_API SNConsoleBase * | GetConsole () const |
| Returns the owner console.
|
PL_API bool | IsDebug () const |
| Returns whether this is a debug command or not.
|
PL_API PLCore::String | GetCommand () const |
| Returns the command string.
|
PL_API PLCore::String | GetParameters () const |
| Returns the parameter string.
|
PL_API PLCore::String | GetHelp () const |
| Returns the help string.
|
PL_API PLCore::Functor< void,
ConsoleCommand & > & | GetFunctor () |
| Returns the execution functor.
|
PL_API bool | HasValidParams () const |
| Check if the params are valid.
|
PL_API PLCore::uint32 | GetNumOfParams () const |
| Returns the number of parameters.
|
PL_API EMsgParamID | GetParamType (PLCore::uint32 nNr) const |
| Returns the parameter type of parameter <nr>
|
PL_API void | CreateVarsFromString (const PLCore::String &sParameters) |
| Create vars from params (convert string into vars)
|
PL_API Variable & | GetVar (PLCore::uint32 nNr) const |
| Returns the vars at the given index.
|
PL_API ConsoleCommand & | operator= (const ConsoleCommand &cSource) |
| Copy operator.
|
PL_API bool | operator== (const ConsoleCommand &cCommand) const |
| Compare operator.
|
Detailed Description
Member Enumeration Documentation
Console message parameter types.
- Enumerator:
ParamUnknown |
May not occur!
|
ParamFloat |
'F'
|
ParamInt |
'I'
|
ParamString |
'S'
|
ParamBool |
'B'
|
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
[in] | bDebug | 'true' if it is a debug command, else 'false' |
[in] | sCommand | Command string |
[in] | sParameters | Parameter string |
[in] | sHelp | Help string |
[in] | cFunctor | Execution functor |
Copy constructor.
- Parameters:
-
[in] | cSource | Source to copy from |
Member Function Documentation
Returns the owner console.
- Returns:
- Owner console, can be a null pointer
Returns whether this is a debug command or not.
- Returns:
- 'true' if it is a debug command, else 'false'
Returns the command string.
- Returns:
- Command string
Returns the parameter string.
- Returns:
- Parameter string
Returns the help string.
- Returns:
- Help string
Returns the execution functor.
- Returns:
- Command execution functor
Check if the params are valid.
- Returns:
- 'true' if the parameters are valid, else 'false'
Returns the number of parameters.
- Returns:
- Number of command parameters
Returns the parameter type of parameter <nr>
- Parameters:
-
- Returns:
- The parameter type of parameter
Create vars from params (convert string into vars)
- Parameters:
-
[in] | sParameters | Parameter string |
Returns the vars at the given index.
- Parameters:
-
- Returns:
- The vars at the given index
- Note:
-
Copy operator.
- Parameters:
-
[in] | cSource | Source to copy from |
- Returns:
- This instance
PL_API bool PLEngine::ConsoleCommand::operator== |
( |
const ConsoleCommand & |
cCommand | ) |
const |
Compare operator.
- Parameters:
-
[in] | cCommand | Command to compare with |
The documentation for this class was generated from the following file: