mediator_pattern::Mediator

class Mediator

Mediator interface to facilitate communication between colleagues.

Subclassed by mediator_pattern::ConcreteMediator

Public Functions

virtual void sendMessage(Colleague *sender, const std::string &message) = 0

Sends a message to a specific colleague.

Parameters:
  • sender – Pointer to the sending colleague.

  • message – The message to send.

virtual void addColleague(Colleague *colleague) = 0

Adds a colleague to the mediator.

Parameters:

colleague – Pointer to the colleague to add.