C++ features by examples
Mediator Struct Reference

Public Member Functions

void register_member (Member &m)
 
void receive (Message &msg)
 

Public Attributes

forward_list< reference_wrapper< Member > > members
 

Detailed Description

Definition at line 566 of file patterns.cpp.

Member Function Documentation

◆ receive()

void Mediator::receive ( Message msg)
inline

Definition at line 572 of file patterns.cpp.

572 {
573 for (Member& m : members)
574 m.receive(msg);
575 }
forward_list< reference_wrapper< Member > > members
Definition: patterns.cpp:576
Here is the caller graph for this function:

◆ register_member()

void Mediator::register_member ( Member m)
inline

Definition at line 568 of file patterns.cpp.

568 {
569 m.mediator = this;
570 members.push_front(m);
571 }
Mediator * mediator
Definition: patterns.cpp:561
Here is the caller graph for this function:

Member Data Documentation

◆ members

forward_list<reference_wrapper<Member> > Mediator::members

Definition at line 576 of file patterns.cpp.


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