C++ features by examples

of Observer More...

Inheritance diagram for Subject:

Public Member Functions

void notify_observers ()
 

Public Attributes

forward_list< reference_wrapper< Observer > > observers
 

Detailed Description

of Observer

Definition at line 404 of file patterns.cpp.

Member Function Documentation

◆ notify_observers()

void Subject::notify_observers ( )
inline

Definition at line 407 of file patterns.cpp.

407 {
408 for (Observer& o : observers) {
409 o.notify();
410 o.update(*this);
411 }
412 }
is virtual observer of a Subject
Definition: patterns.cpp:396
forward_list< reference_wrapper< Observer > > observers
Definition: patterns.cpp:413
Here is the caller graph for this function:

Member Data Documentation

◆ observers

forward_list<reference_wrapper<Observer> > Subject::observers

Definition at line 413 of file patterns.cpp.


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