group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
EventQueue.hpp
Go to the documentation of this file.
1
3
4#pragma once
5#include "Event.hpp"
6
7#include <queue>
8
11{
12public:
15 bool isEmpty();
16
19 void enqueue(Event event);
20
23 Event dequeue();
24
27 int size();
28
29private:
30 std::queue<Event> events;
31};
Client Event structure to be consumed by server game loop.
FIFO queue of gameplay events awaiting processing each tick.
Definition EventQueue.hpp:11
void enqueue(Event event)
Push an event onto the back of the queue.
Definition EventQueue.cpp:13
int size()
Return the number of pending events.
Definition EventQueue.cpp:28
bool isEmpty()
Check whether the queue contains no events.
Definition EventQueue.cpp:8
Event dequeue()
Remove and return the front event.
Definition EventQueue.cpp:18
A single gameplay event produced by network input processing.
Definition Event.hpp:10