ApparatusFramework::Observable< Event > Class Template Reference
[Pattern Services]

#include <PatternServices/current/include/Observable.h>

Inheritance diagram for ApparatusFramework::Observable< Event >:
ApparatusFramework::MultipleObservable< Event > ApparatusFramework::SimpleObservable< Event >

List of all members.

Public Member Functions

 Observable ()
virtual ~Observable ()
virtual void attach (Observer< Event > *self)=0
virtual void detach (Observer< Event > *self)=0

Detailed Description

template<class Event>
class ApparatusFramework::Observable< Event >

The observable class implements one part of the observer pattern. We use the same terminology and concepts as the implementation provided by the java standard library. The observable object provides services allowing the observers to register and unregister themselves. It is also responsible to call the update function of all observers each time a relevant change happens. This class is a mixin class.

Definition at line 65 of file Observable.h.


Constructor & Destructor Documentation

template<class Event >
ApparatusFramework::Observable< Event >::Observable (  )  [inline]

constructors, destructors Constructs a new observable object.

tbd

Definition at line 173 of file Observable.h.

template<class Event >
ApparatusFramework::Observable< Event >::~Observable (  )  [inline, virtual]

Destroys a observable object and releases all the associated ressources.

tbd

Definition at line 179 of file Observable.h.


Member Function Documentation

template<class Event>
virtual void ApparatusFramework::Observable< Event >::attach ( Observer< Event > *  self  )  [pure virtual]

registration Attachs the given observer. Each time a change happens, the observer will be informed.

Parameters:
self registree to register by the observable object.

Implemented in ApparatusFramework::SimpleObservable< Event >, ApparatusFramework::MultipleObservable< Event >, ApparatusFramework::SimpleObservable< Msg * >, and ApparatusFramework::MultipleObservable< Msg * >.

template<class Event>
virtual void ApparatusFramework::Observable< Event >::detach ( Observer< Event > *  self  )  [pure virtual]

Detachs the registration of the given observer if found in the list of registrees.

Parameters:
self the registree to remove from the observable list.

Implemented in ApparatusFramework::SimpleObservable< Event >, ApparatusFramework::MultipleObservable< Event >, ApparatusFramework::SimpleObservable< Msg * >, and ApparatusFramework::MultipleObservable< Msg * >.

© 2004-2010 bbv Software Services AG / Apparatus Services