My Project
ChestDBProvider.h
1 #pragma once
2 #include "ic/ParaDatabase.h"
3 #include ".\StringTable.h"
4 
5 namespace ParaEngine
6 {
8  {
10  __int64 ID;
12  stStringTableDbRecord ChestName; // record in string table
13 
15  string AssetName;
16  bool IsSnapToTerrain;
17 
20  float ChestModelScale;
21  float ChestRadius;
22  float ChestFacing;
23  float posX;
24  float posY;
25  float posZ;
26 
30  int NumberOfPassPuzzles;
31 
33  string Reward;
34 
36  string Reserved1;
37  string Reserved2;
38  string Reserved3;
39  string Reserved4;
40  string Reserved5;
41  };
42 
43  // Class CChestDBProvider: CChestDBProvider contains all functions to access the
44  // chest database and the user interface data of chest control.
45  // This is a singleton class. Call GetInstance() to use this class.
47  {
48  public:
49  CChestDBProvider(void);
51  ~CChestDBProvider(void);
52  protected:
53  private:
54 
56  ParaEngine::asset_ptr<ParaInfoCenter::DBEntity> m_pDataBase;
57 
58  public:
60  static CChestDBProvider & GetInstance();
62  ParaInfoCenter::DBEntity* GetDBEntity();
64  void SetDBEntity(ParaInfoCenter::DBEntity* pDb);
65 
66 //#define TEST_CHEST
67 #ifdef TEST_CHEST
68  public:
69  // TODO: only for test
70  void TestDB();
71 #endif
72 
73  public:
78  bool InsertChestRecord(stChestDbRecord& record);
79 
84  bool DeleteChestRecordByID(int ID);
85  };
86 }
Definition: ChestDBProvider.h:46
Definition: ChestDBProvider.h:7
int NumberOfAllPuzzles
difficulty rate where puzzles are randomly picked
Definition: ChestDBProvider.h:29
different physics engine has different winding order.
Definition: EventBinding.h:32
string AssetName
Engine Asset Management Attribute.
Definition: ChestDBProvider.h:15
string Reserved1
Reserved Attribute.
Definition: ChestDBProvider.h:36
__int64 ID
Common Attribute.
Definition: ChestDBProvider.h:10
int DifficultyRate
Difficulty Attribute.
Definition: ChestDBProvider.h:28
string Reward
Reward Attribute.
Definition: ChestDBProvider.h:33
string ChestModeFilePath
Appearance Related Attribute.
Definition: ChestDBProvider.h:19
Definition: StringTable.h:7
a single database file.
Definition: ICDBManager.h:39
stStringTableDbRecord ChestName
ATTENTION: different chest may have the same name.
Definition: ChestDBProvider.h:12