60 std::lock_guard< std::mutex > lock(
m_mutex );
77 ERRORLOG( QString(
"Event queue full, lost event type %1 value %2" )
90 std::lock_guard< std::mutex > lock(
m_mutex );
#define MAX_EVENTS
Maximum number of events to be stored in the H2Core::EventQueue::__events_buffer.
volatile unsigned int __write_index
Continuously growing number indexing the event, which has been written to the EventQueue most recentl...
EventQueue()
Constructor of the EventQueue class.
void push_event(const EventType type, const int nValue)
Queues the next event into the EventQueue.
std::mutex m_mutex
Mutex to lock access to queue.
static void create_instance()
If __instance equals 0, a new EventQueue singleton will be created and stored in it.
static EventQueue * __instance
Object holding the current EventQueue singleton.
Event __events_buffer[MAX_EVENTS]
Array of all events contained in the EventQueue.
bool m_bSilent
Whether or not to push log messages.
Event pop_event()
Reads out the next event of the EventQueue.
volatile unsigned int __read_index
Continuously growing number indexing the event, which has been read from the EventQueue most recently...
Basic building block for the communication between the core of Hydrogen and its GUI.
EventType type
Specifies the context the event is create in and which function should be triggered to handle it.
int value
Additional information to describe the actual context of the engine.
EventType
Basic types of communication between the core part of Hydrogen and its GUI.
@ EVENT_NONE
Fallback event.