Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IObserver Class Referenceabstract

Observer interface. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/base/arccore/base/IObserver.h>

Inheritance diagram for Arcane::IObserver:
Collaboration diagram for Arcane::IObserver:

Public Member Functions

virtual ~IObserver ()
 Releases resources.
virtual void observerUpdate (IObservable *)=0
 Notification coming from the observable oba.
virtual void attachToObservable (IObservable *obs)=0
 Attaches to the observable obs.
virtual void detach ()=0
 Detaches from the observable.

Detailed Description

Observer interface.

This interface represents the concept of an observer as defined in the Design Pattern. An observer is attached to an observable (IObservable) via the IObservable::attachObserver() method and detached by IObservable::detachObserver(). The observable notifies it of a change by calling the observerUpdate() method.

An observer can only be attached to one observable at a time

The methods of this class must only be called by IObservable and never directly by the user.

Definition at line 44 of file arccore/src/base/arccore/base/IObserver.h.

Constructor & Destructor Documentation

◆ IObserver()

Arcane::IObserver::IObserver ( )
inlineprotected

Definition at line 48 of file arccore/src/base/arccore/base/IObserver.h.

◆ ~IObserver()

virtual Arcane::IObserver::~IObserver ( )
inlinevirtual

Releases resources.

Definition at line 52 of file arccore/src/base/arccore/base/IObserver.h.

Member Function Documentation

◆ attachToObservable()

virtual void Arcane::IObserver::attachToObservable ( IObservable * obs)
pure virtual

Attaches to the observable obs.

Implemented in Arcane::AbstractObserver.

Referenced by Arcane::Observable::attachObserver().

Here is the caller graph for this function:

◆ detach()

virtual void Arcane::IObserver::detach ( )
pure virtual

Detaches from the observable.

Implemented in Arcane::AbstractObserver.

◆ observerUpdate()

virtual void Arcane::IObserver::observerUpdate ( IObservable * )
pure virtual

Notification coming from the observable oba.

Implemented in Arcane::ObserverT< T >.


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