2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-08-20 02:52:07 +00:00
|
|
|
|
|
|
|
#include <list>
|
2019-09-22 21:52:05 +00:00
|
|
|
#include "Runtime/CArchitectureMessage.hpp"
|
2015-08-20 02:52:07 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
|
|
|
|
class CArchitectureQueue {
|
|
|
|
std::list<CArchitectureMessage> m_list;
|
2015-08-20 02:52:07 +00:00
|
|
|
|
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
void Push(CArchitectureMessage&& msg) { m_list.push_back(std::move(msg)); }
|
|
|
|
CArchitectureMessage Pop() {
|
|
|
|
CArchitectureMessage msg = std::move(m_list.front());
|
|
|
|
m_list.pop_front();
|
|
|
|
return msg;
|
|
|
|
}
|
|
|
|
void Clear() { m_list.clear(); }
|
2020-03-15 01:42:35 +00:00
|
|
|
explicit operator bool() const { return !m_list.empty(); }
|
2015-08-20 02:52:07 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|