3#include <Core/Console/ConsoleFunction.h>
4#include <Foundation/Communication/Event.h>
5#include <Foundation/Configuration/CVar.h>
6#include <Foundation/Containers/Deque.h>
7#include <Foundation/Containers/Map.h>
8#include <Foundation/Containers/StaticArray.h>
9#include <Foundation/Strings/StringBuilder.h>
10#include <Foundation/Threading/Mutex.h>
11#include <Foundation/Types/RefCounted.h>
12#include <Foundation/Types/SharedPtr.h>
16 enum class Type : plUInt8
31 Type m_Type = Type::Default;
35 bool operator<(
const plConsoleString& rhs)
const {
return m_sText < rhs.m_sText; }
43 void AddOutputLine(
const plFormatString& text, plConsoleString::Type type = plConsoleString::Type::Default);
103 static void SetMainConsole(
plConsole* pConsole);
149 virtual void AddConsoleString(
plStringView sText, plConsoleString::Type type = plConsoleString::Type::Default);
166 void RetrieveInputHistory(plInt32 iHistoryUp,
plStringBuilder& ref_sResult);
175 plInt32 m_iCurrentInputHistoryElement = -1;
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
plEvent< const plConsoleEvent & > m_Events
The console event variable, to attach to.
Definition Console.h:92
const plSharedPtr< plCommandInterpreter > & GetCommandInterpreter() const
Returns the currently used command interpreter.
Definition Console.h:124
void SetCommandInterpreter(const plSharedPtr< plCommandInterpreter > &pInterpreter)
Replaces the current command interpreter.
Definition Console.h:121
const plEvent< const plConsoleEvent & > & Events() const
Grants access to subscribe and unsubscribe from console events.
Definition Console.h:88
plMutex & GetMutex() const
Returns the mutex that's used to prevent multi-threaded access.
Definition Console.h:101
const plStaticArray< plString, 16 > & GetInputHistory() const
Returns the current input history.
Definition Console.h:163
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
Base class for reference counted objects.
Definition RefCounted.h:52
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
Wraps a C-style array, which has a fixed size at compile-time, with a more convenient interface.
Definition StaticArray.h:13
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
The event data that is broadcast by the console.
Definition Console.h:65
const plConsoleString * m_AddedpConsoleString
The console string that was just added.
Definition Console.h:74
Type
Definition Console.h:67
@ OutputLineAdded
A string was added to the console.
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54