PixelLightAPI  .
Classes | Public Types | Public Member Functions
PLEngine::ConsoleCommand Class Reference

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 SNConsoleBaseGetConsole () 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 VariableGetVar (PLCore::uint32 nNr) const
 Returns the vars at the given index.
PL_API ConsoleCommandoperator= (const ConsoleCommand &cSource)
 Copy operator.
PL_API bool operator== (const ConsoleCommand &cCommand) const
 Compare operator.

Detailed Description

Console command.


Member Enumeration Documentation

Console message parameter types.

Remarks:
		*     A paramCode of "FFBIS" would mean:
		*     Param Type
		*     0     ParamUnknown
		*     1     ParamFloat
		*     2     ParamInt
		*     3     ParamString
		*     4     ParamBool
		*  
Enumerator:
ParamUnknown 

May not occur!

ParamFloat 

'F'

ParamInt 

'I'

ParamString 

'S'

ParamBool 

'B'


Constructor & Destructor Documentation

PL_API PLEngine::ConsoleCommand::ConsoleCommand ( bool  bDebug,
const PLCore::String sCommand,
const PLCore::String sParameters,
const PLCore::String sHelp,
const PLCore::Functor< void, ConsoleCommand & > &  cFunctor 
)

Constructor.

Parameters:
[in]bDebug'true' if it is a debug command, else 'false'
[in]sCommandCommand string
[in]sParametersParameter string
[in]sHelpHelp string
[in]cFunctorExecution functor

Copy constructor.

Parameters:
[in]cSourceSource to copy from

Destructor.


Member Function Documentation

Returns the owner console.

Returns:
Owner console, can be a null pointer
PL_API bool PLEngine::ConsoleCommand::IsDebug ( ) const

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'
PL_API PLCore::uint32 PLEngine::ConsoleCommand::GetNumOfParams ( ) const

Returns the number of parameters.

Returns:
Number of command parameters
PL_API EMsgParamID PLEngine::ConsoleCommand::GetParamType ( PLCore::uint32  nNr) const

Returns the parameter type of parameter <nr>

Parameters:
[in]nNrVars index (must be in range from 0..GetNumOfParams())
Returns:
The parameter type of parameter
PL_API void PLEngine::ConsoleCommand::CreateVarsFromString ( const PLCore::String sParameters)

Create vars from params (convert string into vars)

Parameters:
[in]sParametersParameter string
PL_API Variable& PLEngine::ConsoleCommand::GetVar ( PLCore::uint32  nNr) const

Returns the vars at the given index.

Parameters:
[in]nNrVars index
Returns:
The vars at the given index
Note:
PL_API ConsoleCommand& PLEngine::ConsoleCommand::operator= ( const ConsoleCommand cSource)

Copy operator.

Parameters:
[in]cSourceSource to copy from
Returns:
This instance
PL_API bool PLEngine::ConsoleCommand::operator== ( const ConsoleCommand cCommand) const

Compare operator.

Parameters:
[in]cCommandCommand to compare with

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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:30
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported