Colobot
|
Class for loading config file. More...
#include <config_file.h>
Public Member Functions | |
void | SetUseCurrentDirectory (bool useCurrentDirectory) |
bool | Init () |
bool | Save () |
bool | SetStringProperty (std::string section, std::string key, std::string value) |
bool | GetStringProperty (std::string section, std::string key, std::string &value) |
bool | SetIntProperty (std::string section, std::string key, int value) |
bool | SetBoolProperty (std::string section, std::string key, bool value) |
bool | GetIntProperty (std::string section, std::string key, int &value) |
bool | SetFloatProperty (std::string section, std::string key, float value) |
bool | GetFloatProperty (std::string section, std::string key, float &value) |
bool | GetBoolProperty (std::string section, std::string key, bool &value) |
Additional Inherited Members | |
![]() | |
static CConfigFile & | GetInstance () |
static CConfigFile * | GetInstancePointer () |
static bool | IsCreated () |
![]() | |
static CConfigFile * | m_instance = nullptr |
Class for loading config file.
void CConfigFile::SetUseCurrentDirectory | ( | bool | useCurrentDirectory | ) |
Set flag to force using ini file from current directory
bool CConfigFile::Init | ( | ) |
Loads colobot.ini
bool CConfigFile::Save | ( | ) |
Saves colobot.ini
bool CConfigFile::SetStringProperty | ( | std::string | section, |
std::string | key, | ||
std::string | value | ||
) |
Sets string value in section under specified key
bool CConfigFile::GetStringProperty | ( | std::string | section, |
std::string | key, | ||
std::string & | value | ||
) |
Gets string value in section under specified key
bool CConfigFile::SetIntProperty | ( | std::string | section, |
std::string | key, | ||
int | value | ||
) |
Sets int value in section under specified key
bool CConfigFile::SetBoolProperty | ( | std::string | section, |
std::string | key, | ||
bool | value | ||
) |
Sets bool value in section under specified key
bool CConfigFile::GetIntProperty | ( | std::string | section, |
std::string | key, | ||
int & | value | ||
) |
Gets int value in section under specified key value will only be changed if key exists
bool CConfigFile::SetFloatProperty | ( | std::string | section, |
std::string | key, | ||
float | value | ||
) |
Sets float value in section under specified key value will only be changed if key exists
bool CConfigFile::GetFloatProperty | ( | std::string | section, |
std::string | key, | ||
float & | value | ||
) |
Gets float value in section under specified key value will only be changed if key exists
bool CConfigFile::GetBoolProperty | ( | std::string | section, |
std::string | key, | ||
bool & | value | ||
) |
Gets bool value in section under specified key value will only be changed if key exists