12#ifndef ARCANE_CORE_OBSERVABLEPOOL_H
13#define ARCANE_CORE_OBSERVABLEPOOL_H
17#include "arcane/utils/FatalErrorException.h"
19#include "arcane/core/Observable.h"
20#include "arcane/core/Observer.h"
44template <
typename KeyType>
49 typedef std::map<KeyType, IObservable*> ObservableListType;
67 void add(
const KeyType& key)
71 ARCANE_FATAL(
"Observable with current key already exists");
75 IObservable* operator[](
const KeyType& key)
77 IObservable* x = _getIfExists(key);
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Interface of an observable.
virtual void detachAllObservers()=0
Detaches all observers associated with this instance.
~ObservablePool()
Frees resources.
ObservablePool()
Constructor.
ObservableListType m_observables
List of observables.
Base class of an observable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --