
#include <Spectre/System/MessageQueue.h>

void MessageQueue::postEvent(SysEvent& event)
{
	m_queue.push_back(event);
}

bool MessageQueue::pollEvent(SysEvent& event)
{
	if (!isEmpty()) {
		event = m_queue.front();
		m_queue.pop_front();
		return true;
	}
	return false;
}

bool MessageQueue::isEmpty() const
{
	return m_queue.empty();
}
