0ad/source/tools/atlas/GameInterface/MessagePasser.h
Ykkrosh 599452af85 Atlas: Camera controls.
Elsewhere: Quaternion stuff.

This was SVN commit r2734.
2005-09-15 05:31:49 +00:00

25 lines
582 B
C++

#ifndef MESSAGEPASSER_H__
#define MESSAGEPASSER_H__
namespace AtlasMessage
{
template <typename T> class MessagePasser
{
public:
virtual void Add(T*)=0;
virtual T* Retrieve()=0;
};
struct mCommand;
struct mInput;
extern MessagePasser<mCommand>* g_MessagePasser_Command;
extern MessagePasser<mInput>* g_MessagePasser_Input;
#define POST_COMMAND(type) AtlasMessage::g_MessagePasser_Command->Add(new AtlasMessage::m##type)
#define POST_INPUT(type) AtlasMessage::g_MessagePasser_Input -> Add(new AtlasMessage::m##type)
}
#endif // MESSAGEPASSER_H__