initial implementation
This commit is contained in:
commit
532d48529f
29 changed files with 2329 additions and 0 deletions
25
include/xo/reactor/EventSource.hpp
Normal file
25
include/xo/reactor/EventSource.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* @file EventSource.hpp */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "reactor/ReactorSource.hpp"
|
||||
#include "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(ref::rp<Callback> const & cb) = 0;
|
||||
virtual void remove_callback(CallbackId id) = 0;
|
||||
}; /*EventSource*/
|
||||
|
||||
} /*namespace reactor*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end EventSource.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue