LeviLamina
Loading...
Searching...
No Matches
ll::event::Listener< T > Class Template Reference
+ Inheritance diagram for ll::event::Listener< T >:

Public Types

using event_type = T
 
using callback_fn = std::function<void(event_type&)>
 

Public Member Functions

 Listener (callback_fn fn, EventPriority priority=EventPriority::Normal, std::weak_ptr< mod::Mod > mod=mod::NativeMod::current())
 
void call (Event &event) override
 
constexpr ListenerId getId () const
 
constexpr EventPriority getPriority () const
 
constexpr bool operator== (ListenerBase const &other) const noexcept
 
constexpr std::strong_ordering operator<=> (ListenerBase const &other) const noexcept
 

Static Public Member Functions

static std::shared_ptr< Listenercreate (callback_fn fn, EventPriority priority=EventPriority::Normal, std::weak_ptr< mod::Mod > mod=mod::NativeMod::current())
 

Public Attributes

std::weak_ptr< mod::ModmodPtr
 

Member Function Documentation

◆ call()

template<std::derived_from< Event > T>
void ll::event::Listener< T >::call ( Event & event)
inlineoverridevirtual

The documentation for this class was generated from the following file: