]>
jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/ILevelDAO.h
1 #ifndef __GS__ILEVELDAO_H__
2 #define __GS__ILEVELDAO_H__
4 #include <GameServ/GameLayer/GameObjects/LevelGO.h>
5 using GameServ::GameLayer::GameObjects::LevelGO
;
7 #include <boost/smart_ptr/shared_ptr.hpp>
8 using boost::shared_ptr
;
15 namespace GameServ
{ namespace DataLayer
{ namespace DataAccessObjects
17 //! Interface for Level Data Access Objects
19 This is the interface for all Level DAOs. Each specific datasource
20 will need to inherit this common interface.
25 // Ctors, Dtors ///////////////////////////////////////////////////////
27 virtual ~ILevelDAO(void); // Needs to be virtual
29 //! Get the Level using a unique data/object Id
31 \param Id Unique identifier
32 \return A boost shared pointer to a Level game object if found
33 otherwise the list is empty.
35 virtual shared_ptr
<LevelGO
> GetById(const string
&Id
) const = 0;
37 //! Function to quickly search to see if an Id exists or not
39 \param Id The Id of the game object to search for
40 \return true if the Id is valid and exists in the data, false otherwise
42 virtual bool IdExists(const string
&Id
) const = 0;
49 #endif // __GS__ILevelDAO_H__