Class Settings
Defined in File parser.h
Nested Relationships
Nested Types
Class Documentation
-
class Settings
Public Functions
-
Settings(const char *filename)
Construct a new Settings object.
- Parameters:
filename – Name of the configuration file.
-
~Settings()
-
int LoadSettings()
Run this after the constructor to load settings from the file.
- Returns:
int Number of settings loaded.
-
double GetOptionDouble(std::string name)
Get the option as a double.
Throws exception if value is not double.
- Parameters:
name – Name of the option to get.
- Returns:
double Value of the option. Also works for int
-
std::string GetOptionString(std::string name)
Get the option as a string.
Throws exception if value is not string.
- Parameters:
name – Name of the option to get.
- Returns:
string Value of the option.
-
bool GetOptionBool(std::string name)
Get the option as a boolean.
Throws exception if value is not boolean.
- Parameters:
name – Name of the option to get.
- Returns:
bool Value of the option.
-
Settings(const char *filename)