#ifndef UNIVERSE_H_INCLUDED
#define UNIVERSE_H_INCLUDED
#include "UWD.h"
#include "RakNetTypes.h"
namespace UWD
{
typedef std::map<SystemAddress, PlayerData> TPlayerIDMap;
/*!
* \brief
* Singleton Universe - main client manager class.
*
* The Universe Singclass is responsible for knowing everything about everything
* in the game universe. This includes client cache, creation of Galaxies,
* SolarSystems, Ships, and Players.
* The Universe is also the InstanceManager for Galaxies.
*
* TODO: Thread Safety?
*
*/
class Universe: public InstanceManager, public PacketHandler
{
private:
// Hide the Constructorz!
/*! \brief Universe constructor.*/
Universe();
~Universe();
Universe& operator=(Universe&); // Disallowed
Universe(const Universe&); // Disallowed
/*! \brief
* Map where Key is the SystemAddress of a client, and value is the PlayerData struct for that client.
* This is used as a quick lookup to find information on a certain client.
*/
TPlayerIDMap clientMap;
public:
static Universe& getSingleton();
void handlePacket(Packet* packetToHandle);
};
}
#endif // UNIVERSE_H_INCLUDED