SUBJECT< _CT > Class Template Reference

< GENERATING_DOXYGEN_OUTPUT More...

#include <mi32/observer.h>

Inheritance diagram for SUBJECT< _CT >:
Inheritance graph
[legend]

List of all members.

Classes

class  ITERATOR

Public Types

typedef MILIST< _CT * > OBSERVERLIST
typedef OBSERVERLIST::ITERATOR OBSERVERLIST_ITERATOR

Public Member Functions

 SUBJECT ()
virtual ~SUBJECT ()
void NotifyObservers ()

Protected Member Functions

ITERATOR ObserverBegin ()
ITERATOR ObserverEnd ()

Detailed Description

template<class _CT = class OBSERVER_BASE>
class SUBJECT< _CT >

< GENERATING_DOXYGEN_OUTPUT

Base class for the SUBJECT of the OBSERVER (the observed). For an example of how to use this, see the end of this include file.


Member Typedef Documentation

template<class _CT = class OBSERVER_BASE>
typedef MILIST<_CT*> SUBJECT< _CT >::OBSERVERLIST
template<class _CT = class OBSERVER_BASE>
typedef OBSERVERLIST::ITERATOR SUBJECT< _CT >::OBSERVERLIST_ITERATOR

Constructor & Destructor Documentation

template<class _CT = class OBSERVER_BASE>
SUBJECT< _CT >::SUBJECT (  )  [inline]

Default constructor. (nothing to do).

template<class _CT = class OBSERVER_BASE>
virtual SUBJECT< _CT >::~SUBJECT (  )  [inline, virtual]

Destructor.

Iterates through the list of OBSERVERs and calls their OnSubjectDestroy methods.


Member Function Documentation

template<class _CT = class OBSERVER_BASE>
void SUBJECT< _CT >::NotifyObservers (  )  [inline]

Call the OnNotify method of all the observers.

If other event handlers are needed, they would be implemented as virtual methods in the OBSERVER-derived class, and the SUBJECT- derived class would be given methods to call them.

template<class _CT = class OBSERVER_BASE>
ITERATOR SUBJECT< _CT >::ObserverBegin (  )  [inline, protected]

Return an iterator to the first Observer.

Note: Named ObserverBegin() to avoid possible conflict if derived class wants a Begin() method.

template<class _CT = class OBSERVER_BASE>
ITERATOR SUBJECT< _CT >::ObserverEnd (  )  [inline, protected]

Return an iterator to the end of the Observer list Note: Named ObserverBegin() to avoid possible conflict if derived class wants a Begin() method.


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

Generated on Sun Oct 7 21:33:53 2012 for TNTsdk 2012 by  doxygen 1.6.1