2005-06-28 01:04:34 +02:00
|
|
|
#ifndef MESSAGEPASSER_H__
|
|
|
|
#define MESSAGEPASSER_H__
|
|
|
|
|
2005-06-25 04:21:26 +02:00
|
|
|
namespace AtlasMessage
|
|
|
|
{
|
|
|
|
struct IMessage;
|
|
|
|
|
2005-06-28 01:04:34 +02:00
|
|
|
class MessagePasser
|
2005-06-25 04:21:26 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void Add(IMessage*)=0;
|
|
|
|
virtual IMessage* Retrieve()=0;
|
|
|
|
|
|
|
|
virtual void Query(IMessage&)=0;
|
|
|
|
virtual void QueryDone()=0;
|
|
|
|
};
|
|
|
|
|
2005-06-28 01:04:34 +02:00
|
|
|
extern MessagePasser* g_MessagePasser;
|
|
|
|
|
|
|
|
#define ADD_MESSAGE(type) AtlasMessage::g_MessagePasser->Add(new AtlasMessage::m##type)
|
2005-06-25 04:21:26 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
atlas->game command ("initialise now", "render now")
|
|
|
|
atlas->game->atlas query ("what is at position (x,y)?")
|
|
|
|
game->atlas notification ("game ended") ??
|
|
|
|
|
|
|
|
*/
|
2005-06-28 01:04:34 +02:00
|
|
|
|
|
|
|
#endif // MESSAGEPASSER_H__
|