Public Member Functions

ObserverConnector< Subject, Observer > Class Template Reference

#include <ObserverConnector.hpp>

Inheritance diagram for ObserverConnector< Subject, Observer >:
ObserverConnectorInt

List of all members.

Public Member Functions

 ObserverConnector (Subject &s, Observer &o)
virtual void probe ()

Detailed Description

template<class Subject, class Observer>
class ObserverConnector< Subject, Observer >

A ObserverConnector is a function object whose only job is to "connect" a subject of a certain type (template parameter S) to an observer (template parameter O). The user only needs to call the constructor to create a ObserverConnector and add it to a subject.

The requirements are:

The class has been provided to allow observers to be passed the subject reference. In this way, the update() can be overloaded with the subject type, and thus the observer can be notified by different subjects at the same time.


The documentation for this class was generated from the following file:
 All Classes