$darkmode
Go to the documentation of this file.
58 #define DEFINE_NIL_EVENT(xName, xname, xdescription) \
59 class xName : public ::cloe::Event { \
61 explicit xName(const std::string& name) : ::cloe::Event(name) {} \
62 ::cloe::EventPtr clone() const override { return std::make_unique<xName>(name()); } \
63 void to_json(::cloe::Json&) const override {} \
64 bool operator()(const ::cloe::Sync&) const { return true; } \
67 class _X_FACTORY(xName) : public ::cloe::EventFactory { \
69 using EventType = xName; \
71 _X_FACTORY(xName)() : ::cloe::EventFactory(xname, xdescription) {} \
73 std::unique_ptr<::cloe::Event> make(const ::cloe::Conf&) const override { \
74 return std::make_unique<xName>(this->name()); \
77 std::unique_ptr<::cloe::Event> make(const std::string&) const override { \
78 return std::make_unique<xName>(this->name()); \
82 using _X_CALLBACK(xName) = ::cloe::DirectCallback<xName>;