KoMo2  1.0.0
A modern ARM emulator GUI.
RegistersModel.h
Go to the documentation of this file.
1 
12 #include "ControlsModel.h"
13 
14 class RegistersView;
15 
20 class RegistersModel : private Model {
21  public:
23  virtual void changeJimulatorState(const JimulatorState newState) override;
24  virtual const bool handleKeyPress(const GdkEventKey* const e) override;
25  RegistersView* const getView() const;
26  void refreshViews();
27 
28  private:
33 
34  const std::array<std::string, 16> getRegisterValueFromJimulator() const;
35 
36  // ! Deleted special member functions
37  // stops these functions from being misused, creates a sensible error
38  RegistersModel(const RegistersModel&) = delete;
39  RegistersModel(const RegistersModel&&) = delete;
40  RegistersModel& operator=(const RegistersModel&) = delete;
41  RegistersModel& operator=(const RegistersModel&&) = delete;
42 };
void refreshViews()
Handles updating this particular view. Reads register values from Jimulator, sets the label values of...
RegistersView *const getView() const
Returns the view for this model.
RegistersView *const view
The view this model represents.
virtual void changeJimulatorState(const JimulatorState newState) override
Handles changes in the Jimulator state.
KoMo2Model *const parent
All models have a parent model - KoMo2Model, the most senior model in the hierarchy, sets its parent to self.
Definition: Model.h:87
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
A file containing the definition of the ControlsModel class.
virtual const bool handleKeyPress(const GdkEventKey *const e) override
Handles any key press events.
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
The logical model of the entire application. All other models should be member variables of this mode...
Definition: KoMo2Model.h:34
const std::array< std::string, 16 > getRegisterValueFromJimulator() const
Gets the register values out of Jimulator.
Stores data and functions relating to the tracking and manipulation of data within the RegistersView ...
RegistersModel(RegistersView *const view, KoMo2Model *const parent)
Constructs a new registers model object.