1#line 1 "D:/Jenkins/workspace/EMS/ECG/ufe/full/ufe-full-python3.13-windows/ufe/include/undoableCommand.h"
2#ifndef UFE_UNDOABLECOMMAND_H
3#define UFE_UNDOABLECOMMAND_H
19#include <initializer_list>
40 typedef std::shared_ptr<UndoableCommand>
Ptr;
82 static std::shared_ptr<CompositeUndoableCommand>
create(
83 std::initializer_list<Ptr> undoableCommands
85 static std::shared_ptr<CompositeUndoableCommand>
create(
86 const std::list<Ptr>& undoableCommands
88 static std::shared_ptr<CompositeUndoableCommand>
create(
89 const Ptr& undoableCommand
134 typedef std::shared_ptr<InsertChildCommand>
Ptr;
158 typedef std::shared_ptr<SceneItemResultUndoableCommand>
Ptr;
180 typedef std::shared_ptr<ConnectionResultUndoableCommand>
Ptr;
205 typedef std::shared_ptr<SelectionUndoableCommand>
Ptr;
Composite undoable command.
CompositeUndoableCommand(const CompositeUndoableCommand &)=delete
Deleting copy constructor.
CompositeUndoableCommand(const Ptr &undoableCommand)
static std::shared_ptr< CompositeUndoableCommand > create(const Ptr &undoableCommand)
void redo() override
Calls redo() on each command in the list, in forward order.
static std::shared_ptr< CompositeUndoableCommand > create(const std::list< Ptr > &undoableCommands)
void undo() override
Calls undo() on each command in the list, in reverse order.
CompositeUndoableCommand(const std::list< Ptr > &undoableCommands)
const CmdList & cmdsList() const
Returns the list of undoable commands.
static std::shared_ptr< CompositeUndoableCommand > create(std::initializer_list< Ptr > undoableCommands)
CompositeUndoableCommand()
void execute() override
Calls execute() on each command in the list, in forward order.
CompositeUndoableCommand(std::initializer_list< Ptr > undoableCommands)
void append(const Ptr &cmd)
Append the argument to the list of commands.
~CompositeUndoableCommand() override
Command that modifies the data model and produces either a new or modified Connection.
~ConnectionResultUndoableCommand() override
Destructor.
std::shared_ptr< ConnectionResultUndoableCommand > Ptr
virtual std::shared_ptr< Connection > connection() const =0
Pure virtual method to retrieve the resulting scene item.
ConnectionResultUndoableCommand()=default
Default constructor.
Command to change the parent of a scene item.
std::shared_ptr< InsertChildCommand > Ptr
InsertChildCommand()=default
Default constructor.
virtual SceneItem::Ptr insertedChild() const =0
Pure virtual method to retrieve the reparented scene item.
~InsertChildCommand() override
Destructor.
Identify an object or 3D path in the scene.
std::shared_ptr< SceneItem > Ptr
Command that modifies the data model and produces either a new or modified SceneItem.
~SceneItemResultUndoableCommand() override
Destructor.
SceneItemResultUndoableCommand()=default
Default constructor.
std::shared_ptr< SceneItemResultUndoableCommand > Ptr
virtual SceneItem::Ptr sceneItem() const =0
Pure virtual method to retrieve the resulting scene item.
Command that handles a selection.
SelectionUndoableCommand()=default
std::shared_ptr< SelectionUndoableCommand > Ptr
virtual SceneItem::Ptr targetItem(const Path &sourcePath) const =0
~SelectionUndoableCommand() override
Destructor.
Abstract base class for undoable commands.
virtual std::string commandString() const
Get a user friendly string representation of the command.
UndoableCommand()
Constructor.
std::shared_ptr< UndoableCommand > Ptr
UndoableCommand(const UndoableCommand &)=delete
Deleting copy constructor.
virtual ~UndoableCommand()
Destructor.
std::string string(const Path &path)
Definition of macros for symbol visibility.