25 friend CallbackStream;
28 EventPriority priority;
31 LLAPI
explicit ListenerBase(EventPriority priority, std::weak_ptr<mod::Mod> mod = mod::NativeMod::current());
34 std::weak_ptr<mod::Mod> modPtr;
41 [[nodiscard]]
constexpr ListenerId getId()
const {
return id; }
42 [[nodiscard]]
constexpr EventPriority getPriority()
const {
return priority; }
44 [[nodiscard]]
constexpr bool operator==(
ListenerBase const& other)
const noexcept {
return id == other.id; }
46 [[nodiscard]]
constexpr std::strong_ordering operator<=>(
ListenerBase const& other)
const noexcept {
47 if (priority != other.priority) {
48 return priority <=> other.priority;
50 return id <=> other.id;
55 virtual void call(
Event& event) = 0;