6 using namespace operation;
18 _stack.push_back(operation);
25 auto ec =
document()->entityContainer();
29 auto org = ec.entityByID(entity->id());
31 if (org.get() !=
nullptr) {
42 for (
auto entity : _workingBuffer) {
72 std::vector<entity::CADEntity_CSPtr> entitySet;
74 for (
auto it =
_stack.begin(); it !=
_stack.end(); ++it) {
76 std::vector<Base_SPtr> stack(
_stack.begin(), it);
Document_SPtr document() const
std::vector< entity::CADEntity_CSPtr > _workingBuffer
EntityBuilder(Document_SPtr document)
Builder constructor.
std::vector< entity::CADEntity_CSPtr > _entitiesThatNeedsRemoval
std::vector< entity::CADEntity_CSPtr > _entitiesThatWhereUpdated
EntityBuilder * appendOperation(Base_SPtr operation)
Append operation to the stack.
EntityBuilder * appendEntity(entity::CADEntity_CSPtr cadEntity)
append entity to the stack
std::vector< Base_SPtr > _stack
virtual void processInternal()
virtual void redo() const
Redo a given operation.
virtual void undo() const
Undo a given operation.
void processStack()
Apply the operations Apply operations on the entities without updating the document, and clear the stack.