GameServer
WarpDataMaster.h
[詳解]
1 #ifndef __WARPDATAMASTER_H__
2 #define __WARPDATAMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
10 {
11 
12 public:
13 
14 
15 
19  float X;
20  float Y;
21  float Z;
22 
23 
24 };
25 
26 bool operator <(const WarpDataItem &A, const WarpDataItem &B);
27 bool operator >(const WarpDataItem &A, const WarpDataItem &B);
28 
30 {
31 
32 private:
33 
34  typedef std::map<u32, WarpDataItem> ItemMap;
35  typedef std::map<int, ItemMap> SheetMap;
36 
37 public:
38 
39  bool Load(const MySqlConnection &Connection);
40 
41  const WarpDataItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
42 
43  std::vector<WarpDataItem> GetAllSheetItem(s32 SheetIndex) const;
44 
45  std::vector<WarpDataItem> GetAll() const;
46 
47 private:
48 
49  SheetMap Items;
50 
51 };
52 
53 #endif // #ifndef __WARPDATAMASTER_H__
std::vector< WarpDataItem > GetAll() const
Definition: WarpDataMaster.cpp:63
bool Load(const MySqlConnection &Connection)
Definition: WarpDataMaster.cpp:5
u32 ID
Definition: WarpDataMaster.h:16
float Z
Definition: WarpDataMaster.h:21
Definition: WarpDataMaster.h:29
float X
Definition: WarpDataMaster.h:19
const WarpDataItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: WarpDataMaster.cpp:38
Definition: MySqlConnection.h:15
Definition: WarpDataMaster.h:9
float Y
Definition: WarpDataMaster.h:20
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
u32 WarpDataId
Definition: WarpDataMaster.h:17
u32 AreaId
Definition: WarpDataMaster.h:18
bool operator>(const WarpDataItem &A, const WarpDataItem &B)
Definition: WarpDataMaster.cpp:83
bool operator<(const WarpDataItem &A, const WarpDataItem &B)
Definition: WarpDataMaster.cpp:78
std::vector< WarpDataItem > GetAllSheetItem(s32 SheetIndex) const
Definition: WarpDataMaster.cpp:47