]>
Commit | Line | Data |
---|---|---|
04a66a14 | 1 | #ifndef __GS__ILEVELDAO_H__\r |
2 | #define __GS__ILEVELDAO_H__\r | |
3 | \r | |
4 | #include <GameServ/GameLayer/GameObjects/LevelGO.h>\r | |
5 | using GameServ::GameLayer::GameObjects::LevelGO;\r | |
6 | \r | |
7 | #include <boost/smart_ptr/shared_ptr.hpp>\r | |
33ae7ca7 | 8 | \r |
04a66a14 | 9 | \r |
10 | #include <list>\r | |
11 | using std::list;\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 Level Data Access Objects \r | |
18 | /*! \r | |
19 | This is the interface for all Level DAOs. Each specific datasource\r | |
20 | will need to inherit this common interface.\r | |
21 | */\r | |
22 | class ILevelDAO\r | |
23 | {\r | |
24 | public:\r | |
25 | // Ctors, Dtors ///////////////////////////////////////////////////////\r | |
26 | ILevelDAO(void);\r | |
27 | virtual ~ILevelDAO(void); // Needs to be virtual \r | |
28 | \r | |
29 | //! Get the Level using a unique data/object Id\r | |
30 | /*!\r | |
31 | \param Id Unique identifier\r | |
32 | \return A boost shared pointer to a Level game object if found\r | |
33 | otherwise the list is empty.\r | |
34 | */\r | |
33ae7ca7 | 35 | virtual boost::shared_ptr<LevelGO> GetById(const string &Id) const = 0;\r |
04a66a14 | 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 | |
33ae7ca7 | 44 | virtual void Insert(boost::shared_ptr<LevelGO> spLevel) = 0;\r |
45 | virtual void Update(boost::shared_ptr<LevelGO> spLevel) = 0;\r | |
656c03e5 | 46 | \r |
04a66a14 | 47 | private:\r |
48 | \r | |
49 | \r | |
50 | };\r | |
51 | } } }\r | |
52 | #endif // __GS__ILevelDAO_H__\r |