#include <Console.h>
Description
A debugging utility used to view output from the Engine and interpret text commands from the user.
The console a useful utility on the user side when running your program. All Engine messages displayed are recorded in the console. While you can view output, you can also submit additional commands for the Engine to run. There exist a number of built-in commands along with the ability to add your own commands. And, due to the structure of adding commands, they will all have some sort of help documentation for usage.
Public Types | |
enum | MessageMode { Standard, Disabled } |
Static Functions | |
static bool | IsVisible () |
static void | Show (bool doIt) |
static bool | IsLocked () |
static void | Lock (bool) |
static void | AddCommand (const std::string &name, Interpreter::Command *command) |
static uint32_t | GetNumLines () |
static std::string | GetLine (uint32_t i) |
static void | Clear () |
static void | OverlayMessageMode (MessageMode) |
static MessageMode | GetOverlayMessageMode () |
static void | SetCommandCallback (DynacoeEvent((*))) |
Special streams | |
static ConsoleStream | System () |
static ConsoleStream | Info () |
static ConsoleStream | Error () |
static ConsoleStream | Warning () |
Static Properties | |
static const char * | End |
Member Enumeration Documentation
|
strong |
Types of message postings.
Enumerator | |
---|---|
Standard |
Every console line added results in a message that briefly appears on screen. This is the default. |
Disabled |
Console output is only added to the console log. |
Member Function Documentation
|
static |
Returns whether or not the console is showing.
|
static |
Activates/deactivates the console.
- Parameters
-
doIt If true, the console will be shown. If false, the console will be hidden.
|
static |
Returns whether or not console has been locked.
When the console is locked, the console may not be toggled.
|
static |
Locks the console.
- Parameters
-
lock If true, Show() will no longer have an effect. Calling the function again with false re-enables the toggling.
|
static |
Adds an additional command to be recognized by the interactive interpreter.
- Parameters
-
name The base name of the command. command The actual command logic.
|
static |
Returns the number of lines of output currently held by the console.
|
static |
Returns the i'th most recent message, where 0 is the earliest line and GetNumLines()-1 is the most recent line.
- Parameters
-
i The line to retrieve.
|
static |
Clears all recorded messages in the Console.
|
static |
Sets the mode by which to display incoming Console messages.
|
static |
Returns the current message mode. MessageMode::Standard is the default.
|
static |
Sets a callback to be run for all user-entered commands, regardless of command issued. Whether to process the command normally is returned.
If specified, the console, before normally processing the command, will call this function first to determine whether to continue. The compiled input string is given as the first argument of args. If the callback returns false, no further action is taken.
Field Documentation
|
static |
Marks the ending of the line.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Modules/Console.h