C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
UIControlledModel Class Referenceabstract

Class that adds UI Controller to the basic Model class. More...

#include <ui_core.h>

Inheritance diagram for UIControlledModel:
Inheritance graph
Collaboration diagram for UIControlledModel:
Collaboration graph

Public Member Functions

void update_status (ControlledObjectStatus _new_status)
 check if the _new_status change is effective, then change it and set the change_flag to true.
 
void update_current_controller (UIController *_new_controller)
 if _new_controller is different from the current controller, change the current controller associated to the Model. the new controller has is member current_controlled_model also changed.
 
ControlledObjectStatus get_status ()
 Get the status object.
 
UIControllerget_current_controller ()
 Get the current controller object.
 
virtual void process_control_event (UIControlEvent _event)=0
 The purpose of this function is to implement the behavior of the implemented model object when a ControlEvent is received.
 
- Public Member Functions inherited from Model
 Model ()
 Construct the Model object.
 
 ~Model ()
 Destroy the Model object.
 
void update_attached_widgets (Widget *new_widget)
 add a new widget to the set of attached_widgets
 
int get_number_of_attached_widget ()
 get the number of attached widgets
 
bool has_changed ()
 get the change flag status
 
void set_change_flag ()
 Set the change flag object to true.
 
void draw_widget_done ()
 Set the change flag object to false.
 
uint32_t get_time_since_last_change ()
 compute time since the last status change
 
virtual void draw_refresh_all_attached_widgets ()
 update drawing for each attached widgets
 

Additional Inherited Members

- Protected Attributes inherited from Model
std::set< Widget * > attached_widgets
 the set of widgets that are in charge of viewing this model.
 

Detailed Description

Class that adds UI Controller to the basic Model class.

Member Function Documentation

◆ get_current_controller()

UIController * UIControlledModel::get_current_controller ( )

Get the current controller object.

NOTICE: It is usually necessary to recast the abstract return UIController into the actual controller

Returns
UIController*
Here is the caller graph for this function:

◆ get_status()

ControlledObjectStatus UIControlledModel::get_status ( )

Get the status object.

Returns
ControlledObjectStatus
Here is the caller graph for this function:

◆ process_control_event()

virtual void UIControlledModel::process_control_event ( UIControlEvent _event)
pure virtual

The purpose of this function is to implement the behavior of the implemented model object when a ControlEvent is received.

Parameters
_event

◆ update_current_controller()

void UIControlledModel::update_current_controller ( UIController * _new_controller)

if _new_controller is different from the current controller, change the current controller associated to the Model. the new controller has is member current_controlled_model also changed.

Parameters
_new_controller
Here is the call graph for this function:

◆ update_status()

void UIControlledModel::update_status ( ControlledObjectStatus _new_status)

check if the _new_status change is effective, then change it and set the change_flag to true.

Parameters
_new_status
Here is the call graph for this function:
Here is the caller graph for this function:

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