AMDiS 2.10
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
 
virtual void update (Event e)=0
 
virtual void unset ()=0
 

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 >.

References Observer< Event, Tags >::updateImpl().


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