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.
MCore::Command::Callback Class Referenceabstract

#include <Command.h>

Inherited by EMotionFX::PhysicsSetupManipulatorCommandCallback.

Public Member Functions

 Callback (bool executePreUndo, bool executePreCommand=false)
 
virtual ~Callback ()
 
virtual bool Execute (MCore::Command *command, const MCore::CommandLine &commandLine)=0
 
virtual bool Undo (MCore::Command *command, const MCore::CommandLine &commandLine)=0
 
MCORE_INLINE bool GetExecutePreCommand () const
 
MCORE_INLINE bool GetExecutePreUndo () const
 

Detailed Description

The command callback base class. The callbacks get executed when executing a command, or when undoing a command. You could for example link your 3D engine to loading of some 3D mesh command (outside of your engine), where the callback would convert this data into an object inside your 3D engine.

Constructor & Destructor Documentation

◆ Callback()

MCore::Command::Callback::Callback ( bool  executePreUndo,
bool  executePreCommand = false 
)

The destructor.

Parameters
executePreUndoFlag which controls if the callback gets executed before the undo (true) or after it (false).
executePreCommandFlag which controls if the callback gets executed before the command (true) or after it (false).

◆ ~Callback()

virtual MCore::Command::Callback::~Callback ( )
virtual

The destructor.

Member Function Documentation

◆ Execute()

virtual bool MCore::Command::Callback::Execute ( MCore::Command command,
const MCore::CommandLine commandLine 
)
pure virtual

Execute the callback. Command callbacks are executed before/after executing the real command where this callback is linked to.

Parameters
commandThe command where this callback belongs to.
commandLineThe command line used when executing the command.
Returns
Returns true when the command callback executed without problems, otherwise false is returned.

Implemented in EMotionFX::PhysicsSetupManipulatorCommandCallback.

◆ GetExecutePreCommand()

MCORE_INLINE bool MCore::Command::Callback::GetExecutePreCommand ( ) const
inline

Get the flag which controls if the callback gets executed before the command or after it.

Returns
True in case the callback gets called before the command, false when it gets called afterwards.

◆ GetExecutePreUndo()

MCORE_INLINE bool MCore::Command::Callback::GetExecutePreUndo ( ) const
inline

Get the flag which controls if the callback gets executed before undo or after it.

Returns
True in case the callback gets called before undo, false when it gets called afterwards.

◆ Undo()

virtual bool MCore::Command::Callback::Undo ( MCore::Command command,
const MCore::CommandLine commandLine 
)
pure virtual

Execute the undo of this callback. The undo is executed before/after executing the undo of the actual command where this callback is linked to.

Parameters
commandThe command where this callback belongs to.
commandLineThe command line used when executing the command.
Returns
Returns true when the command callback undo executed without problems, otherwise false is returned.

Implemented in EMotionFX::PhysicsSetupManipulatorCommandCallback.


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