15 #include "eventQueue.h"
16 #include "config_event.h"
17 #include "lightMutexHolder.h"
19 EventQueue *EventQueue::_global_event_queue = NULL;
28 EventQueue() : _lock(
"EventQueue::_lock") {
48 if (event->get_name().empty()) {
55 _queue.push_back(event);
56 if (event_cat.is_spam() || event_cat.is_debug()) {
57 if (event->get_name() ==
"NewFrame") {
60 <<
"Throwing event " << *
event <<
"\n";
63 <<
"Throwing event " << *
event <<
"\n";
88 is_queue_empty()
const {
90 return _queue.empty();
117 nassertr(!result.
is_null(), result);
127 make_global_event_queue() {
bool is_queue_full() const
This function is deprecated–the queue is never full these days.
A queue of pending events.
Similar to MutexHolder, but for a light mutex.
bool is_null() const
Returns true if the PointerTo is a NULL pointer, false otherwise.
void clear()
Empties all events on the queue, throwing them on the floor.
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing...