1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/undoableCommand.h"
2#ifndef _undoableCommand
3#define _undoableCommand
18#include <initializer_list>
39 typedef std::shared_ptr<UndoableCommand>
Ptr;
81 static std::shared_ptr<CompositeUndoableCommand>
create(
82 std::initializer_list<Ptr> undoableCommands
84 static std::shared_ptr<CompositeUndoableCommand>
create(
85 const std::list<Ptr>& undoableCommands
87 static std::shared_ptr<CompositeUndoableCommand>
create(
88 const Ptr& undoableCommand
133 typedef std::shared_ptr<InsertChildCommand>
Ptr;
157 typedef std::shared_ptr<SceneItemResultUndoableCommand>
Ptr;
179 typedef std::shared_ptr<ConnectionResultUndoableCommand>
Ptr;
204 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()
Constructors.
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
Destructor.
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.