|
CommonLibVR
|
#include <BSTEvent.h>
Public Types | |
| using | Sink = BSTEventSink< Event > |
Public Member Functions | |
| BSTEventSource () | |
| void | AddEventSink (Sink *a_eventSink) |
| template<class SinkEvent > | |
| void | AddEventSink (BSTEventSink< SinkEvent > *a_sink) |
| void | PrependEventSink (Sink *a_eventSink) |
| template<class SinkEvent > | |
| void | PrependEventSink (BSTEventSink< SinkEvent > *a_sink) |
| void | RemoveEventSink (Sink *a_eventSink) |
| void | SendEvent (const Event *a_event) |
| void | operator() (const Event *a_event) |
Public Attributes | |
| BSTArray< Sink * > | sinks |
| BSTArray< Sink * > | pendingRegisters |
| BSTArray< Sink * > | pendingUnregisters |
| BSSpinLock | lock |
| bool | notifying |
| std::uint8_t | pad51 |
| std::uint16_t | pad52 |
| std::uint32_t | pad54 |
| using RE::BSTEventSource< Event >::Sink = BSTEventSink<Event> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Adds an event sink to the front of sinks list.
When there is an ongoing notification, sinks are prepended to a pending list. Consider the following case: Add(A), Add(B), notifying=true, Add(C), Prepend(D), Prepend(E), notifying = false Sinks: A, B Pending: E, D, C Result: A, B, E, D, C
However without notifying the same chain of calls will look like this: Sinks: E, D, A, B, C
The relative order of C, D, and E is guaranteed in both cases, but, previous sinks may appear both before and after the new sinks.
|
inline |
|
inline |
|
mutable |
| bool RE::BSTEventSource< Event >::notifying |
| std::uint8_t RE::BSTEventSource< Event >::pad51 |
| std::uint16_t RE::BSTEventSource< Event >::pad52 |
| std::uint32_t RE::BSTEventSource< Event >::pad54 |
| BSTArray<Sink*> RE::BSTEventSource< Event >::pendingRegisters |
| BSTArray<Sink*> RE::BSTEventSource< Event >::pendingUnregisters |
| BSTArray<Sink*> RE::BSTEventSource< Event >::sinks |