2022-03-05 12:44:06 +02:00
|
|
|
|
2022-03-05 19:59:39 +02:00
|
|
|
#include <common/stl.h>
|
2022-03-05 12:44:06 +02:00
|
|
|
|
|
|
|
class CMapLocation : public singleton<CMapLocation>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef struct SLocation
|
|
|
|
{
|
2022-03-12 11:39:41 +02:00
|
|
|
int addr;
|
2022-03-05 12:44:06 +02:00
|
|
|
WORD port;
|
|
|
|
} TLocation;
|
|
|
|
|
2022-03-12 11:39:41 +02:00
|
|
|
bool Get(int x, int y, int& lMapIndex, LONG & lAddr, WORD & wPort);
|
|
|
|
bool Get(int iIndex, LONG & lAddr, WORD & wPort);
|
|
|
|
void Insert(int lIndex, const char * c_pszHost, WORD wPort);
|
2022-03-05 12:44:06 +02:00
|
|
|
|
|
|
|
protected:
|
2022-03-12 11:39:41 +02:00
|
|
|
std::map<int, TLocation> m_map_address;
|
2022-03-05 12:44:06 +02:00
|
|
|
};
|
|
|
|
|