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

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

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

List of all members.

Public Member Functions

 SimpleObservable ()
virtual ~SimpleObservable ()
virtual void attach (Observer< Event > *self)
virtual void detach (Observer< Event > *self)

Protected Attributes

Observer< Event > * m_observer

Detailed Description

template<class Event>
class ApparatusFramework::SimpleObservable< Event >

SimpleObservable implements a specialization of the observable supporting at most one observer. This variant is sometimes called the listener pattern. This class is a mixin class.

Definition at line 98 of file Observable.h.


Constructor & Destructor Documentation

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

constructors, destructors Constructs a new observable object.

tbd

Definition at line 186 of file Observable.h.

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

Destroys a observable object and releases all the associated ressources.

tbd

Definition at line 192 of file Observable.h.


Member Function Documentation

template<class Event>
void ApparatusFramework::SimpleObservable< Event >::attach ( Observer< Event > *  self  )  [inline, 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.

tbd

Implements ApparatusFramework::Observable< Event >.

Definition at line 198 of file Observable.h.

References ApparatusFramework::SimpleObservable< Event >::m_observer.

template<class Event>
void ApparatusFramework::SimpleObservable< Event >::detach ( Observer< Event > *  self  )  [inline, virtual]

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

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

tbd

Implements ApparatusFramework::Observable< Event >.

Definition at line 206 of file Observable.h.

References ApparatusFramework::SimpleObservable< Event >::m_observer.


Member Data Documentation

template<class Event>
Observer<Event>* ApparatusFramework::SimpleObservable< Event >::m_observer [protected]

member variables Takes the adress of the atached observer

Definition at line 126 of file Observable.h.

Referenced by ApparatusFramework::SimpleObservable< Event >::attach(), and ApparatusFramework::SimpleObservable< Event >::detach().

© 2004-2010 bbv Software Services AG / Apparatus Services