Open 3D Engine AzCore API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <Console.h>
Inherits AZ::IConsole.
Public Member Functions | |
AZ_RTTI (Console, "{CF6DCDE7-1A66-442C-BA87-01A432C13E7D}", IConsole) | |
AZ_CLASS_ALLOCATOR (Console, AZ::OSAllocator) | |
Console (AZ::SettingsRegistryInterface &settingsRegistry) | |
PerformCommandResult | PerformCommand (const char *command, ConsoleSilentMode silentMode=ConsoleSilentMode::NotSilent, ConsoleInvokedFrom invokedFrom=ConsoleInvokedFrom::AzConsole, ConsoleFunctorFlags requiredSet=ConsoleFunctorFlags::Null, ConsoleFunctorFlags requiredClear=ConsoleFunctorFlags::ReadOnly) override |
PerformCommandResult | PerformCommand (const ConsoleCommandContainer &commandAndArgs, ConsoleSilentMode silentMode=ConsoleSilentMode::NotSilent, ConsoleInvokedFrom invokedFrom=ConsoleInvokedFrom::AzConsole, ConsoleFunctorFlags requiredSet=ConsoleFunctorFlags::Null, ConsoleFunctorFlags requiredClear=ConsoleFunctorFlags::ReadOnly) override |
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) override |
void | ExecuteConfigFile (AZStd::string_view configFileName) override |
void | ExecuteCommandLine (const AZ::CommandLine &commandLine) override |
bool | ExecuteDeferredConsoleCommands () override |
void | ClearDeferredConsoleCommands () override |
Clear out any deferred console commands queue. | |
bool | HasCommand (AZStd::string_view command, ConsoleFunctorFlags ignoreAnyFlags=ConsoleFunctorFlags::IsInvisible) override |
ConsoleFunctorBase * | FindCommand (AZStd::string_view command, ConsoleFunctorFlags ignoreAnyFlags=ConsoleFunctorFlags::IsInvisible) override |
AZStd::string | AutoCompleteCommand (AZStd::string_view command, AZStd::vector< AZStd::string > *matches=nullptr) override |
void | VisitRegisteredFunctors (const FunctorVisitor &visitor) override |
void | RegisterFunctor (ConsoleFunctorBase *functor) override |
void | UnregisterFunctor (ConsoleFunctorBase *functor) override |
void | LinkDeferredFunctors (ConsoleFunctorBase *&deferredHead) override |
void | RegisterCommandInvokerWithSettingsRegistry (AZ::SettingsRegistryInterface &settingsRegistry) override |
Public Member Functions inherited from AZ::IConsole | |
AZ_RTTI (IConsole, "{20001930-119D-4A80-BD67-825B7E4AEB3D}") | |
template<typename RETURN_TYPE > | |
GetValueResult | GetCvarValue (AZStd::string_view command, RETURN_TYPE &outValue) |
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. | |
AZ_DISABLE_COPY_MOVE (IConsole) | |
Friends | |
struct | ConsoleCommandKeyNotificationHandler |
class | ConsoleFunctorBase |
Additional Inherited Members | |
Public Types inherited from AZ::IConsole | |
using | FunctorVisitor = AZStd::function< void(ConsoleFunctorBase *)> |
using | ConsoleCommandRegisteredEvent = AZ::Event< ConsoleFunctorBase * > |
Returns the AZ::Event<> invoked whenever a console command is registered. | |
Static Public Attributes inherited from AZ::IConsole | |
static constexpr AZStd::string_view | ConsoleRuntimeCommandKey = "/Amazon/AzCore/Runtime/ConsoleCommands" |
static constexpr AZStd::string_view | ConsoleAutoexecCommandKey = "/O3DE/Autoexec/ConsoleCommands" |
Protected Attributes inherited from AZ::IConsole | |
ConsoleCommandRegisteredEvent | m_consoleCommandRegisteredEvent |
ConsoleCommandInvokedEvent | m_consoleCommandInvokedEvent |
DispatchCommandNotFoundEvent | m_dispatchCommandNotFoundEvent |
A simple console class for providing text based variable and process interaction.
|
explicit |
Constructor overload which registers a notifier with the Settings Registry that will execute a console command whenever a key is set under the AZ::IConsole::ConsoleCommandRootKey JSON object
|
overridevirtual |
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. |
Implements AZ::IConsole.
|
overridevirtual |
Invokes all of the commands as contained in a concatenated command-line string.
commandLine | the concatenated command-line string to execute |
Implements AZ::IConsole.
|
overridevirtual |
Loads and executes the specified config file.
configFileName | the filename of the config file to load and execute |
Implements AZ::IConsole.
|
overridevirtual |
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.
Implements AZ::IConsole.
|
overridevirtual |
FindCommand finds the console command with the specified console string.
command | the command that is being searched for |
Implements AZ::IConsole.
|
overridevirtual |
HasCommand is used to determine if the console knows about a command.
command | the command we are checking for |
Implements AZ::IConsole.
|
overridevirtual |
Should be invoked for every module that gets loaded.
pointer | to the modules set of ConsoleFunctors to register |
Implements AZ::IConsole.
|
overridevirtual |
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 |
Implements AZ::IConsole.
|
overridevirtual |
IConsole interface
Implements AZ::IConsole.
|
overridevirtual |
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 |
Implements AZ::IConsole.
|
overridevirtual |
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 |
Implements AZ::IConsole.
|
overridevirtual |
Registers a ConsoleFunctor with the console instance.
functor | pointer to the ConsoleFunctor to register |
Implements AZ::IConsole.
|
overridevirtual |
Unregisters a ConsoleFunctor with the console instance.
functor | pointer to the ConsoleFunctor to unregister |
Implements AZ::IConsole.
|
overridevirtual |
Visits all registered console functors.
visitor | the instance to visit all functors with |
Implements AZ::IConsole.