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

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

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/Event.h>

Collaboration diagram for Arcane::EventObservableView< Args >:

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.

Private Attributes

EventObservable< Args... > & m_observable_ref

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.

Member Data Documentation

◆ m_observable_ref

template<typename... Args>
EventObservable<Args...>& Arcane::EventObservableView< Args >::m_observable_ref
private

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


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