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"
|
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-09-28 16:16:20 +00:00
|
|
|
GameData(const std::string& path, const MetaDataList& metadata);
|
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:
|
2013-08-14 12:16:49 +00:00
|
|
|
const std::string mPath;
|
|
|
|
const std::string mBaseName;
|
2012-08-02 01:43:55 +00:00
|
|
|
|
2013-08-14 12:16:49 +00:00
|
|
|
MetaDataList mMetaData;
|
2012-07-20 16:14:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|