Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::EventObservableView< Args > Class Template Reference

Class managing observers associated with an event. More...

#include <arccore/common/Event.h>

Public Types

typedef EventObserver< Args... > ObserverType

Public Member Functions

 EventObservableView (EventObservable< Args... > &v)
void attach (ObserverType *o)
 Attaches the observer o to this observable.
void detach (ObserverType *o)
 Detaches the observer o from this observable.
template<typename Lambda>
void attach (EventObserverPool &pool, const Lambda &lambda)
 Adds an observer using the lambda lambda and stores a reference in pool.

Detailed Description

template<typename... Args>
class Arcane::EventObservableView< Args >

Class managing observers associated with an event.

See also
EventObservable

Definition at line 252 of file arccore/src/common/arccore/common/Event.h.

Member Typedef Documentation

◆ ObserverType

template<typename... Args>
typedef EventObserver<Args...> Arcane::EventObservableView< Args >::ObserverType

Definition at line 256 of file arccore/src/common/arccore/common/Event.h.

Constructor & Destructor Documentation

◆ EventObservableView()

template<typename... Args>
Arcane::EventObservableView< Args >::EventObservableView ( EventObservable< Args... > & v)
inlineexplicit

Definition at line 260 of file arccore/src/common/arccore/common/Event.h.

Member Function Documentation

◆ attach() [1/2]

template<typename... Args>
template<typename Lambda>
void Arcane::EventObservableView< Args >::attach ( EventObserverPool & pool,
const Lambda & lambda )
inline

Adds an observer using the lambda lambda and stores a reference in pool.

Definition at line 285 of file arccore/src/common/arccore/common/Event.h.

◆ attach() [2/2]

template<typename... Args>
void Arcane::EventObservableView< Args >::attach ( ObserverType * o)
inline

Attaches the observer o to this observable.

An exception is thrown if the observer is already attached to an observable.

Definition at line 271 of file arccore/src/common/arccore/common/Event.h.

◆ detach()

template<typename... Args>
void Arcane::EventObservableView< Args >::detach ( ObserverType * o)
inline

Detaches the observer o from this observable.

An exception is thrown if the observer is not attached to this observable.

Definition at line 278 of file arccore/src/common/arccore/common/Event.h.


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