Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
CProfile Class Reference

Class for loading profile (currently for loading ini config file) More...

#include <profile.h>

Inheritance diagram for CProfile:
Inheritance graph
[legend]

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 &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)
 

Additional Inherited Members

- Static Public Member Functions inherited from CSingleton< CProfile >
static CProfileGetInstance ()
 
static CProfileGetInstancePointer ()
 
static bool IsCreated ()
 
- Static Protected Attributes inherited from CSingleton< CProfile >
static CProfilem_instance = nullptr
 

Detailed Description

Class for loading profile (currently for loading ini config file)

Member Function Documentation

bool CProfile::GetFloatProperty ( std::string  section,
std::string  key,
float &  value 
)

Gets float value in section under specified key

Parameters
section
key
value
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
section
key
value
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
section
key
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
section
key
buffer
Returns
return true on success
bool CProfile::Init ( )

Loads colobot.ini from current directory

Returns
return true on success
bool CProfile::Save ( )

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
section
key
value
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
section
key
value
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
section
key
value
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: