]> jfr.im git - irc/gameservirc.git/blame - gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/ILevelDAO.h
Added the asio framework to start developing a GameServ server
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / include / GameServ / DataLayer / ILevelDAO.h
CommitLineData
04a66a14 1#ifndef __GS__ILEVELDAO_H__\r
2#define __GS__ILEVELDAO_H__\r
3\r
4#include <GameServ/GameLayer/GameObjects/LevelGO.h>\r
5using 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
11using std::list;\r
12#include <string>\r
13using std::string;\r
14\r
15namespace 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