KoMo2  1.0.0
A modern ARM emulator GUI.
KoMo2Model.h
Go to the documentation of this file.
1 
9 #include <gtkmm/filechooserdialog.h>
10 #include <string>
11 #include "DisassemblyModel.h"
12 
13 class MainWindowView;
14 class ControlsView;
15 class CompileLoadView;
16 class RegistersView;
17 class TerminalView;
18 class DisassemblyView;
19 
34 class KoMo2Model : public Model {
35  public:
37  const std::string argv0,
38  const std::string manual,
39  const int refreshRate);
40  virtual void changeJimulatorState(const JimulatorState newState) override;
41  const bool refreshViews();
42 
43  // Getters
44  const std::string getAbsolutePathToProjectRoot() const;
45  MainWindowView* const getMainWindow() const;
51 
52  private:
53  virtual const bool handleKeyPress(const GdkEventKey* const e) override;
54 
59 
63  const std::string absolutePathToProjectRoot;
64 
71 
78 
84 
90 
96 
101  const unsigned int refreshRate;
102 
103  // ! Deleted special member functions
104  // stops these functions from being misused, creates a sensible error
105  KoMo2Model(const KoMo2Model&) = delete;
106  KoMo2Model(const KoMo2Model&&) = delete;
107  KoMo2Model& operator=(const KoMo2Model&) = delete;
108  KoMo2Model& operator=(const KoMo2Model&&) = delete;
109 };
The class definition of the ControlsModel class, a data model which encapsulates all state...
Definition: ControlsModel.h:21
The declaration of the DisassemblyModel class.
KoMo2Model(MainWindowView *const mainWindow, const std::string argv0, const std::string manual, const int refreshRate)
Construct a new KoMo2Model - this constructor initialises the mainWindow pointer, as well as the abso...
Definition: KoMo2Model.cpp:28
Represents any data or functions related to the information, or manipulation of the information...
Definition: TerminalModel.h:19
DisassemblyModel *const getDisassemblyModel()
Gets the disassemblyModel member variable.
Definition: KoMo2Model.cpp:164
This file declares the class DisassemblyModel, which represents the logical data in memory that relat...
TerminalModel terminalModel
The data model associated with the terminal view. Represented by the input box and text view at the b...
Definition: KoMo2Model.h:89
CompileLoadModel *const getCompileLoadModel()
Gets the compileLoadModel member variable.
Definition: KoMo2Model.cpp:143
TerminalModel *const getTerminalModel()
Gets the terminalModel member variable.
Definition: KoMo2Model.cpp:171
const std::string getAbsolutePathToProjectRoot() const
Gets the absolutePathToProjectRoot member variable.
Definition: KoMo2Model.cpp:178
std::string manual
Manual information read from variables.json is stored here.
Definition: main.cpp:71
ControlsModel *const getControlsModel()
Gets the controlsModel member variable.
Definition: KoMo2Model.cpp:150
const unsigned int refreshRate
Defines how often the the refreshViews function should be called when KoMo2 is in the JimulatorState:...
Definition: KoMo2Model.h:101
RegistersModel registersModel
The data model for the registers view. Represented by the table of values on the left hand side of th...
Definition: KoMo2Model.h:83
ControlsView is the visual aspect of the controls that run along the top of the KoMo2 GUI...
Definition: ControlsView.h:22
Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or...
Definition: RegistersView.h:26
JimulatorState
Describe the 5 states of Jimulator.
Definition: Model.h:19
ControlsModel controlsModel
The data model for the controls and status functionality of the program, represented by the series of...
Definition: KoMo2Model.h:77
RegistersModel *const getRegistersModel()
Gets the RegistersModel member variable.
Definition: KoMo2Model.cpp:157
MainWindowView *const getMainWindow() const
Gets the mainWindow member variable.
Definition: KoMo2Model.cpp:136
The class definition of the main window of the program. This main window is the mater view of the pro...
The superclass for all other Model classes. Uses a pure virtual function, so is abastract. Keeps KoMo2Model as a friend so it alone can call setJimulatorState. This class provides basic data that are needed by all other.
Definition: Model.h:35
const std::string absolutePathToProjectRoot
The absolute path to the project root directory.
Definition: KoMo2Model.h:63
virtual const bool handleKeyPress(const GdkEventKey *const e) override
Passes the key press event off to other child models.
Definition: KoMo2Model.cpp:84
DisassemblyModel disassemblyModel
The data model associated with the disassembly view. Represents the rows of memory values that take u...
Definition: KoMo2Model.h:95
The logical model of the entire application. All other models should be member variables of this mode...
Definition: KoMo2Model.h:34
the class definition of the compileLoadModel class, a data model which encapsulates any statefullness...
Represents the entire disassembly window in the overall KoMo2 GUI. Contains several rows of memory va...
The GUI element which encapsulates the "clear" button, the output text box, and the input text box at...
Definition: TerminalView.h:25
Stores data and functions relating to the tracking and manipulation of data within the RegistersView ...
virtual void changeJimulatorState(const JimulatorState newState) override
Changes the Jimulator state and calls each child models own changeJimulatorState function.
Definition: KoMo2Model.cpp:97
This class represents the visual aspects that make up the compile & load section of the KoMo2 GUI...
CompileLoadModel compileLoadModel
The data model for the compile and load functionality of the program, represented by the browse and c...
Definition: KoMo2Model.h:70
const bool refreshViews()
Refreshes the views. May be called on a looping timer.
Definition: KoMo2Model.cpp:56
MainWindowView *const mainWindow
A pointer to the main window view.
Definition: KoMo2Model.h:58