Delete Element command implementation of CommandI.
More...
#include <DeleteElementCommand.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.
|
| |
| bool | ElementRequired () |
| | Determine if an element is strictly required.
|
| |
|
|
std::shared_ptr< GUII > | gui |
| | Pointer to the gui interface.
|
| |
|
std::shared_ptr< SDFormatParserI > | sdformatParser |
| | Pointer to the sdformat parser interface.
|
| |
|
sdf::ElementPtr | element_to_delete |
| | Pointer to the element to delete.
|
| |
|
sdf::ElementPtr | element_to_deletes_parent |
| | Pointer to the parent of the element to delete.
|
| |
|
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.
|
| |
Delete Element command implementation of CommandI.
◆ DeleteElementCommand()
| DeleteElementCommand::DeleteElementCommand |
( |
std::shared_ptr< GUII > |
gui, |
|
|
std::shared_ptr< SDFormatParserI > |
sdformatParser, |
|
|
sdf::ElementPtr |
element_to_delete |
|
) |
| |
Constructor for delete element command objects.
- Parameters
-
| [in] | gui | Pointer to the GUII object |
| [in] | sdformatParser | Pointer to the SDFormatParserI object |
| [in] | element_to_delete | Pointer to the element that may be deleted |
◆ ChangesProgramStateIrreversibly()
| bool DeleteElementCommand::ChangesProgramStateIrreversibly |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Always false
Implements CommandI.
◆ ElementRequired()
| bool DeleteElementCommand::ElementRequired |
( |
| ) |
|
|
private |
Determine if an element is strictly required.
- Returns
- True if the element is a required element and is the only child element of that type
◆ Execute()
| bool DeleteElementCommand::Execute |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- True if the element has been deleted from it's parent
Implements CommandI.
◆ ExecuteRedo()
| bool DeleteElementCommand::ExecuteRedo |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the element to delete was removed from its parent again
Implements CommandI.
◆ ExecuteUndo()
| bool DeleteElementCommand::ExecuteUndo |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the element to delete was already deleted and now restored to its parent
Implements CommandI.
◆ IsRedoable()
| bool DeleteElementCommand::IsRedoable |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the command has been undone
Implements CommandI.
◆ IsThreaded()
| bool DeleteElementCommand::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 DeleteElementCommand::IsUndoable |
( |
| ) |
|
|
overrideprivatevirtual |
Implementation of interface method.
- Returns
- Returns true if the command has been executed or redone
Implements CommandI.
The documentation for this class was generated from the following files: