neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_event.hpp File Reference
#include <neolib/neolib.hpp>
#include <functional>
#include <neolib/core/mutex.hpp>
#include <neolib/core/lifetime.hpp>
#include <neolib/core/reference_counted.hpp>

Go to the source code of this file.

Classes

class  neolib::i_async_event_queue
 
class  neolib::i_slot_base
 
class  neolib::i_slot< Args >
 
struct  neolib::slot_proxy< Args >
 
class  neolib::i_event< Args >
 
class  neolib::slot< Args >
 
class  neolib::sink
 

Namespaces

namespace  neolib
 
namespace  neolib::event_system
 

Macros

#define detail_event_subscribe(declName, ...)
 
#define declare_event(declName, ...)
 

Enumerations

enum class  neolib::trigger_type { neolib::Synchronous , neolib::SynchronousDontQueue , neolib::Asynchronous , neolib::AsynchronousDontQueue }
 
enum class  neolib::trigger_result { neolib::Unknown , neolib::Unaccepted , neolib::Accepted }
 

Functions

switchable_mutexneolib::event_mutex ()
 
void neolib::event_system::set_single_threaded ()
 
void neolib::event_system::set_multi_threaded ()
 
bool neolib::event_consumed (trigger_result aTriggerResult)
 

Macro Definition Documentation

◆ declare_event

#define declare_event (   declName,
  ... 
)
Value:
virtual const neolib::i_event<__VA_ARGS__>& ev_##declName() const = 0;\
virtual neolib::i_event<__VA_ARGS__>& ev_##declName() = 0;\
const neolib::i_event<__VA_ARGS__>& declName() const { return ev_##declName(); }\
neolib::i_event<__VA_ARGS__>& declName() { return ev_##declName(); }\
detail_event_subscribe(declName, __VA_ARGS__)

Definition at line 305 of file i_event.hpp.

◆ detail_event_subscribe

#define detail_event_subscribe (   declName,
  ... 
)
Value:
neolib::slot_proxy<__VA_ARGS__> declName(const std::function<void(__VA_ARGS__)>& aCallback) const { return declName()(aCallback); }\
neolib::slot_proxy<__VA_ARGS__> declName(const std::function<void(__VA_ARGS__)>& aCallback) { return declName()(aCallback); }

Definition at line 301 of file i_event.hpp.