carb::events::IEvent¶
Defined in carb/events/IEvents.h
Inheritance Relationships¶
Base Type¶
public carb::IObject
(carb::IObject)
-
class
carb::events
::
IEvent
: public carb::IObject¶ Event object which is sent and received.
Lifetime is managed by carb::IObject refcounting.
Public Functions
-
template<typename
ValueT
>
inline voidsetValues
(const std::pair<const char*, ValueT> ¶m)¶ Helper function to build a carb.dictionary of values.
- Parameters
param – The key/value pair to include in the carb.dictionary.
-
template<typename
ValueT
, typename ...ValuesT
>
inline voidsetValues
(const std::pair<const char*, ValueT> ¶m, ValuesT&&... params)¶ Helper function to build a carb.dictionary of values.
- Parameters
param – The key/value pair to include in the carb.dictionary.
params – Additional key/value pairs.
-
virtual void
consume
() = 0¶ Stops propagation of an event during dispatch.
-
virtual size_t
addRef
() = 0¶ Atomically add one to the reference count.
- Returns
The current reference count after one was added, though this value may change before read if other threads are also modifying the reference count. The return value is guaranteed to be non-zero.
-
virtual size_t
release
() = 0¶ Atomically subtracts one from the reference count.
If the result is zero, carb::deleteHandler() is called for
this
.- Returns
The current reference count after one was subtracted. If zero is returned, carb::deleteHandler() was called for
this
.
Public Members
-
dictionary::Item *
payload
¶ Event payload is dictionary Item. Any data can be put into.
Public Static Functions
-
static inline carb::InterfaceDesc
getInterfaceDesc
()¶ Returns information about this interface. Auto-generated by CARB_PLUGIN_INTERFACE(). *
- Returns
The carb::InterfaceDesc struct with information about this interface.
-
template<typename