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