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

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

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

List of all members.

Public Member Functions

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

Protected Types

typedef list< Observer< Event >
*, BBVPKG_PATTERNSERVICES_OBSERVER_MAX_OBSERVER_COUNT > 
ObserversList

Protected Attributes

list< Observer< Event >
*, BBVPKG_PATTERNSERVICES_OBSERVER_MAX_OBSERVER_COUNT > 
m_observers

Detailed Description

template<class Event>
class ApparatusFramework::MultipleObservable< Event >

MultipleObservable implements a specialization of the observable supporting multiple observers. This variant is sometimes called the listener pattern. For the list of attached observers we use the realtime implementation of list in Rt_Stl (no dynamic memory allocation). This class is a mixin class.

Definition at line 139 of file Observable.h.


Member Typedef Documentation

template<class Event>
typedef list<Observer<Event>*,BBVPKG_PATTERNSERVICES_OBSERVER_MAX_OBSERVER_COUNT> ApparatusFramework::MultipleObservable< Event >::ObserversList [protected]

member variables

Definition at line 165 of file Observable.h.


Constructor & Destructor Documentation

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

constructors, destructors Constructs a new observable object.

tbd

Definition at line 217 of file Observable.h.

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

Destroys a observable object and releases all the associated ressources.

tbd

Definition at line 223 of file Observable.h.


Member Function Documentation

template<class Event>
void ApparatusFramework::MultipleObservable< 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 229 of file Observable.h.

References ApparatusFramework::MultipleObservable< Event >::m_observers, and ApparatusFramework::list< T, maxSize >::push_back().

template<class Event>
void ApparatusFramework::MultipleObservable< 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 237 of file Observable.h.

References ApparatusFramework::MultipleObservable< Event >::m_observers, and ApparatusFramework::list< T, maxSize >::remove().


Member Data Documentation

template<class Event>
list<Observer<Event>*,BBVPKG_PATTERNSERVICES_OBSERVER_MAX_OBSERVER_COUNT> ApparatusFramework::MultipleObservable< Event >::m_observers [protected]

Holds the adress of the list containing all attached observers

Definition at line 167 of file Observable.h.

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

© 2004-2010 bbv Software Services AG / Apparatus Services