Add Element command implementation of CommandI.
More...
#include <AddElementCommand.h>
|
| bool | Execute () override |
| | Implementation of interface method.
|
| |
| bool | ExecuteUndo () override |
| | Implementation of interface method.
|
| |
| bool | ExecuteRedo () override |
| | Implementation of interface method.
|
| |
| bool | IsUndoable () override |
| | Implementation of interface method.
|
| |
| bool | IsRedoable () override |
| | Implementation of interface method.
|
| |
| bool | IsThreaded (bool &prevent_user_input) override |
| | Implementation of interface method.
|
| |
| bool | ChangesProgramStateIrreversibly () override |
| | Implementation of interface method.
|
| |
|
void | AddElement (sdf::ElementPtr parent, sdf::ElementPtr element) |
| | Internal function to add element.
|
| |
|
|
std::shared_ptr< GUII > | gui |
| | Pointer to the gui interface.
|
| |
|
std::shared_ptr< SDFormatParserI > | sdformatParser |
| | Pointer to the sdformat parser interface.
|
| |
|
sdf::ElementPtr | parent_element |
| | Pointer to the parent of the element that may be added.
|
| |
|
sdf::ElementPtr | new_element |
| | Pointer to the added element.
|
| |
|
bool | is_currently_undoable = false |
| | Store if the command is currently undo-able.
|
| |
|
bool | is_currently_redoable = false |
| | Store if the command is currently redo-able.
|
| |
Add Element command implementation of CommandI.
◆ AddElementCommand()
| AddElementCommand::AddElementCommand |
( |
std::shared_ptr< GUII > |
gui, |
|
|
std::shared_ptr< SDFormatParserI > |
sdformatParser, |
|
|
sdf::ElementPtr |
parent_element, |
|
|
sdf::ElementPtr |
new_element |
|
) |
| |
Constructor for add element command objects.
- Parameters
-
| [in] | gui | Pointer to the GUII object |
| [in] | sdformatParser | Pointer to the SDFormatParserI object |
| [in] | parent_element | Pointer to the parent of the element that may be added |
| [in] | new_element | Pointer to the element that is to be added |
◆ ChangesProgramStateIrreversibly()
| bool AddElementCommand::ChangesProgramStateIrreversibly |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Always false
Implements CommandI.
◆ Execute()
| bool AddElementCommand::Execute |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- True if a new element is added to the specified parent
Implements CommandI.
◆ ExecuteRedo()
| bool AddElementCommand::ExecuteRedo |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the added element was restored to its parent again
Implements CommandI.
◆ ExecuteUndo()
| bool AddElementCommand::ExecuteUndo |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the added element was removed from its parent
Implements CommandI.
◆ IsRedoable()
| bool AddElementCommand::IsRedoable |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the command can be redone
Implements CommandI.
◆ IsThreaded()
| bool AddElementCommand::IsThreaded |
( |
bool & |
prevent_user_input | ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Parameters
-
| [out] | prevent_user_input | indicates if user input should be prevented if this happens to be a threaded command |
- Returns
- Always false
Implements CommandI.
◆ IsUndoable()
| bool AddElementCommand::IsUndoable |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the command can be undone
Implements CommandI.
The documentation for this class was generated from the following files: