2012-07-20 16:14:09 +00:00
# ifndef _SYSTEMDATA_H_
# define _SYSTEMDATA_H_
# include <vector>
# include <string>
2012-07-27 16:58:27 +00:00
# include "FolderData.h"
2013-04-08 16:52:40 +00:00
# include "Window.h"
2012-07-20 16:14:09 +00:00
class GameData ;
class SystemData
{
public :
2012-12-18 15:08:25 +00:00
SystemData ( std : : string name , std : : string descName , std : : string startPath , std : : string extension , std : : string command ) ;
2012-07-20 16:14:09 +00:00
~ SystemData ( ) ;
2012-07-27 16:58:27 +00:00
FolderData * getRootFolder ( ) ;
2012-07-20 16:14:09 +00:00
std : : string getName ( ) ;
2012-12-18 15:08:25 +00:00
std : : string getDescName ( ) ;
2012-08-08 00:50:45 +00:00
std : : string getStartPath ( ) ;
std : : string getExtension ( ) ;
2012-12-17 19:29:43 +00:00
std : : string getGamelistPath ( ) ;
2012-08-08 00:50:45 +00:00
bool hasGamelist ( ) ;
2012-07-21 19:06:24 +00:00
2013-04-08 16:52:40 +00:00
void launchGame ( Window * window , GameData * game ) ;
2012-08-08 00:50:45 +00:00
2012-07-21 20:57:53 +00:00
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 ) ;
2012-07-23 23:53:33 +00:00
static std : : string getConfigPath ( ) ;
2012-07-21 20:57:53 +00:00
static std : : vector < SystemData * > sSystemVector ;
2012-07-20 16:14:09 +00:00
private :
std : : string mName ;
2012-12-18 15:08:25 +00:00
std : : string mDescName ;
2012-07-20 16:14:09 +00:00
std : : string mStartPath ;
std : : string mSearchExtension ;
2012-07-21 19:06:24 +00:00
std : : string mLaunchCommand ;
2012-07-27 16:58:27 +00:00
void populateFolder ( FolderData * folder ) ;
2012-07-21 19:06:24 +00:00
2012-07-27 16:58:27 +00:00
FolderData * mRootFolder ;
2012-07-20 16:14:09 +00:00
} ;
# endif