mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:47:42 +00:00
various implementations
This commit is contained in:
30
Runtime/CArchitectureQueue.hpp
Normal file
30
Runtime/CArchitectureQueue.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __RETRO_CARCHITECTUREQUEUE_HPP__
|
||||
#define __RETRO_CARCHITECTUREQUEUE_HPP__
|
||||
|
||||
#include <list>
|
||||
#include "CArchitectureMessage.hpp"
|
||||
|
||||
namespace Retro
|
||||
{
|
||||
|
||||
class CArchitectureQueue
|
||||
{
|
||||
std::list<CArchitectureMessage> m_list;
|
||||
public:
|
||||
void PushMessage(CArchitectureMessage&& msg)
|
||||
{
|
||||
m_list.push_back(std::move(msg));
|
||||
}
|
||||
const CArchitectureMessage& PeekMessage() const
|
||||
{
|
||||
return m_list.front();
|
||||
}
|
||||
void PopMessage()
|
||||
{
|
||||
m_list.pop_front();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __RETRO_CARCHITECTUREQUEUE_HPP__
|
||||
Reference in New Issue
Block a user