xo-umbrella2/xo-reactor/include/xo/reactor/EventSource.hpp
Roland Conybeare 28b6d457c0 Add 'xo-reactor/' from commit 'e3a53d10e6'
git-subtree-dir: xo-reactor
git-subtree-mainline: dd1a6b1afc
git-subtree-split: e3a53d10e6
2025-05-11 15:11:22 -05:00

25 lines
646 B
C++

/* @file EventSource.hpp */
#pragma once
#include "ReactorSource.hpp"
#include "xo/callback/CallbackSet.hpp"
namespace xo {
namespace reactor {
template</*typename Event,*/
typename Callback
/*void (Callback::*member_fn)(Event const &)*/>
class EventSource : public ReactorSource {
public:
using CallbackId = fn::CallbackId;
public:
virtual CallbackId add_callback(rp<Callback> const & cb) = 0;
virtual void remove_callback(CallbackId id) = 0;
}; /*EventSource*/
} /*namespace reactor*/
} /*namespace xo*/
/* end EventSource.hpp */