// TOOD: rename to RpCallbackSet /* @file CallbackSet.hpp */ #pragma once #include "CallbackSetImpl.hpp" namespace xo { namespace fn { template using RpCallbackSet = CallbackSetImpl>; /* like RpCallbackSet, * but also provides overload(s) for operator()(..) */ template class NotifyCallbackSet : public RpCallbackSet { public: NotifyCallbackSet(MemberFn fn) : privileged_member_fn_{fn} {} template void operator()(Tn&&... args) { this->invoke(this->privileged_member_fn_, args...); } private: /** implements NotifyCallbackSet's operator()(...) **/ MemberFn privileged_member_fn_; }; template inline NotifyCallbackSet make_notify_cbset(Sret (NativeFn::* member_fn)(Sn...)) { return NotifyCallbackSet(member_fn); } /*make_notify_cbset*/ } /*namespace fn*/ } /*namespace xo*/ /* end CallbackSet.hpp */