User Manual, Developers Guide and API Documentation

wns::ObserverInterface< NOTIFICATIONINTERFACE > Class Template Reference
[Misc]

An observer's Interface to a subject. More...

#include <ObserverInterface.hpp>

Inherits NOTIFICATIONINTERFACE.

Inherited by wns::Observer< NOTIFICATIONINTERFACE > [virtual].

Collaboration diagram for wns::ObserverInterface< NOTIFICATIONINTERFACE >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef NOTIFICATIONINTERFACE NotificationType
 The NotificationInterface used by ObserverInterface and SubjectInterface.
typedef SubjectInterface
< ObserverInterface
SubjectType
 The SubjectInterface corresponding to this ObserverInterface.

Public Member Functions

virtual ~ObserverInterface ()

Private Member Functions

virtual void addSubject (SubjectType *subject)=0
 Add a subject we are attached to.
virtual void removeSubject (SubjectType *subject)=0
 Remove a subject we were attached to.

Friends

class Subject< NOTIFICATIONINTERFACE >
 Only Subject should use this class.


Detailed Description

template<class NOTIFICATIONINTERFACE>
class wns::ObserverInterface< NOTIFICATIONINTERFACE >

Author:
Marc Schinnenburg <marc@schinnenburg.com>

Swen Kuehnlein

For internal use only.

Parameters:
NOTIFICATIONINTERFACE The interface that contains the notification function. ObserverInterface will derive from that.
Note:
You should not need to instantiate this template yourself, as you can refer to the corresponding instantiation via Subject<NOTIFICATIONINTERFACE>::ObserverInterface and Observer<NOTIFICATIONINTERFACE>::ObserverInterface.
Remarks:
To resolve the mutual dependency of ObserverInterface and SubjectInterface, ObserverInterface includes SubjectInterface.hpp, whereas SubjectInterface gets the ObserverInterface as template parameter.
See also:
SubjectInterface, Observer, Subject.

Definition at line 66 of file ObserverInterface.hpp.


Member Typedef Documentation

template<class NOTIFICATIONINTERFACE>
typedef NOTIFICATIONINTERFACE wns::ObserverInterface< NOTIFICATIONINTERFACE >::NotificationType

This provides the NotificationInterface that is used by both this ObserverInterface and SubjectInterface.

Definition at line 82 of file ObserverInterface.hpp.


Constructor & Destructor Documentation

template<class NOTIFICATIONINTERFACE>
virtual wns::ObserverInterface< NOTIFICATIONINTERFACE >::~ObserverInterface (  )  [inline, virtual]

Definition at line 92 of file ObserverInterface.hpp.


Member Function Documentation

template<class NOTIFICATIONINTERFACE>
virtual void wns::ObserverInterface< NOTIFICATIONINTERFACE >::addSubject ( SubjectType subject  )  [private, pure virtual]

template<class NOTIFICATIONINTERFACE>
virtual void wns::ObserverInterface< NOTIFICATIONINTERFACE >::removeSubject ( SubjectType subject  )  [private, pure virtual]


Friends And Related Function Documentation

template<class NOTIFICATIONINTERFACE>
friend class Subject< NOTIFICATIONINTERFACE > [friend]

Subject is the only class with access to addSubject() and removeSubject().

Definition at line 74 of file ObserverInterface.hpp.


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

Generated on Fri Feb 10 03:33:48 2012 for openWNS by  doxygen 1.5.5