ES-DE/src/SystemData.h

53 lines
1.4 KiB
C
Raw Normal View History

#ifndef _SYSTEMDATA_H_
#define _SYSTEMDATA_H_
#include <vector>
#include <string>
#include "FolderData.h"
2013-04-08 16:52:40 +00:00
#include "Window.h"
#include "MetaData.h"
#include "PlatformId.h"
class GameData;
class SystemData
{
public:
2013-09-28 16:10:06 +00:00
SystemData(const std::string& name, const std::string& fullName, const std::string& startPath, const std::string& extension,
const std::string& command, PlatformIds::PlatformId platformId = PlatformIds::PLATFORM_UNKNOWN);
~SystemData();
FolderData* getRootFolder();
std::string getName();
std::string getFullName();
std::string getStartPath();
std::string getExtension();
std::string getGamelistPath();
2013-09-28 16:10:06 +00:00
PlatformIds::PlatformId getPlatformId();
bool hasGamelist();
std::vector<MetaDataDecl> getGameMDD();
2013-04-08 16:52:40 +00:00
void launchGame(Window* window, GameData* game);
static void deleteSystems();
2013-07-09 10:37:37 +00:00
static bool loadConfig(const std::string& path, bool writeExampleIfNonexistant = true); //Load the system config file at getConfigPath(). Returns true if no errors were encountered. An example can be written if the file doesn't exist.
static void writeExampleConfig(const std::string& path);
static std::string getConfigPath();
static std::vector<SystemData*> sSystemVector;
private:
std::string mName;
std::string mFullName;
std::string mStartPath;
std::string mSearchExtension;
std::string mLaunchCommand;
PlatformIds::PlatformId mPlatformId;
void populateFolder(FolderData* folder);
FolderData* mRootFolder;
};
#endif