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"
2013-09-19 23:41:14 +00:00
# include "MetaData.h"
2013-09-24 21:27:20 +00:00
# include "PlatformId.h"
2012-07-20 16:14:09 +00:00
class GameData ;
class SystemData
{
public :
2013-10-26 19:07:30 +00:00
SystemData ( const std : : string & name , const std : : string & fullName , const std : : string & startPath , const std : : vector < std : : string > & extensions ,
2013-09-28 16:10:06 +00:00
const std : : string & command , PlatformIds : : PlatformId platformId = PlatformIds : : PLATFORM_UNKNOWN ) ;
2012-07-20 16:14:09 +00:00
~ SystemData ( ) ;
2012-07-27 16:58:27 +00:00
FolderData * getRootFolder ( ) ;
2013-10-26 19:07:30 +00:00
2012-07-20 16:14:09 +00:00
std : : string getName ( ) ;
2013-08-13 06:56:10 +00:00
std : : string getFullName ( ) ;
2012-08-08 00:50:45 +00:00
std : : string getStartPath ( ) ;
2013-10-26 19:07:30 +00:00
std : : vector < std : : string > getExtensions ( ) ;
2013-09-28 16:10:06 +00:00
PlatformIds : : PlatformId getPlatformId ( ) ;
2013-10-26 19:07:30 +00:00
std : : string getGamelistPath ( ) ;
2012-08-08 00:50:45 +00:00
bool hasGamelist ( ) ;
2013-11-04 01:54:13 +00:00
2013-09-29 02:54:15 +00:00
unsigned int getGameCount ( ) ;
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 ;
2013-08-13 06:56:10 +00:00
std : : string mFullName ;
2012-07-20 16:14:09 +00:00
std : : string mStartPath ;
2013-10-26 19:07:30 +00:00
std : : vector < std : : string > mSearchExtensions ;
2012-07-21 19:06:24 +00:00
std : : string mLaunchCommand ;
2013-09-24 21:27:20 +00:00
PlatformIds : : PlatformId mPlatformId ;
2012-07-21 19:06:24 +00:00
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
2013-09-24 21:27:20 +00:00