CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
RE::BSTEventSource< Event > Class Template Reference

#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
 

Member Typedef Documentation

◆ Sink

template<class Event >
using RE::BSTEventSource< Event >::Sink = BSTEventSink<Event>

Constructor & Destructor Documentation

◆ BSTEventSource()

template<class Event >
RE::BSTEventSource< Event >::BSTEventSource ( )
inline

Member Function Documentation

◆ AddEventSink() [1/2]

template<class Event >
template<class SinkEvent >
void RE::BSTEventSource< Event >::AddEventSink ( BSTEventSink< SinkEvent > *  a_sink)
inline

◆ AddEventSink() [2/2]

template<class Event >
void RE::BSTEventSource< Event >::AddEventSink ( Sink a_eventSink)
inline

◆ operator()()

template<class Event >
void RE::BSTEventSource< Event >::operator() ( const Event *  a_event)
inline

◆ PrependEventSink() [1/2]

template<class Event >
template<class SinkEvent >
void RE::BSTEventSource< Event >::PrependEventSink ( BSTEventSink< SinkEvent > *  a_sink)
inline

◆ PrependEventSink() [2/2]

template<class Event >
void RE::BSTEventSource< Event >::PrependEventSink ( Sink a_eventSink)
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.

◆ RemoveEventSink()

template<class Event >
void RE::BSTEventSource< Event >::RemoveEventSink ( Sink a_eventSink)
inline

◆ SendEvent()

template<class Event >
void RE::BSTEventSource< Event >::SendEvent ( const Event *  a_event)
inline

Member Data Documentation

◆ lock

template<class Event >
BSSpinLock RE::BSTEventSource< Event >::lock
mutable

◆ notifying

template<class Event >
bool RE::BSTEventSource< Event >::notifying

◆ pad51

template<class Event >
std::uint8_t RE::BSTEventSource< Event >::pad51

◆ pad52

template<class Event >
std::uint16_t RE::BSTEventSource< Event >::pad52

◆ pad54

template<class Event >
std::uint32_t RE::BSTEventSource< Event >::pad54

◆ pendingRegisters

template<class Event >
BSTArray<Sink*> RE::BSTEventSource< Event >::pendingRegisters

◆ pendingUnregisters

template<class Event >
BSTArray<Sink*> RE::BSTEventSource< Event >::pendingUnregisters

◆ sinks

template<class Event >
BSTArray<Sink*> RE::BSTEventSource< Event >::sinks

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