]>
Commit | Line | Data |
---|---|---|
04a66a14 | 1 | #ifndef __GS__IMONSTERDAO_H__\r |
2 | #define __GS__IMONSTERDAO_H__\r | |
3 | \r | |
4 | #include <GameServ/GameLayer/GameObjects/MonsterGO.h>\r | |
5 | using GameServ::GameLayer::GameObjects::MonsterGO;\r | |
6 | \r | |
7 | #include <boost/smart_ptr/shared_ptr.hpp>\r | |
8 | using boost::shared_ptr;\r | |
9 | \r | |
10 | #include <vector>\r | |
11 | using std::vector;\r | |
12 | #include <string>\r | |
13 | using std::string;\r | |
14 | \r | |
15 | namespace GameServ { namespace DataLayer { namespace DataAccessObjects\r | |
16 | {\r | |
17 | //! Interface for Monster Data Access Objects \r | |
18 | /*! \r | |
19 | This is the interface for all Monster DAOs. Each specific datasource\r | |
20 | will need to inherit this common interface.\r | |
21 | */\r | |
22 | class IMonsterDAO\r | |
23 | {\r | |
24 | public:\r | |
25 | // Ctors, Dtors ///////////////////////////////////////////////////////\r | |
26 | IMonsterDAO(void);\r | |
27 | virtual ~IMonsterDAO(void); // Needs to be virtual \r | |
28 | \r | |
29 | //! Get the Monster using a unique data/object Id\r | |
30 | /*!\r | |
31 | \param Id Unique identifier\r | |
32 | \return A boost shared pointer to a Monster game object if found\r | |
33 | otherwise the list is empty.\r | |
34 | */\r | |
35 | virtual shared_ptr<MonsterGO> GetById(const string &Id) const = 0;\r | |
36 | \r | |
37 | //! Function to quickly search to see if an Id exists or not\r | |
38 | /*!\r | |
39 | \param Id The Id of the game object to search for\r | |
40 | \return true if the Id is valid and exists in the data, false otherwise\r | |
41 | */\r | |
42 | virtual bool IdExists(const string &Id) const = 0;\r | |
43 | \r | |
fadef98f | 44 | virtual vector<string> GetMonsterIdsByLevelId(const string &LevelId) const = 0;\r |
04a66a14 | 45 | \r |
46 | private:\r | |
47 | \r | |
48 | \r | |
49 | };\r | |
50 | } } }\r | |
51 | #endif // __GS__IMonsterDAO_H__\r |