UndoAction Class Reference

A container class to store multiple Operations and undo/redo them. More...

#include <MemoryX/gui-plugins/SceneEditor/controller/UndoAction.h>

Public Member Functions

const std::shared_ptr< std::vector< OperationPtr > > getOperations () const
 Returns all Operations saved in this class. More...
 
std::shared_ptr< std::vector< OperationPtr > > redo ()
 Returns all Operations needed to redo this Action. More...
 
std::shared_ptr< std::vector< OperationPtr > > undo ()
 Returns all Operations needed to undo this Action. More...
 
 UndoAction (const std::shared_ptr< std::vector< OperationPtr > > &operations)
 A Constructor. More...
 

Detailed Description

A container class to store multiple Operations and undo/redo them.

See also
controller::Operation

Definition at line 42 of file UndoAction.h.

Constructor & Destructor Documentation

◆ UndoAction()

UndoAction ( const std::shared_ptr< std::vector< OperationPtr > > &  operations)

A Constructor.

Creates a new UndoAction containing multiple Operations.

Parameters
operationsThe operations, the new instance should contain.
See also
controller::Operation

Definition at line 31 of file UndoAction.cpp.

Member Function Documentation

◆ getOperations()

const std::shared_ptr< std::vector< controller::OperationPtr > > getOperations ( ) const

Returns all Operations saved in this class.

Returns
the operations

Definition at line 53 of file UndoAction.cpp.

◆ redo()

std::shared_ptr< std::vector< controller::OperationPtr > > redo ( )

Returns all Operations needed to redo this Action.

Definition at line 36 of file UndoAction.cpp.

◆ undo()

std::shared_ptr< std::vector< controller::OperationPtr > > undo ( )

Returns all Operations needed to undo this Action.

Definition at line 41 of file UndoAction.cpp.


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