the class definition of the compileLoadModel class, a data model which encapsulates any statefullness and logical operations associated with the compile and loading section of the KoMo2 GUI. This Model is in keeping with the MVC design pattern, with this class is the Model, the file display Label is the View, and the compiling and file browsing buttons are the Controller.
More...
#include <CompileLoadModel.h>
|
| const CompileLoadInnerState | getInnerState () const |
| | Get the Inner State object. More...
|
| |
| void | setInnerState (const CompileLoadInnerState newState) |
| | Handles changing the inner state of this model (whether a file is selected or not) More...
|
| |
| const std::string | getAbsolutePathToSelectedFile () const |
| | Gets the absolutePathToSelectedFile member variable. More...
|
| |
| void | setAbsolutePathToSelectedFile (const std::string val) |
| | Sets the absolutePathToSelectedFile member variable. More...
|
| |
|
void | onBrowseClick () |
| | Opens a file selection dialog upon the BrowseButtonView being clicked.
|
| |
|
void | onCompileLoadClick () const |
| | Compiles a .s file into a .kmd file: Forks a child process, executes aasm on the child, and then load it into Jimulator, if a valid file path is given.
|
| |
| const std::string | makeKmdPath (const std::string absolutePath) const |
| | Takes an ARM assembly file, removes it's current s extension, and appends kmd. For example, /home/user/demo.s will return home/user/demo.kmd. More...
|
| |
| void | handleResultFromFileBrowser (const int result, const Gtk::FileChooserDialog *const dialog) |
| | Handles the result of the file browser dialog box being closed. More...
|
| |
|
| CompileLoadModel (const CompileLoadModel &)=delete |
| |
|
| CompileLoadModel (const CompileLoadModel &&)=delete |
| |
|
CompileLoadModel & | operator= (const CompileLoadModel &)=delete |
| |
|
CompileLoadModel & | operator= (const CompileLoadModel &&)=delete |
| |
| | Model (KoMo2Model *const parent) |
| | Constructs a new Model object - just assigns the parent variable. More...
|
| |
| KoMo2Model *const | getParent () const |
| | Returns the parent pointer. More...
|
| |
| template<class T1 , class T2 > |
| void | setButtonListener (Gtk::Button *const button, const T1 b, const T2 c) |
| | Connect any button to any member function of. More...
|
| |
| void | setButtonState (Gtk::Button *const button, const bool state, Gtk::Image *const img=nullptr, const std::string newTooltip="", const std::string newLabelText="") const |
| | Sets the state of a button to some boolean - the assumption is that if a button is not meant to be sensitive (get_sensitive() == false) then it should also not have a tooltip or many other attributes. You can also optionally update the buttons image, tooltip text, and label text. More...
|
| |
| JimulatorState | getJimulatorState () const |
| | Return the jimulatorState member object. More...
|
| |
the class definition of the compileLoadModel class, a data model which encapsulates any statefullness and logical operations associated with the compile and loading section of the KoMo2 GUI. This Model is in keeping with the MVC design pattern, with this class is the Model, the file display Label is the View, and the compiling and file browsing buttons are the Controller.
Definition at line 32 of file CompileLoadModel.h.
| void CompileLoadModel::changeJimulatorState |
( |
const JimulatorState |
newState | ) |
|
|
overridevirtual |
Handles a change in JimulatorState for this model.
- Parameters
-
| newState | The state that has been changed into. |
Implements Model.
Definition at line 161 of file CompileLoadModel.cpp.
| const std::string CompileLoadModel::getAbsolutePathToSelectedFile |
( |
| ) |
const |
|
private |
Gets the absolutePathToSelectedFile member variable.
- Returns
- std::string The
absolutePathToSelectedFile member variable.
Definition at line 278 of file CompileLoadModel.cpp.
| const bool CompileLoadModel::handleKeyPress |
( |
const GdkEventKey *const |
e | ) |
|
|
overridevirtual |
Handles a key press event for this model.
- Parameters
-
| e | The key press event in question. |
- Returns
- bool was the key pressed or not?
Implements Model.
Definition at line 204 of file CompileLoadModel.cpp.
| void CompileLoadModel::handleResultFromFileBrowser |
( |
const int |
result, |
|
|
const Gtk::FileChooserDialog *const |
dialog |
|
) |
| |
|
private |
Handles the result of the file browser dialog box being closed.
- Parameters
-
| result | The result of the file browser closing (i.e. was a file selected, was the dialog box cancelled, did something unexpected happen, etc.) |
| dialog | A pointer to the dialog box itself - frees itself in its destructor. |
Definition at line 119 of file CompileLoadModel.cpp.
| const std::string CompileLoadModel::makeKmdPath |
( |
const std::string |
absolutePath | ) |
const |
|
private |
Takes an ARM assembly file, removes it's current s extension, and appends kmd. For example, /home/user/demo.s will return home/user/demo.kmd.
- Parameters
-
| absolutePath | The absolute path to the .s program. |
- Returns
- std::string The absolute path with just the file name.
Definition at line 152 of file CompileLoadModel.cpp.
| void CompileLoadModel::setAbsolutePathToSelectedFile |
( |
const std::string |
val | ) |
|
|
private |
Sets the absolutePathToSelectedFile member variable.
- Parameters
-
| val | The value to set the absolutePathToSelectedFile member to. |
Definition at line 271 of file CompileLoadModel.cpp.
Handles changing the inner state of this model (whether a file is selected or not)
- Parameters
-
| val | The value to set the inner state to. |
Definition at line 241 of file CompileLoadModel.cpp.
The documentation for this class was generated from the following files: