#include <IConsole.h>
Inherited by AZ::Console.
Public Types | |
using | FunctorVisitor = AZStd::function< void(ConsoleFunctorBase *)> |
using | ConsoleCommandRegisteredEvent = AZ::Event< ConsoleFunctorBase * > |
Returns the AZ::Event<> invoked whenever a console command is registered. | |
Public Member Functions | |
AZ_RTTI (IConsole, "{20001930-119D-4A80-BD67-825B7E4AEB3D}") | |
virtual PerformCommandResult | PerformCommand (const char *command, ConsoleSilentMode silentMode=ConsoleSilentMode::NotSilent, ConsoleInvokedFrom invokedFrom=ConsoleInvokedFrom::AzConsole, ConsoleFunctorFlags requiredSet=ConsoleFunctorFlags::Null, ConsoleFunctorFlags requiredClear=ConsoleFunctorFlags::ReadOnly)=0 |
virtual PerformCommandResult | PerformCommand (const ConsoleCommandContainer &commandAndArgs, ConsoleSilentMode silentMode=ConsoleSilentMode::NotSilent, ConsoleInvokedFrom invokedFrom=ConsoleInvokedFrom::AzConsole, ConsoleFunctorFlags requiredSet=ConsoleFunctorFlags::Null, ConsoleFunctorFlags requiredClear=ConsoleFunctorFlags::ReadOnly)=0 |
virtual PerformCommandResult | PerformCommand (AZStd::string_view command, const ConsoleCommandContainer &commandArgs, ConsoleSilentMode silentMode=ConsoleSilentMode::NotSilent, ConsoleInvokedFrom invokedFrom=ConsoleInvokedFrom::AzConsole, ConsoleFunctorFlags requiredSet=ConsoleFunctorFlags::Null, ConsoleFunctorFlags requiredClear=ConsoleFunctorFlags::ReadOnly)=0 |
virtual void | ExecuteConfigFile (AZStd::string_view configFileName)=0 |
virtual void | ExecuteCommandLine (const AZ::CommandLine &commandLine)=0 |
virtual bool | ExecuteDeferredConsoleCommands ()=0 |
virtual void | ClearDeferredConsoleCommands ()=0 |
Clear out any deferred console commands queue. | |
virtual bool | HasCommand (AZStd::string_view command, ConsoleFunctorFlags ignoreAnyFlags=ConsoleFunctorFlags::IsInvisible)=0 |
virtual ConsoleFunctorBase * | FindCommand (AZStd::string_view command, ConsoleFunctorFlags ignoreAnyFlags=ConsoleFunctorFlags::IsInvisible)=0 |
virtual AZStd::string | AutoCompleteCommand (AZStd::string_view command, AZStd::vector< AZStd::string > *matches=nullptr)=0 |
template<typename RETURN_TYPE > | |
GetValueResult | GetCvarValue (AZStd::string_view command, RETURN_TYPE &outValue) |
virtual void | VisitRegisteredFunctors (const FunctorVisitor &visitor)=0 |
virtual void | RegisterFunctor (ConsoleFunctorBase *functor)=0 |
virtual void | UnregisterFunctor (ConsoleFunctorBase *functor)=0 |
virtual void | LinkDeferredFunctors (ConsoleFunctorBase *&deferredHead)=0 |
ConsoleCommandRegisteredEvent & | GetConsoleCommandRegisteredEvent () |
ConsoleCommandInvokedEvent & | GetConsoleCommandInvokedEvent () |
Returns the AZ::Event<> invoked whenever a console command is executed. | |
DispatchCommandNotFoundEvent & | GetDispatchCommandNotFoundEvent () |
Returns the AZ::Event<> invoked whenever a console command could not be found. | |
virtual void | RegisterCommandInvokerWithSettingsRegistry (AZ::SettingsRegistryInterface &settingsRegistry)=0 |
AZ_DISABLE_COPY_MOVE (IConsole) | |
Static Public Attributes | |
static constexpr AZStd::string_view | ConsoleRuntimeCommandKey = "/Amazon/AzCore/Runtime/ConsoleCommands" |
static constexpr AZStd::string_view | ConsoleAutoexecCommandKey = "/O3DE/Autoexec/ConsoleCommands" |
Protected Attributes | |
ConsoleCommandRegisteredEvent | m_consoleCommandRegisteredEvent |
ConsoleCommandInvokedEvent | m_consoleCommandInvokedEvent |
DispatchCommandNotFoundEvent | m_dispatchCommandNotFoundEvent |
A simple console class for providing text based variable and process interaction.
|
pure virtual |
Finds all commands where the input command is a prefix and returns the longest matching substring prefix the results have in common.
command | The prefix string to find all matching commands for. |
matches | The list of all commands that match the input prefix. |
Implemented in AZ::Console.
|
pure virtual |
Clear out any deferred console commands queue.
Implemented in AZ::Console.
|
pure virtual |
Invokes all of the commands as contained in a concatenated command-line string.
commandLine | the concatenated command-line string to execute |
Implemented in AZ::Console.
|
pure virtual |
Loads and executes the specified config file.
configFileName | the filename of the config file to load and execute |
Implemented in AZ::Console.
|
pure virtual |
Attempts to invoke a "deferred console command", which is a console command that has failed to execute previously due to the command not being registered yet.
Implemented in AZ::Console.
|
pure virtual |
FindCommand finds the console command with the specified console string.
command | the command that is being searched for |
Implemented in AZ::Console.
|
inline |
Retrieves the value of the requested cvar.
command | the name of the cvar to find and retrieve the current value of |
outValue | reference to the instance to write the current cvar value to |
|
pure virtual |
HasCommand is used to determine if the console knows about a command.
command | the command we are checking for |
Implemented in AZ::Console.
|
pure virtual |
Should be invoked for every module that gets loaded.
pointer | to the modules set of ConsoleFunctors to register |
Implemented in AZ::Console.
|
pure virtual |
Invokes a single console command, optionally returning the command output.
command | the command to execute |
commandArgs | the arguments to the command to execute |
silentMode | if true, logs will be suppressed during command execution |
invokedFrom | the source point that initiated console invocation |
requiredSet | a set of flags that must be set on the functor for it to execute |
requiredClear | a set of flags that must NOT be set on the functor for it to execute |
Implemented in AZ::Console.
|
pure virtual |
Invokes a single console command, optionally returning the command output.
command | the command string to parse and execute on |
silentMode | if true, logs will be suppressed during command execution |
invokedFrom | the source point that initiated console invocation |
requiredSet | a set of flags that must be set on the functor for it to execute |
requiredClear | a set of flags that must NOT be set on the functor for it to execute |
Implemented in AZ::Console.
|
pure virtual |
Invokes a single console command, optionally returning the command output.
commandAndArgs | list of command and command arguments to execute. The first argument is the command itself |
silentMode | if true, logs will be suppressed during command execution |
invokedFrom | the source point that initiated console invocation |
requiredSet | a set of flags that must be set on the functor for it to execute |
requiredClear | a set of flags that must NOT be set on the functor for it to execute |
Implemented in AZ::Console.
|
pure virtual |
Register a notification event handler with the Settings Registry That is responsible for updating console commands whenever a key is found underneath the "/Amazon/AzCore/Runtime/ConsoleCommands" JSON entry
Settings | Registry reference to register notifier with |
Implemented in AZ::Console.
|
pure virtual |
Registers a ConsoleFunctor with the console instance.
functor | pointer to the ConsoleFunctor to register |
Implemented in AZ::Console.
|
pure virtual |
Unregisters a ConsoleFunctor with the console instance.
functor | pointer to the ConsoleFunctor to unregister |
Implemented in AZ::Console.
|
pure virtual |
Visits all registered console functors.
visitor | the instance to visit all functors with |
Implemented in AZ::Console.