2012-07-20 16:14:09 +00:00
|
|
|
#ifndef _GAMEDATA_H_
|
|
|
|
#define _GAMEDATA_H_
|
|
|
|
|
|
|
|
#include <string>
|
2012-07-27 16:58:27 +00:00
|
|
|
#include "FileData.h"
|
2012-07-20 16:14:09 +00:00
|
|
|
#include "SystemData.h"
|
|
|
|
|
2012-09-07 21:44:07 +00:00
|
|
|
//This class holds information about a game: at the least, its name, system, and path. Additional information is optional and read by other classes.
|
2012-07-27 16:58:27 +00:00
|
|
|
class GameData : public FileData
|
2012-07-20 16:14:09 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-06-28 12:54:14 +00:00
|
|
|
//static tag names for reading/writing XML documents. This might fail in PUGIXML_WCHAR_MODE
|
|
|
|
//TODO: The class should have member to read fromXML() and write toXML() probably...
|
|
|
|
static const std::string xmlTagGameList;
|
|
|
|
static const std::string xmlTagGame;
|
|
|
|
static const std::string xmlTagName;
|
|
|
|
static const std::string xmlTagPath;
|
|
|
|
static const std::string xmlTagDescription;
|
|
|
|
static const std::string xmlTagImagePath;
|
|
|
|
static const std::string xmlTagRating;
|
|
|
|
static const std::string xmlTagTimesPlayed;
|
|
|
|
|
2012-07-20 16:14:09 +00:00
|
|
|
GameData(SystemData* system, std::string path, std::string name);
|
|
|
|
|
2013-06-28 12:54:14 +00:00
|
|
|
const std::string & getName() const;
|
|
|
|
void setName(const std::string & name);
|
|
|
|
|
|
|
|
const std::string & getPath() const;
|
|
|
|
void setPath(const std::string & path);
|
|
|
|
|
|
|
|
const std::string & getDescription() const;
|
|
|
|
void setDescription(const std::string & description);
|
|
|
|
|
|
|
|
const std::string & getImagePath() const;
|
|
|
|
void setImagePath(const std::string & imagePath);
|
|
|
|
|
|
|
|
size_t getRating() const;
|
|
|
|
void setRating(size_t rating);
|
2012-08-02 01:43:55 +00:00
|
|
|
|
2013-06-28 12:54:14 +00:00
|
|
|
size_t getTimesPlayed() const;
|
|
|
|
void setTimesPlayed(size_t timesPlayed);
|
2012-08-02 01:43:55 +00:00
|
|
|
|
2013-06-28 12:54:14 +00:00
|
|
|
std::string getBashPath() const;
|
|
|
|
std::string getBaseName() const;
|
2012-08-02 01:43:55 +00:00
|
|
|
|
2013-06-28 12:54:14 +00:00
|
|
|
bool isFolder() const;
|
2012-07-20 16:14:09 +00:00
|
|
|
private:
|
|
|
|
SystemData* mSystem;
|
|
|
|
std::string mPath;
|
|
|
|
std::string mName;
|
2012-08-02 01:43:55 +00:00
|
|
|
|
|
|
|
//extra data
|
|
|
|
std::string mDescription;
|
|
|
|
std::string mImagePath;
|
2013-06-28 12:54:14 +00:00
|
|
|
size_t mRating;
|
|
|
|
size_t mTimesPlayed;
|
2012-07-20 16:14:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|