metaforce/Runtime/CArchitectureQueue.hpp

23 lines
488 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 "CArchitectureMessage.hpp"
2018-12-08 05:30:43 +00:00
namespace urde {
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(); }
operator bool() const { return m_list.size() != 0; }
2015-08-20 02:52:07 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde