#ifndef _SYSTEMDATA_H_ #define _SYSTEMDATA_H_ #include #include #include "FileData.h" #include "Window.h" #include "MetaData.h" #include "PlatformId.h" class SystemData { public: SystemData(const std::string& name, const std::string& fullName, const std::string& startPath, const std::vector& extensions, const std::string& command, PlatformIds::PlatformId platformId = PlatformIds::PLATFORM_UNKNOWN); ~SystemData(); inline FileData* getRootFolder() const { return mRootFolder; }; inline const std::string& getName() const { return mName; } inline const std::string& getFullName() const { return mFullName; } inline const std::string& getStartPath() const { return mStartPath; } inline const std::vector& getExtensions() const { return mSearchExtensions; } inline PlatformIds::PlatformId getPlatformId() const { return mPlatformId; } std::string getGamelistPath() const; bool hasGamelist(); unsigned int getGameCount() const; void launchGame(Window* window, FileData* game); static void deleteSystems(); 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 sSystemVector; private: std::string mName; std::string mFullName; std::string mStartPath; std::vector mSearchExtensions; std::string mLaunchCommand; PlatformIds::PlatformId mPlatformId; void populateFolder(FileData* folder); FileData* mRootFolder; }; #endif