1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/MessagePasserImpl.h
Ykkrosh 5228800b73 # Fixed Linux build
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.

This was SVN commit r6574.
2009-01-02 21:19:41 +00:00

27 lines
574 B
C++

#include "MessagePasser.h"
#include "ps/ThreadUtil.h"
#include "ps/CStr.h"
#include <queue>
class MessagePasserImpl : public AtlasMessage::MessagePasser, noncopyable
{
public:
MessagePasserImpl();
~MessagePasserImpl();
virtual void Add(AtlasMessage::IMessage* msg);
virtual AtlasMessage::IMessage* Retrieve();
virtual void Query(AtlasMessage::QueryMessage* qry, void(*timeoutCallback)());
bool IsEmpty();
void SetTrace(bool t);
private:
CMutex m_Mutex;
CStr m_SemaphoreName;
sem_t* m_Semaphore;
std::queue<AtlasMessage::IMessage*> m_Queue;
bool m_Trace;
};