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