|
SDFormat Editor
|
Implementation of CommandFactoryI. More...
#include <command_factory.h>


Public Member Functions | |
| CommandFactory (std::shared_ptr< GUII > gui, std::shared_ptr< SDFormatParserI > sdformatParser, std::shared_ptr< ModelViewerI > model_viewer) | |
| Constructor that wraps the Initialize method. | |
| std::unique_ptr< CommandI > | MakeOpenModelViewerCommand () override |
| Create a open model viewer model command. | |
| std::unique_ptr< CommandI > | MakeCloseModelViewerCommand () override |
| Create a close model viewer model command. | |
Private Member Functions | |
| void | Initialize (std::shared_ptr< GUII > gui, std::shared_ptr< SDFormatParserI > sdformatParser, std::shared_ptr< ModelViewerI > model_viewer) |
| Implementation of interface method, wrapped by constructor. | |
| std::unique_ptr< CommandI > | MakeOpenFileCommand (std::string file_path) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeDeleteElementCommand (sdf::ElementPtr element_to_delete) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeAddElementCommand (sdf::ElementPtr parent_element, sdf::ElementPtr new_element) override |
| Create an add element command. | |
| std::unique_ptr< CommandI > | MakeSaveFileCommand () override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeRenderModelCommand (bool render_collisions_in_model_viewer) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeCreateFileCommand () override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeUndoCommand () override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeRedoCommand () override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeModifyAttributeCommand (sdf::ParamPtr attribute_to_modify, std::string new_value) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeModifyAttributeCommand (sdf::ParamPtr attribute_to_modify, bool new_value) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeModifyElementCommand (sdf::ElementPtr element_to_modify, std::string new_value) override |
| Implementation of interface method. | |
| std::unique_ptr< CommandI > | MakeModifyElementCommand (sdf::ElementPtr element_to_modify, bool new_value) override |
| Implementation of interface method. | |
| void | ClearStack (std::stack< std::unique_ptr< CommandI > > &stack) |
| Clears the undo stack. | |
| void | ClearUndoRedoStacks () override |
| Implementation of interface method. | |
| void | PushToUndoCommandsStack (std::unique_ptr< CommandI > command, const bool new_change=true) override |
| Pushes to the undo commands stack. | |
| void | PushToRedoCommandsStack (std::unique_ptr< CommandI > command) override |
| Pushes to the redo commands stack. | |
| void | PopFromUndoCommandsStack () |
| Pops from the undo commands stack and executes the popped command. | |
| void | PopFromRedoCommandsStack () |
| Pops from the redo commands stack and executes the popped command. | |
Private Attributes | |
| std::shared_ptr< GUII > | gui |
| Pointer to the GUI obejct. | |
| std::shared_ptr< SDFormatParserI > | sdformatParser |
| Pointer to the sdformat parser object. | |
| std::shared_ptr< ModelViewerI > | model_viewer |
| Pointer to the model viewer object. | |
| std::stack< std::unique_ptr< CommandI > > | undo_commands_stack |
| Stack for undo functionality. | |
| std::stack< std::unique_ptr< CommandI > > | redo_commands_stack |
| Stack for redo functionality. | |
Implementation of CommandFactoryI.
| CommandFactory::CommandFactory | ( | std::shared_ptr< GUII > | gui, |
| std::shared_ptr< SDFormatParserI > | sdformatParser, | ||
| std::shared_ptr< ModelViewerI > | model_viewer | ||
| ) |
Constructor that wraps the Initialize method.
| [in] | gui | A pointer to the GUI object |
| [in] | sdformat_parser | A pointer to the sdformat parser object |
| [in] | model_viewer | A pointer to the model viewer object |
|
overrideprivatevirtual |
Implementation of interface method.
Implements CommandFactoryI.
|
privatevirtual |
Implementation of interface method, wrapped by constructor.
| [in] | gui | A pointer to the GUI object |
| [in] | sdformat_parser | A pointer to the sdformat parser object |
| [in] | model_viewer | A pointer to the model viewer object |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Create an add element command.
| [in] | parent_element | The parent of the new SDF element |
| [in] | new_element | The new SDF element |
Implements CommandFactoryI.
|
overridevirtual |
Create a close model viewer model command.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | element_to_delete | The SDF element to delete |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | attribute_to_modify | A pointer to the attribute that will be modified |
| [in] | new_value | The new value as a bool |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | attribute_to_modify | A pointer to the attribute that will be modified |
| [in] | new_value | The new value as a string |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | element_to_modify | A pointer to the element that will be modified |
| [in] | new_value | The new value as a bool |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | element_to_modify | A pointer to the element that will be modified |
| [in] | new_value | The new value as a string |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | file_path | Filepath of the model |
Implements CommandFactoryI.
|
overridevirtual |
Create a open model viewer model command.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
| [in] | render_collisions_in_model_viewer | indicates if collision boxes should be rendered in the model viewer |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Implementation of interface method.
Implements CommandFactoryI.
|
overrideprivatevirtual |
Pushes to the redo commands stack.
| [in] | command | commandI object to push |
Implements CommandFactoryI.
|
overrideprivatevirtual |
Pushes to the undo commands stack.
| [in] | command | commandI object to push |
| [in] | new_change | indicates if we are pushing a new change, and thus should clear the redo stack |
Implements CommandFactoryI.