xo-numeric/xo-process/include/xo/process/RealizationCallback.hpp
Roland Conybeare 2450ab4ed9 Add 'xo-process/' from commit '7cfc560f02'
git-subtree-dir: xo-process
git-subtree-mainline: abd08e3491
git-subtree-split: 7cfc560f02
2025-05-11 16:10:34 -05:00

31 lines
1,010 B
C++

/* @file RealizationCallback.hpp */
#pragma once
#include "xo/reactor/Sink.hpp"
#include "xo/indentlog/print/pair.hpp"
//#include "time/Time.hpp"
#include <utility>
namespace xo {
namespace process {
/* callback for consuming stochastic process realizations */
template<typename T>
class RealizationCallback : public reactor::Sink1<std::pair<xo::time::utc_nanos, T>> {
public:
using utc_nanos = xo::time::utc_nanos;
public:
/* notification with process event (std::pair<utc_nanos, T>)
* see StochasticProcess<T>::event_type
*/
virtual void notify_ev(std::pair<utc_nanos, T> const & ev) override;
/* CallbackSet invokes these on add/remove events */
virtual void notify_add_callback() override {}
virtual void notify_remove_callback() override {}
}; /*RealizationCallback*/
} /*namespace process*/
} /*namespace xo*/
/* end RealizationCallback.hpp */