manager.h 757 Bytes
Newer Older
Hurstel's avatar
Hurstel committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#ifndef __MANAGER_H__
#define __MANAGER_H__

#include "messager.h"

class InAppManager{
public:
	static inline void Start(){ m_messager.Start();}
	static inline void Join(){ m_messager.Join();}
	static inline void Stop(){ m_messager.Stop();}

	static inline bool addAgent(InAppMessager::Agent* agent){ return InAppManager::m_messager.addAgent(agent);}
	static inline void broadcastMessage(const InAppMessage& iam){ InAppManager::m_messager.broadcastMessage(iam);}
	static inline void removeAgent(InAppMessager::Agent* agent){ InAppManager::m_messager.removeAgent(agent);}

	static inline bool isRegistered(unsigned int agentID){return InAppManager::m_messager.isRegistered(agentID);}
protected:
	static InAppMessager m_messager;
};


#endif //__MANAGER_H__