Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
CommandSystem::CommandManager Class Reference

Inherits MCore::CommandManager.

Public Member Functions

 CommandManager ()
 
 ~CommandManager ()
 
MCORE_INLINE SelectionListGetCurrentSelection ()
 
MCORE_INLINE void SetCurrentSelection (SelectionList &selection)
 
MCORE_INLINE bool GetLockSelection () const
 
void SetLockSelection (bool lockSelection)
 
void SetWorkspaceDirtyFlag (bool dirty)
 
MCORE_INLINE bool GetWorkspaceDirtyFlag () const
 
void SetUserOpenedWorkspaceFlag (bool flag)
 
bool GetUserOpenedWorkspaceFlag () const
 
- Public Member Functions inherited from MCore::CommandManager
 CommandManager ()
 
virtual ~CommandManager ()
 
bool ExecuteCommand (const char *command, AZStd::string &outCommandResult, bool addToHistory=true, Command **outExecutedCommand=nullptr, CommandLine *outExecutedParamters=nullptr, bool callFromCommandGroup=false, bool clearErrors=true, bool handleErrors=true)
 
bool ExecuteCommand (const AZStd::string &command, AZStd::string &outCommandResult, bool addToHistory=true, Command **outExecutedCommand=nullptr, CommandLine *outExecutedParamters=nullptr, bool callFromCommandGroup=false, bool clearErrors=true, bool handleErrors=true)
 
bool ExecuteCommand (Command *command, AZStd::string &outCommandResult, bool addToHistory=true, bool clearErrors=true, bool handleErrors=true, bool autoDeleteCommand=true)
 
bool ExecuteCommandInsideCommand (const char *command, AZStd::string &outCommandResult)
 
bool ExecuteCommandInsideCommand (const AZStd::string &command, AZStd::string &outCommandResult)
 
bool ExecuteCommandInsideCommand (Command *command, AZStd::string &outCommandResult)
 
bool ExecuteCommandOrAddToGroup (const AZStd::string &command, MCore::CommandGroup *commandGroup=nullptr, bool executeInsideCommand=false)
 
bool ExecuteCommandOrAddToGroup (Command *command, MCore::CommandGroup *commandGroup=nullptr, bool executeInsideCommand=false)
 
bool ExecuteCommandGroup (CommandGroup &commandGroup, AZStd::string &outCommandResult, bool addToHistory=true, bool clearErrors=true, bool handleErrors=true)
 
bool ExecuteCommandGroupInsideCommand (CommandGroup &commandGroup, AZStd::string &outCommandResult)
 
bool Undo (AZStd::string &outCommandResult)
 
bool Redo (AZStd::string &outCommandResult)
 
bool RegisterCommand (Command *command)
 
void LogCommandHistory ()
 
CommandFindCommand (const AZStd::string &commandName)
 
void RemoveCallbacks ()
 
void RegisterCallback (CommandManagerCallback *callback)
 
void RemoveCallback (CommandManagerCallback *callback, bool delFromMem=true)
 
size_t GetNumCallbacks () const
 
CommandManagerCallbackGetCallback (size_t index)
 
void SetMaxHistoryItems (size_t maxItems)
 
size_t GetMaxHistoryItems () const
 
ptrdiff_t GetHistoryIndex () const
 
size_t GetNumHistoryItems () const
 
const CommandHistoryEntryGetHistoryItem (size_t index) const
 
CommandGetHistoryCommand (size_t historyIndex)
 
void ClearHistory ()
 
const CommandLineGetHistoryCommandLine (size_t historyIndex) const
 
size_t GetNumRegisteredCommands () const
 
CommandGetCommand (size_t index)
 
void RemoveCommandCallback (Command::Callback *callback, bool delFromMem)
 
void RemoveCommandCallback (const char *commandName, Command::Callback *callback, bool delFromMem)
 
bool RegisterCommandCallback (const char *commandName, Command::Callback *callback)
 
template<typename T , typename... Args>
bool RegisterCommandCallback (const char *commandName, AZStd::vector< Command::Callback * > &callbacks, Args... args)
 
MCORE_INLINE void AddError (const char *errorLine)
 
MCORE_INLINE void AddError (const AZStd::string &errorLine)
 
bool ShowErrorReport ()
 
bool IsExecuting () const
 

Additional Inherited Members

- Protected Member Functions inherited from MCore::CommandManager
bool ExecuteCommand (Command *command, const CommandLine &commandLine, AZStd::string &outCommandResult, bool addToHistory, bool callFromCommandGroup, bool clearErrors, bool handleErrors, bool autoDeleteCommand)
 
bool ShouldDeleteCommand (Command *commandObject, bool commandExecutionResult, bool callFromCommandGroup, bool addToHistory)
 
void PushCommandHistory (Command *command, const CommandLine &parameters)
 
void PushCommandHistory (CommandGroup *commandGroup)
 
void PopCommandHistory ()
 
void ExecuteUndoCallbacks (Command *command, const CommandLine &parameters, bool preUndo)
 
void ExecuteCommandCallbacks (Command *command, const CommandLine &parameters, bool preCommand)
 
- Protected Attributes inherited from MCore::CommandManager
AZStd::unordered_map< AZStd::string, Command * > m_registeredCommands
 
AZStd::vector< CommandHistoryEntrym_commandHistory
 
AZStd::vector< CommandManagerCallback * > m_callbacks
 
AZStd::vector< AZStd::string > m_errors
 
AZStd::vector< Command * > m_commands
 
size_t m_maxHistoryEntries
 
ptrdiff_t m_historyIndex
 
size_t m_totalNumHistoryItems
 
int m_commandsInExecution
 

Constructor & Destructor Documentation

◆ CommandManager()

CommandSystem::CommandManager::CommandManager ( )

Default constructor.

◆ ~CommandManager()

CommandSystem::CommandManager::~CommandManager ( )
virtual

Destructor.

Reimplemented from MCore::CommandManager.

Member Function Documentation

◆ GetCurrentSelection()

MCORE_INLINE SelectionList & CommandSystem::CommandManager::GetCurrentSelection ( )
inline

Get current selection.

Returns
The selection list containing all selected actors, motions and nodes.

◆ SetCurrentSelection()

MCORE_INLINE void CommandSystem::CommandManager::SetCurrentSelection ( SelectionList selection)
inline

Set current selection.

Parameters
selectionThe selection list containing all selected actors, motions and nodes.

The documentation for this class was generated from the following file: