7#include "ll/api/base/Macro.h"
8#include "ll/api/event/EventId.h"
20 friend class ::ll::event::Cancellable;
22 friend class CallbackStream;
24 bool mCancelled{
false};
27 LLAPI
void deserializeWithCancel(
CompoundTag const&);
30 constexpr Event() =
default;
33 LLAPI
virtual ~Event() =
default;
38 LLAPI
virtual EventId getId()
const;
40 static constexpr EventIdView CustomEventId{EmptyEventId};
44LLAPI
void registerRuntimeEventId(std::type_index type,
EventIdView eventId);
47 requires std::derived_from<std::remove_cvref_t<T>,
Event>
48void registerRuntimeEventId() {
49 using EventType = std::remove_cvref_t<T>;
50 static const bool registered = [] {
51 registerRuntimeEventId(std::type_index{
typeid(EventType)}, getEventId<EventType>);
54 static_cast<void>(registered);
Definition CompoundTag.h:23
Definition Cancellable.h:8