engine-mk1
Public Member Functions | List of all members
rz::eventstream::EventStream Class Reference

Handles receiving and sending Events to and from EventStreams. More...

#include <EventStream.hpp>

Public Member Functions

 EventStream () noexcept
 Default constructor. More...
 
void pushEvent (Event event, StreamType streamType)
 Pushes an Event onto this EventStream. More...
 
void pushEvents (const std::vector< Event > &events, StreamType streamType)
 Pushes a vector of Events onto this EventStream. More...
 
Event popEvent (StreamType streamType)
 Pops an Event from this EventStream. More...
 
std::vector< EventpopEvents (StreamType streamType)
 Pops a std::vector of Events from this EventStream. More...
 
void registerHandler (EventType type, EventHandler handler)
 Register an EventHandler to the passed EventType. More...
 
void extendHandler (EventType type, EventHandler extensionHandler)
 Extend the EventHandler of the passed EventType by calling. More...
 
void processEvents ()
 Processes all incoming Events with their respective handlers. More...
 

Detailed Description

Handles receiving and sending Events to and from EventStreams.

Constructor & Destructor Documentation

EventStream::EventStream ( )
noexcept

Default constructor.

Member Function Documentation

void EventStream::extendHandler ( EventType  type,
EventHandler  extensionHandler 
)

Extend the EventHandler of the passed EventType by calling.

Remarks
Thread-safe, blocking. Allows for 1 thread to register an EventHandler at a time.
Event EventStream::popEvent ( StreamType  streamType)

Pops an Event from this EventStream.

Remarks
Thread-safe, blocking. Allows for 1 thread to access incoming Events and a 2nd thread to access outgoing events simultaneasly.
std::vector< Event > EventStream::popEvents ( StreamType  streamType)

Pops a std::vector of Events from this EventStream.

Remarks
Thread-safe, blocking. Allows for 1 thread to access incoming Events and a 2nd thread to access outgoing events simultaneasly.
void EventStream::processEvents ( )

Processes all incoming Events with their respective handlers.

Remarks
Thread-safe, blocking. Allows for 1 thread to process events at a time.
void EventStream::pushEvent ( Event  event,
StreamType  streamType 
)

Pushes an Event onto this EventStream.

Remarks
Thread-safe, blocking. Allows for 1 thread to access incoming Events and a 2nd thread to access outgoing events simultaneasly.
void EventStream::pushEvents ( const std::vector< Event > &  events,
StreamType  streamType 
)

Pushes a vector of Events onto this EventStream.

Remarks
Thread-safe, blocking. Allows for 1 thread to access incoming Events and a 2nd thread to access outgoing events simultaneasly.
void EventStream::registerHandler ( EventType  type,
EventHandler  handler 
)

Register an EventHandler to the passed EventType.

Remarks
Thread-safe, blocking. Allows for 1 thread to register an EventHandler at a time.

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