My Project
QuestDBProvider.h
1 #pragma once
2 #include "ic/ParaDatabase.h"
3 #include ".\StringTable.h"
4 
5 namespace ParaEngine
6 {
8  {
10  __int64 ID;
11  stStringTableDbRecord QuestName; // record in string table
12 
15  string IntroVideoAssetName;
16  bool IsGlobal;
17 
20  string IntroVideoFilePath;
21 
23  bool IsComplete;
24  stStringTableDbRecord QuestDesc; // record in string table
25  string AcquireQuestRequirement;
26  string CompleteQuestRequirement;
27  string Reward;
28 
30  string Reserved1;
31  string Reserved2;
32  string Reserved3;
33  string Reserved4;
34  string Reserved5;
35  };
36 
37  // Class CQuestDBProvider: CQuestDBProvider contains all functions to access the
38  // quest database and the user interface data of quest control.
39  // This is a singleton class. Call GetInstance() to use this class.
41  {
42  public:
43  CQuestDBProvider(void);
45  ~CQuestDBProvider(void);
46  protected:
47  private:
48 
50  ParaEngine::asset_ptr<ParaInfoCenter::DBEntity> m_pDataBase;
51 
52  public:
54  static CQuestDBProvider & GetInstance();
56  ParaInfoCenter::DBEntity* GetDBEntity();
58  void SetDBEntity(ParaInfoCenter::DBEntity* pDb);
59 
60 //#define TEST_QUEST
61 #ifdef TEST_QUEST
62  public:
63  // TODO: only for test
64  void TestDB();
65 #endif
66 
67  public:
72  bool InsertQuestRecord(stQuestDbRecord& record);
73 
78  bool DeleteQuestRecordByID(int ID);
79  };
80 }
string TopSnapShotFilePath
UI Related Attribute.
Definition: QuestDBProvider.h:19
Definition: QuestDBProvider.h:7
different physics engine has different winding order.
Definition: EventBinding.h:32
__int64 ID
Common Attribute.
Definition: QuestDBProvider.h:10
Definition: QuestDBProvider.h:40
string Reserved1
Reserved Attribute.
Definition: QuestDBProvider.h:30
bool IsComplete
Quest Content Attribute.
Definition: QuestDBProvider.h:23
string TopSnapShotAssetName
Engine Asset Management Attribute.
Definition: QuestDBProvider.h:14
Definition: StringTable.h:7
a single database file.
Definition: ICDBManager.h:39