20#ifndef SDFORMAT_EDITOR_ADD_ELEMENT_COMMAND_HH_
21#define SDFORMAT_EDITOR_ADD_ELEMENT_COMMAND_HH_
24#include <interfaces/command_interface.h>
25#include <interfaces/sdformat_parser_interface.h>
26#include <interfaces/gui_interface.h>
44 private:
bool Execute()
override;
66 private:
bool IsThreaded(
bool& prevent_user_input)
override;
73 private:
void AddElement(sdf::ElementPtr parent, sdf::ElementPtr element);
76 private: std::shared_ptr<GUII>
gui;
Add Element command implementation of CommandI.
Definition AddElementCommand.h:32
bool ChangesProgramStateIrreversibly() override
Implementation of interface method.
Definition AddElementCommand.cpp:107
std::shared_ptr< SDFormatParserI > sdformatParser
Pointer to the sdformat parser interface.
Definition AddElementCommand.h:79
bool IsUndoable() override
Implementation of interface method.
Definition AddElementCommand.cpp:91
std::shared_ptr< GUII > gui
Pointer to the gui interface.
Definition AddElementCommand.h:76
void AddElement(sdf::ElementPtr parent, sdf::ElementPtr element)
Internal function to add element.
Definition AddElementCommand.cpp:53
bool Execute() override
Implementation of interface method.
Definition AddElementCommand.cpp:33
bool IsThreaded(bool &prevent_user_input) override
Implementation of interface method.
Definition AddElementCommand.cpp:101
bool ExecuteRedo() override
Implementation of interface method.
Definition AddElementCommand.cpp:79
bool IsRedoable() override
Implementation of interface method.
Definition AddElementCommand.cpp:96
bool is_currently_redoable
Store if the command is currently redo-able.
Definition AddElementCommand.h:91
sdf::ElementPtr new_element
Pointer to the added element.
Definition AddElementCommand.h:85
bool ExecuteUndo() override
Implementation of interface method.
Definition AddElementCommand.cpp:68
bool is_currently_undoable
Store if the command is currently undo-able.
Definition AddElementCommand.h:88
sdf::ElementPtr parent_element
Pointer to the parent of the element that may be added.
Definition AddElementCommand.h:82
The command class encapsulates the interactions between the various interfaces of the SDFormat Editor...
Definition command_interface.h:29