rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testEvents.hpp
Go to the documentation of this file.
1 
10 #ifndef RAD_TEST_EVENTS_HPP
11 #define RAD_TEST_EVENTS_HPP
12 #include <rad/anyEvent.hpp>
13 
14 namespace myevents {
15 
16 struct FooEventTrait {
17  static constexpr char const* ID = "FooEvent";
18  using payload_t = std::string;
19 };
21 
22 struct BazEventTrait {
23  static constexpr char const* ID = "BazEvent";
24  using payload_t = std::string;
25 };
27 
28 class BarEvent final : public ::rad::AnyEvent {
29  public:
30  static constexpr char const* ID = "BarEvent";
31  using payload_t = void;
32 
33  BarEvent(BarEvent const&) = default;
34  BarEvent(BarEvent&&) = default;
35  BarEvent& operator=(BarEvent& e) = default;
36 
38 
39  AnyEvent* Clone() const override { return new BarEvent(*this); }
40 };
41 
42 } // namespace myevents
43 #endif // #ifndef RAD_TEST_EVENTS_HPP
static constexpr char const * ID
Definition: testEvents.hpp:23
Definition: testEvents.hpp:28
void payload_t
Definition: testEvents.hpp:31
BarEvent()
Definition: testEvents.hpp:37
Definition: testEvents.hpp:22
Definition: anyEvent.hpp:93
static constexpr char const * ID
Definition: testEvents.hpp:30
std::string payload_t
Definition: testEvents.hpp:18
Definition: anyEvent.hpp:52
AnyEvent * Clone() const override
Definition: testEvents.hpp:39
AnyEvent(char const *id)
Definition: anyEvent.cpp:13
std::string payload_t
Definition: testEvents.hpp:24
static constexpr char const * ID
Definition: testEvents.hpp:17
BarEvent & operator=(BarEvent &e)=default
Definition: testEvents.hpp:16