$darkmode
Go to the documentation of this file. 23 #ifndef CLOE_TRIGGER_NIL_EVENT_HPP_ 24 #define CLOE_TRIGGER_NIL_EVENT_HPP_ 59 #define DEFINE_NIL_EVENT(xName, xname, xdescription) \ 60 class xName : public ::cloe::Event { \ 62 explicit xName(const std::string& name) : ::cloe::Event(name) {} \ 63 ::cloe::EventPtr clone() const override { return std::make_unique<xName>(name()); } \ 64 void to_json(::cloe::Json&) const override {} \ 65 bool operator()(const ::cloe::Sync&) const { return true; } \ 68 class _X_FACTORY(xName) : public ::cloe::EventFactory { \ 70 using EventType = xName; \ 72 _X_FACTORY(xName)() : ::cloe::EventFactory(xname, xdescription) {} \ 74 std::unique_ptr<::cloe::Event> make(const ::cloe::Conf&) const override { \ 75 return std::make_unique<xName>(this->name()); \ 78 std::unique_ptr<::cloe::Event> make(const std::string&) const override { \ 79 return std::make_unique<xName>(this->name()); \ 83 using _X_CALLBACK(xName) = ::cloe::DirectCallback<xName>; 85 #endif // CLOE_TRIGGER_NIL_EVENT_HPP_