32 const std::shared_ptr<std::vector<controller::OperationPtr>>& operations) :
33 operations(operations)
37std::shared_ptr<std::vector<controller::OperationPtr>>
43std::shared_ptr<std::vector<controller::OperationPtr>>
46 std::shared_ptr<std::vector<controller::OperationPtr>> inverted(
47 new std::vector<controller::OperationPtr>());
49 for (std::vector<controller::OperationPtr>::reverse_iterator it = operations->rbegin();
50 it != operations->rend();
53 inverted->push_back(it->get()->createInverseOperation());
59const std::shared_ptr<std::vector<controller::OperationPtr>>
std::shared_ptr< std::vector< OperationPtr > > redo()
Returns all Operations needed to redo this Action.
UndoAction(const std::shared_ptr< std::vector< OperationPtr > > &operations)
A Constructor.
std::shared_ptr< std::vector< OperationPtr > > undo()
Returns all Operations needed to undo this Action.
const std::shared_ptr< std::vector< OperationPtr > > getOperations() const
Returns all Operations saved in this class.