| 12345678910111213141516171819202122232425262728293031 |
- #pragma once
- #include <cstdlib>
- #include <string>
- #include <reflection/context.h>
- #include <reflection/object.h>
- #include <engine/forwards.h>
- namespace engine {
- class Event {
- private:
- uint64_t id_;
- std::string_view type_;
- reflection::Object source_;
- reflection::Context context_;
- public:
- Event(std::string_view type, reflection::Object const & source,
- reflection::Context const & context);
- bool is_a(std::string_view type) const { return type_ == type; }
- std::string_view type() const { return type_; }
- reflection::Object const & source() const { return source_; }
- reflection::Context const & context() const { return context_; }
- };
- }
|