Public Member Functions
|virtual void||update (Event event, Observable< Event > *origin)=0|
The observer 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 observer virtual method update is called each time the observable object has modified a relevant aspect of its internal state. The observable object is responsible to call the update method. The observer class is realized as a template based mixin class. The derived class can redefined the update method. This redefinition allows the use of the pattern for passive and active class. In the case of an active object, the update method can simply send a message to itself on each update call.
The update method can be freely updated. This flexibility allows to use this pattern for passive and for active objects. The method can contain code to process the update information or simply set up and send a kernel message to the task embodied in the observer object.
|virtual void ApparatusFramework::Observer< Event >::update||(||Event||event,|
|Observable< Event > *||origin|
public member methods The update method is called by the observable object each time a relevant change happens.
|event||The event sent by the observable object when a change happens. The event object is often used to provide a hint which change happened.|
|origin||If you use a model with more than one observable, here is the pointer with the address of the observable which has changed its state.|
© 2004-2010 bbv Software Services AG / Apparatus Services