λ61
Loading...
Searching...
No Matches
l61::EventSystem::Event Class Reference

#include <Event.hpp>

Public Types

using raw_callback_t = void()
using callback_t = std::function<raw_callback_t>

Public Member Functions

 Event (const callback_t &function)
template<typename Lambda>
requires std::is_constructible_v<callback_t, Lambda>
 Event (const Lambda &lambda)
void reset ()
bool valid () const
void set (const callback_t &function)
void call () const
 Event (Event &&event) noexcept
 Event (const Event &event)
 operator bool () const
 True if the event has a callback to be called upon.

Private Attributes

callback_t fun

Member Typedef Documentation

◆ callback_t

◆ raw_callback_t

Constructor & Destructor Documentation

◆ Event() [1/4]

l61::EventSystem::Event::Event ( const callback_t & function)
explicit

◆ Event() [2/4]

template<typename Lambda>
requires std::is_constructible_v<callback_t, Lambda>
l61::EventSystem::Event::Event ( const Lambda & lambda)
inline

◆ Event() [3/4]

l61::EventSystem::Event::Event ( Event && event)
noexcept

◆ Event() [4/4]

l61::EventSystem::Event::Event ( const Event & event)

Member Function Documentation

◆ call()

void l61::EventSystem::Event::call ( ) const

◆ operator bool()

l61::EventSystem::Event::operator bool ( ) const

True if the event has a callback to be called upon.

◆ reset()

void l61::EventSystem::Event::reset ( )

◆ set()

void l61::EventSystem::Event::set ( const callback_t & function)

◆ valid()

bool l61::EventSystem::Event::valid ( ) const

Member Data Documentation

◆ fun

callback_t l61::EventSystem::Event::fun
private

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