Opm::Event Struct Referenceabstract

#include <Event.hpp>

Public Member Functions

virtual Eventadd (const std::function< void()> &handler)=0
 
template<typename T , void(T::*)() member>
Eventadd (T &t)
 
template<typename T , void(T::*)() member>
Eventadd (T &t)
 

Detailed Description

Interface to register interest in receiving notifications when a certain event, such as the completion of a timestep, has happened.

Member Function Documentation

template<typename T , void(T::*)() member>
Event& Opm::Event::add ( T &  t)
inline
virtual Event& Opm::Event::add ( const std::function< void()> &  handler)
pure virtual

Register a callback to receive notifications from this event.

Parameters
[in]handlerFunction object that will be invoked when the event happens.
Returns
The event object itself, so that multiple additions can be chained.
Note
The event may happen several times, and the handler will receive a notification every time.
If a handler is added more than once, it will also be called more than once.
template<typename T , void(T::*)() member>
Event& Opm::Event::add ( T &  t)

Convenience routine to add a member function of a class as an event handler.

This allows us to have all the necessary information the handler needs put into an object, and then register this with the event.


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