BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Contains collection of observers and call them at specified intervals. More...
Public Types | |
using | observer_t = std::function< void(const T &)> |
Public Member Functions | |
void | addObserver (int every_nth, observer_t observer) |
Adds observer to the list. More... | |
void | notify (const T &data) |
Notifies all observers at their personally specified intervals. More... | |
void | notify_all (const T &data) |
Contains collection of observers and call them at specified intervals.
Each observer will be called at first iteration and every-nth iterations.
Definition at line 25 of file FitObserver.h.
void FitObserver< T >::addObserver | ( | int | every_nth, |
typename FitObserver< T >::observer_t | observer | ||
) |
Adds observer to the list.
every_nth | An observer function will be called every_nth iterations. |
observer | Observer function to be called. |
Definition at line 64 of file FitObserver.h.
void FitObserver< T >::notify | ( | const T & | data | ) |
Notifies all observers at their personally specified intervals.
data | The data which will be passed to the observer. |
Definition at line 69 of file FitObserver.h.