C++ features by examples

is part of MVC with View and Controller More...

Inheritance diagram for Model:
Collaboration diagram for Model:

Public Member Functions

void register_observer (Observer &o)
 
int command (Command &cmnd)
 
int command (Command &&cmnd)
 
- Public Member Functions inherited from Subject
void notify_observers ()
 

Additional Inherited Members

- Public Attributes inherited from Subject
forward_list< reference_wrapper< Observer > > observers
 

Detailed Description

is part of MVC with View and Controller

Definition at line 622 of file patterns.cpp.

Member Function Documentation

◆ command() [1/2]

int Model::command ( Command &&  cmnd)
inline

Definition at line 636 of file patterns.cpp.

636 {
637 int rc = cmnd.execute();
639 return rc;
640 }
virtual int execute()
Definition: patterns.cpp:424
void notify_observers()
Definition: patterns.cpp:407
Here is the call graph for this function:

◆ command() [2/2]

int Model::command ( Command cmnd)
inline

Definition at line 630 of file patterns.cpp.

630 {
631 int rc = cmnd.execute();
633 return rc;
634 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_observer()

void Model::register_observer ( Observer o)
inline

Definition at line 626 of file patterns.cpp.

626 {
627 observers.push_front(o);
628 }
forward_list< reference_wrapper< Observer > > observers
Definition: patterns.cpp:413
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: