Open 3D Engine AzToolsFramework 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.
AzToolsFramework::UndoSystem::URSequencePoint Class Referenceabstract

Inherited by AzToolsFramework::BaseSliceCommand, AzToolsFramework::ClearSliceDataFlagsBelowAddressCommand, AzToolsFramework::ComponentModeFramework::ComponentModeCommand, AzToolsFramework::EntityManipulatorCommand, AzToolsFramework::EntityStateCommand, AzToolsFramework::Prefab::PrefabFocusUndo, AzToolsFramework::Prefab::PrefabUndoBase, AzToolsFramework::Prefab::PrefabUndoComponentPropertyOverride, AzToolsFramework::Prefab::PrefabUndoEntityOverrides, AzToolsFramework::Prefab::PrefabUndoRevertOverrides, AzToolsFramework::SelectionCommand, AzToolsFramework::SliceDataFlagsCommand, and AzToolsFramework::UndoSystem::BatchCommand.

Public Types

typedef AZStd::vector< URSequencePoint * > ChildVec
 
typedef AZStd::function< void(URSequencePoint *) > ApplyOperationCB
 

Public Member Functions

 URSequencePoint (const AZStd::string &friendlyName, URCommandID id=0)
 
 URSequencePoint (URCommandID id)
 
virtual ~URSequencePoint ()
 
void RunUndo ()
 
void RunRedo ()
 
virtual void Undo ()
 
virtual void Redo ()
 
virtual bool Changed () const =0
 
URSequencePointFind (URCommandID id, const AZ::Uuid &typeOfCommand)
 
void SetName (const AZStd::string &friendlyName)
 
AZStd::string & GetName ()
 
void SetParent (URSequencePoint *parent)
 
URSequencePointGetParent () const
 
const ChildVec & GetChildren () const
 
bool HasRealChildren () const
 
void ApplyToTree (const ApplyOperationCB &applyCB)
 
bool IsPosted () const
 
bool operator== (const URCommandID id) const
 
bool operator== (const URSequencePoint *com) const
 

Public Attributes

friend UndoStack
 

Protected Member Functions

void AddChild (URSequencePoint *)
 
void RemoveChild (URSequencePoint *)
 

Protected Attributes

AZStd::string m_friendlyName
 
URCommandID m_id
 
ChildVec m_children
 
URSequencePointm_parent
 
bool m_isPosted
 

Member Typedef Documentation

◆ ApplyOperationCB

        Usage: pass a function callback that eats a URSequencePoint*
        this walks the child tree and applies the callback to each URSequencePoint

example commandPtr->ApplyToTree( AZStd::bind(&MyClass::DoSomethingWithCommandPtr, this, AZStd::placeholders::_1) );

Constructor & Destructor Documentation

◆ URSequencePoint() [1/2]

AzToolsFramework::UndoSystem::URSequencePoint::URSequencePoint ( const AZStd::string &  friendlyName,
URCommandID  id = 0 
)
explicit

Usage: construct a standalone command which can both implement undo+redo and have children commands

◆ URSequencePoint() [2/2]

AzToolsFramework::UndoSystem::URSequencePoint::URSequencePoint ( URCommandID  id)
explicit

Usage: construct a child command which can both implement undo+redo and have children commands plus automatically create a friendly child name and append to the parent's children NB: Parent takes ownership of the allocation

◆ ~URSequencePoint()

virtual AzToolsFramework::UndoSystem::URSequencePoint::~URSequencePoint ( )
virtual

Usage: base implementation automatically deletes all children recursively therefore only a topmost parent needs to be deleted from outside

Member Function Documentation

◆ Changed()

◆ Find()

URSequencePoint * AzToolsFramework::UndoSystem::URSequencePoint::Find ( URCommandID  id,
const AZ::Uuid &  typeOfCommand 
)

Usage: return the first command in the parent/child tree with a matching id returns NULL on failure to make any match

◆ Undo()


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