2012-07-20 16:14:09 +00:00
|
|
|
#ifndef _GAMEDATA_H_
|
|
|
|
#define _GAMEDATA_H_
|
|
|
|
|
|
|
|
#include <string>
|
2013-06-28 15:25:18 +00:00
|
|
|
|
2012-07-27 16:58:27 +00:00
|
|
|
#include "FileData.h"
|
2012-07-20 16:14:09 +00:00
|
|
|
#include "SystemData.h"
|
2013-08-14 12:16:49 +00:00
|
|
|
#include "MetaData.h"
|
2012-07-20 16:14:09 +00:00
|
|
|
|
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-08-14 12:16:49 +00:00
|
|
|
GameData(SystemData* system, std::string path);
|
2013-06-28 12:54:14 +00:00
|
|
|
|
2013-08-14 12:16:49 +00:00
|
|
|
const std::string& getName() const override;
|
|
|
|
const std::string& getPath() const override;
|
|
|
|
|
|
|
|
void incTimesPlayed();
|
|
|
|
void lastPlayedNow();
|
2013-06-28 15:25:18 +00:00
|
|
|
|
2013-06-28 12:54:14 +00:00
|
|
|
std::string getBashPath() const;
|
|
|
|
std::string getBaseName() const;
|
2013-09-24 05:20:53 +00:00
|
|
|
std::string getCleanName() const;
|
2012-08-02 01:43:55 +00:00
|
|
|
|
2013-08-14 12:16:49 +00:00
|
|
|
bool isFolder() const override;
|
|
|
|
|
|
|
|
MetaDataList* metadata();
|
|
|
|
|
2012-07-20 16:14:09 +00:00
|
|
|
private:
|
|
|
|
SystemData* mSystem;
|
2013-08-14 12:16:49 +00:00
|
|
|
const std::string mPath;
|
|
|
|
const std::string mBaseName;
|
2012-08-02 01:43:55 +00:00
|
|
|
|
|
|
|
//extra data
|
2013-08-14 12:16:49 +00:00
|
|
|
/*std::string mDescription;
|
2012-08-02 01:43:55 +00:00
|
|
|
std::string mImagePath;
|
2013-06-28 14:13:57 +00:00
|
|
|
float mRating;
|
2013-06-28 15:25:18 +00:00
|
|
|
float mUserRating;
|
2013-06-28 12:54:14 +00:00
|
|
|
size_t mTimesPlayed;
|
2013-08-14 12:16:49 +00:00
|
|
|
std::time_t mLastPlayed;*/
|
|
|
|
|
|
|
|
MetaDataList mMetaData;
|
2012-07-20 16:14:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|