metaforce/Runtime/CArchitectureQueue.hpp

23 lines
512 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2015-08-20 02:52:07 +00:00
#include <list>
#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(); }
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