3#include "Engine/UndoRedo/UndoCommand.h"
18 commands_.push_back(std::move(command));
22 bool isEmpty()
const {
return commands_.empty(); }
26 for (
auto it = commands_.rbegin(); it != commands_.rend(); ++it)
34 for (
auto& command : commands_)
40 UndoCommandType type()
const override {
return UndoCommandType::UndoGroup; }
43 std::vector<std::unique_ptr<UndoCommand>> commands_;
Definition UndoCommand.h:8
Bundles several commands into a single atomic undo unit.
Definition UndoGroup.h:11
bool isEmpty() const
Returns true when the group holds no commands.
Definition UndoGroup.h:22
void addCommand(std::unique_ptr< UndoCommand > command)
Appends a command to the group, taking ownership.
Definition UndoGroup.h:16