group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
EventQueue Class Reference

FIFO queue of gameplay events awaiting processing each tick. More...

#include <EventQueue.hpp>

Public Member Functions

bool isEmpty ()
 Check whether the queue contains no events.
 
void enqueue (Event event)
 Push an event onto the back of the queue.
 
Event dequeue ()
 Remove and return the front event.
 
int size ()
 Return the number of pending events.
 

Detailed Description

FIFO queue of gameplay events awaiting processing each tick.

Member Function Documentation

◆ dequeue()

Event EventQueue::dequeue ( )

Remove and return the front event.

Returns
The oldest pending event.
Here is the caller graph for this function:

◆ enqueue()

void EventQueue::enqueue ( Event  event)

Push an event onto the back of the queue.

Parameters
eventThe event to enqueue.

◆ isEmpty()

bool EventQueue::isEmpty ( )

Check whether the queue contains no events.

Returns
True if the queue is empty.
Here is the caller graph for this function:

◆ size()

int EventQueue::size ( )

Return the number of pending events.

Returns
Queue size.

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