Provide simple access to engine configuration options from an INI file #TODO Parse command line options as well.
More...
#include <FlingConfig.h>
Inherits Fling::Singleton< FlingConfig >.
|
static std::string | GetString (const std::string &t_Section, const std::string &t_Key) |
|
static int | GetInt (const std::string &t_Section, const std::string &t_Key, const int t_DefaultVal=-1) |
|
static bool | GetBool (const std::string &t_Section, const std::string &t_Key, const bool t_DefaultVal=false) |
|
static float | GetFloat (const std::string &t_Section, const std::string &t_Key, const float t_DefaultVal=0.0f) |
|
static double | GetDouble (const std::string &t_Section, const std::string &t_Key, const double t_DefaultVal=0.0) |
|
static FlingConfig & | Get () |
|
|
std::string | GetStringImpl (const std::string &t_Section, const std::string &t_Key) const |
|
int | GetIntImpl (const std::string &t_Section, const std::string &t_Key, const int t_DefaultVal=-1) const |
|
bool | GetBoolImpl (const std::string &t_Section, const std::string &t_Key, const bool t_DefaultVal=false) const |
|
float | GetFloatImpl (const std::string &t_Section, const std::string &t_Key, const float t_DefaultVal=0.0f) const |
|
double | GetDoubleImpl (const std::string &t_Section, const std::string &t_Key, const double t_DefaultVal=0.0) const |
|
|
| Singleton ()=default |
| Every singleton must have a default constructor so that explicit creation and destruction of them is maintained. More...
|
|
Provide simple access to engine configuration options from an INI file #TODO Parse command line options as well.
◆ GetBool()
static bool Fling::FlingConfig::GetBool |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const bool |
t_DefaultVal = false |
|
) |
| |
|
inlinestatic |
◆ GetBoolImpl()
bool Fling::FlingConfig::GetBoolImpl |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const bool |
t_DefaultVal = false |
|
) |
| const |
|
private |
◆ GetDouble()
static double Fling::FlingConfig::GetDouble |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const double |
t_DefaultVal = 0.0 |
|
) |
| |
|
inlinestatic |
◆ GetDoubleImpl()
double Fling::FlingConfig::GetDoubleImpl |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const double |
t_DefaultVal = 0.0 |
|
) |
| const |
|
private |
◆ GetFloat()
static float Fling::FlingConfig::GetFloat |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const float |
t_DefaultVal = 0.0f |
|
) |
| |
|
inlinestatic |
◆ GetFloatImpl()
float Fling::FlingConfig::GetFloatImpl |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const float |
t_DefaultVal = 0.0f |
|
) |
| const |
|
private |
◆ GetInt()
static int Fling::FlingConfig::GetInt |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const int |
t_DefaultVal = -1 |
|
) |
| |
|
inlinestatic |
◆ GetIntImpl()
int Fling::FlingConfig::GetIntImpl |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key, |
|
|
const int |
t_DefaultVal = -1 |
|
) |
| const |
|
private |
◆ GetString()
static std::string Fling::FlingConfig::GetString |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key |
|
) |
| |
|
inlinestatic |
◆ GetStringImpl()
std::string Fling::FlingConfig::GetStringImpl |
( |
const std::string & |
t_Section, |
|
|
const std::string & |
t_Key |
|
) |
| const |
|
private |
◆ Init()
void Fling::FlingConfig::Init |
( |
| ) |
|
|
overridevirtual |
◆ LoadCommandLineOpts()
UINT32 Fling::FlingConfig::LoadCommandLineOpts |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Load in the command line options and store them somewhere that is globally accessible.
- Parameters
-
argc | Argument count |
argv | Command line args |
- Returns
- Number of options loaded
◆ LoadConfigFile()
bool Fling::FlingConfig::LoadConfigFile |
( |
const std::string & |
t_File | ) |
|
Attempt to load a config file (.ini) for the engine.
- Parameters
-
t_File | File path to the config file |
- Returns
- True if file was read successfully
◆ Shutdown()
void Fling::FlingConfig::Shutdown |
( |
| ) |
|
|
overridevirtual |
◆ m_IniReader
INIReader Fling::FlingConfig::m_IniReader |
|
staticprivate |
The documentation for this class was generated from the following files: