SDFormat Editor
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenFileCommand Class Reference

Open model command implementation of CommandI. More...

#include <OpenFileCommand.h>

Inheritance diagram for OpenFileCommand:
Inheritance graph
Collaboration diagram for OpenFileCommand:
Collaboration graph

Public Member Functions

 OpenFileCommand (std::shared_ptr< GUII > gui, std::shared_ptr< SDFormatParserI > sdformatParser, std::string file_path)
 Constructor for open model command objects.
 

Private Member Functions

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.
 

Private Attributes

std::string file_path
 Filepath of the model.
 
std::shared_ptr< GUIIgui
 Pointer to the gui interface.
 
std::shared_ptr< SDFormatParserIsdformatParser
 Pointer to the sdformat parser interface.
 

Detailed Description

Open model command implementation of CommandI.

Constructor & Destructor Documentation

◆ OpenFileCommand()

OpenFileCommand::OpenFileCommand ( std::shared_ptr< GUII gui,
std::shared_ptr< SDFormatParserI sdformatParser,
std::string  file_path 
)

Constructor for open model command objects.

Parameters
[in]guiPointer to the GUII object
[in]sdformatParserPointer to the SDFormatParserI object
[in]file_pathFilepath of the model

Member Function Documentation

◆ ChangesProgramStateIrreversibly()

bool OpenFileCommand::ChangesProgramStateIrreversibly ( )
overrideprivatevirtual

Implementation of interface method.

Returns
Always true

Implements CommandI.

◆ Execute()

bool OpenFileCommand::Execute ( )
overrideprivatevirtual

Implementation of interface method.

Returns
True if the SDFormatParser has successfully parsed the file and it has been displayed in the GUI

Implements CommandI.

◆ ExecuteRedo()

bool OpenFileCommand::ExecuteRedo ( )
overrideprivatevirtual

Implementation of interface method.

Returns
Always false

Implements CommandI.

◆ ExecuteUndo()

bool OpenFileCommand::ExecuteUndo ( )
overrideprivatevirtual

Implementation of interface method.

Returns
Always false

Implements CommandI.

◆ IsRedoable()

bool OpenFileCommand::IsRedoable ( )
overrideprivatevirtual

Implementation of interface method.

Returns
Always false

Implements CommandI.

◆ IsThreaded()

bool OpenFileCommand::IsThreaded ( bool &  prevent_user_input)
overrideprivatevirtual

Implementation of interface method.

Parameters
[out]prevent_user_inputindicates if user input should be prevented if this happens to be a threaded command
Returns
Always true

Implements CommandI.

◆ IsUndoable()

bool OpenFileCommand::IsUndoable ( )
overrideprivatevirtual

Implementation of interface method.

Returns
Always False

Implements CommandI.


The documentation for this class was generated from the following files: