AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
Observer< Event, Tags > Class Template Referenceabstract

Implementation of the ObserverInterface. More...

#include <Observer.hpp>

Inherits ObserverInterface< Event >.

Public Member Functions

template<class N , REQUIRES(std::is_base_of_v< Notifier< Event >, N >) >
 Observer (N const &notifier)
 
template<class N , REQUIRES(not std::is_base_of_v< Notifier< Event >, N >) >
 Observer (N const &notifier)
 
virtual ~Observer ()
 Destructor, detaches from the notifier.
 
 Observer (Observer const &other)
 Copy constructor. Attaches this to the copied notifier.
 
Observeroperator= (Observer const &other)
 Copy-assignment operator, copies the notifier and attaches this.
 
void unset () final
 
void update (Event e) final
 

Protected Member Functions

virtual void updateImpl (Event e, Tags...)=0
 Implementation of the update method in derived class.
 

Detailed Description

template<class Event, class... Tags>
class AMDiS::Observer< Event, Tags >

Implementation of the ObserverInterface.

Member Function Documentation

◆ unset()

void unset ( )
inlinefinalvirtual

Set the Notifier* to nullptr. Used by the Notifier to avoid segfaults when destruction occurs out of order.

Implements ObserverInterface< Event >.

◆ update()

void update ( Event  e)
inlinefinalvirtual

Implementation of the interface method ObserverInterface::update. Redirects to the updateImpl method with additional Tags parameters

Implements ObserverInterface< Event >.


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