Class for loading profile (currently for loading ini config file)
More...
#include <profile.h>
|
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 &buffer) |
|
bool | SetIntProperty (std::string section, std::string key, int 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) |
|
std::vector< std::string > | GetSection (std::string section, std::string key) |
|
|
static CProfile & | GetInstance () |
|
static CProfile * | GetInstancePointer () |
|
static bool | IsCreated () |
|
static CProfile * | m_instance = nullptr |
|
Class for loading profile (currently for loading ini config file)
bool CProfile::GetFloatProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
float & |
value |
|
) |
| |
Gets float value in section under specified key
- Parameters
-
- Returns
- return true on success
bool CProfile::GetIntProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
int & |
value |
|
) |
| |
Gets int value in section under specified key
- Parameters
-
- Returns
- return true on success
std::vector< std::string > CProfile::GetSection |
( |
std::string |
section, |
|
|
std::string |
key |
|
) |
| |
Gets all values in section under specified key
- Parameters
-
- Returns
- vector of values
bool CProfile::GetStringProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
std::string & |
buffer |
|
) |
| |
Gets string value in section under specified key
- Parameters
-
- Returns
- return true on success
Loads colobot.ini from current directory
- Returns
- return true on success
Saves colobot.ini to current directory
- Returns
- return true on success
bool CProfile::SetFloatProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
float |
value |
|
) |
| |
Sets float value in section under specified key
- Parameters
-
- Returns
- return true on success
bool CProfile::SetIntProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
int |
value |
|
) |
| |
Sets int value in section under specified key
- Parameters
-
- Returns
- return true on success
bool CProfile::SetStringProperty |
( |
std::string |
section, |
|
|
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
Sets string value in section under specified key
- Parameters
-
- Returns
- return true on success
void CProfile::SetUseCurrentDirectory |
( |
bool |
useCurrentDirectory | ) |
|
Set flag to force using ini file from current directory
The documentation for this class was generated from the following files:
- /build/colobot-B0_a19/colobot-0.1.5/src/common/profile.h
- /build/colobot-B0_a19/colobot-0.1.5/src/common/profile.cpp