PixelLightAPI
.
|
Abstract console base class. More...
#include <SNConsoleBase.h>
Public Types | |
enum | EState { Active = 0, Inactive = 1, Activating = 2, Deactivating = 3 } |
Console state. More... | |
enum | EFlags { NoDebugCommands = 1<<10 } |
Scene node flags (SceneNode flags extension) More... | |
Public Member Functions | |
PL_API void | Deactivate () |
Deactivates the console. | |
PL_API EState | GetState () const |
Returns the current console state. | |
PL_API void | ClearCommandHistory () |
Clear the command history. | |
virtual PL_API PLCore::String | GetDescription () const |
Returns the console description. | |
PL_API bool | RegisterCommand (bool bDebug, const PLCore::String &sCommand, const PLCore::String &sParameters, const PLCore::String &sHelp, const PLCore::Functor< void, ConsoleCommand & > &cFunctor) |
Registers a new command. | |
PL_API bool | RegisterCommand (const ConsoleCommand &cCommand) |
Register a new command. | |
PL_API bool | UnRegisterCommand (const PLCore::String &sCommand) |
Unregisters a command. | |
PL_API void | UnRegisterAllCommands () |
Unregisters all commands. | |
PL_API PLCore::uint32 | GetNumOfCommands () const |
Returns the number of registered commands. | |
PL_API PLCore::uint32 | GetNumOfParamsInString (const PLCore::String &sString) const |
Returns the number of parameters in a given string. | |
PL_API void | ProcessKeyMessage () |
Process a keyboard message. | |
PL_API void | ProcessCommand (const PLCore::String &sCommand="") |
Process a command. | |
PL_API void | List (bool bDetailed=false) |
Prints a list of all available console commands into the log. | |
Protected Member Functions | |
PL_API | SNConsoleBase () |
Default constructor. | |
virtual PL_API | ~SNConsoleBase () |
Destructor. | |
PL_API void | ProcessCommand (ConsoleCommand &cCommand) |
Process the syntactical correct command. | |
PL_API void | CompleteCommand () |
Completes the command. | |
Protected Attributes | |
EState | m_nState |
PLCore::String | m_sCommand |
PLCore::String | m_sFoundCommand |
PLCore::uint32 | m_nCursor |
int | m_nSelStart |
int | m_nSelEnd |
PLCore::Array< ConsoleCommand * > | m_lstCommands |
PLCore::HashMap < PLCore::String, ConsoleCommand * > | m_mapCommands |
PLCore::uint32 | m_nCurrentCommand |
PLCore::Array< PLCore::String > | m_lstCommandHistory |
Abstract console base class.
Scene node flags (SceneNode flags extension)
Reimplemented from PLScene::SceneNode.
PL_API PLEngine::SNConsoleBase::SNConsoleBase | ( | ) | [protected] |
Default constructor.
virtual PL_API PLEngine::SNConsoleBase::~SNConsoleBase | ( | ) | [protected, virtual] |
Destructor.
PL_API void PLEngine::SNConsoleBase::Deactivate | ( | ) |
Deactivates the console.
PL_API EState PLEngine::SNConsoleBase::GetState | ( | ) | const |
Returns the current console state.
PL_API void PLEngine::SNConsoleBase::ClearCommandHistory | ( | ) |
Clear the command history.
virtual PL_API PLCore::String PLEngine::SNConsoleBase::GetDescription | ( | ) | const [virtual] |
PL_API bool PLEngine::SNConsoleBase::RegisterCommand | ( | bool | bDebug, |
const PLCore::String & | sCommand, | ||
const PLCore::String & | sParameters, | ||
const PLCore::String & | sHelp, | ||
const PLCore::Functor< void, ConsoleCommand & > & | cFunctor | ||
) |
Registers a new command.
[in] | bDebug | Debug command? |
[in] | sCommand | Command string |
[in] | sParameters | Parameter string |
[in] | sHelp | Help string |
[in] | cFunctor | Execution functor |
PL_API bool PLEngine::SNConsoleBase::RegisterCommand | ( | const ConsoleCommand & | cCommand | ) |
Register a new command.
[in] | cCommand | Command which should be registered |
PL_API bool PLEngine::SNConsoleBase::UnRegisterCommand | ( | const PLCore::String & | sCommand | ) |
Unregisters a command.
[in] | sCommand | Command to remove |
PL_API void PLEngine::SNConsoleBase::UnRegisterAllCommands | ( | ) |
Unregisters all commands.
PL_API PLCore::uint32 PLEngine::SNConsoleBase::GetNumOfCommands | ( | ) | const |
Returns the number of registered commands.
PL_API PLCore::uint32 PLEngine::SNConsoleBase::GetNumOfParamsInString | ( | const PLCore::String & | sString | ) | const |
Returns the number of parameters in a given string.
[in] | sString | The string which should be checked |
PL_API void PLEngine::SNConsoleBase::ProcessKeyMessage | ( | ) |
Process a keyboard message.
PL_API void PLEngine::SNConsoleBase::ProcessCommand | ( | const PLCore::String & | sCommand = "" | ) |
Process a command.
[in] | sCommand | Command which should be executed |
PL_API void PLEngine::SNConsoleBase::List | ( | bool | bDetailed = false | ) |
Prints a list of all available console commands into the log.
[in] | bDetailed | Should the list have all available information about each command? |
PL_API void PLEngine::SNConsoleBase::ProcessCommand | ( | ConsoleCommand & | cCommand | ) | [protected] |
Process the syntactical correct command.
[in] | cCommand | The syntactical correct command |
PL_API void PLEngine::SNConsoleBase::CompleteCommand | ( | ) | [protected] |
Completes the command.
EState PLEngine::SNConsoleBase::m_nState [protected] |
Current state of console
PLCore::String PLEngine::SNConsoleBase::m_sCommand [protected] |
Current command string
Found command string
PLCore::uint32 PLEngine::SNConsoleBase::m_nCursor [protected] |
Current cursor position
int PLEngine::SNConsoleBase::m_nSelStart [protected] |
Selection cursor start position
int PLEngine::SNConsoleBase::m_nSelEnd [protected] |
Selection cursor end position
The collection of registered commands
Commands hash map
PLCore::uint32 PLEngine::SNConsoleBase::m_nCurrentCommand [protected] |
Current selected command entry
Command history list
|