Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Utility::ConfigManager Class Reference

Class for configuration manager to load json configurations. More...

#include <config_manager.h>

Public Member Functions

 ConfigManager ()
 Constructs the configManager. More...
 
bool loadConfig (const std::string &file_path)
 Loads a configuration. More...
 
int getInt (const std::string &key)
 Gets an int from config. More...
 
unsigned int getUnsignedInt (const std::string &key)
 Gets an unsigned int from config. More...
 
std::string getString (const std::string &key)
 Gets a string from config. More...
 
float getFloat (const std::string &key)
 Gets a float from config. More...
 
double getDouble (const std::string &key)
 Gets a double from config. More...
 
bool getBool (const std::string &key)
 Gets a bool from config. More...
 
std::vector< std::string > getStringVector (const std::string &key)
 Gets a string vector from config. More...
 
std::vector< unsigned int > getUnsignedIntVector (const std::string &key)
 Gets an unsigned int vector from config. More...
 

Detailed Description

Class for configuration manager to load json configurations.

Constructor & Destructor Documentation

Utility::ConfigManager::ConfigManager ( )

Constructs the configManager.

Member Function Documentation

bool Utility::ConfigManager::getBool ( const std::string &  key)

Gets a bool from config.

Parameters
[in]keyThe key
Returns
The bool.

Referenced by generated::getConfigManagerModule(), and Engine::setup().

double Utility::ConfigManager::getDouble ( const std::string &  key)

Gets a double from config.

Parameters
[in]keyThe key
Returns
The double.

Referenced by generated::getConfigManagerModule().

float Utility::ConfigManager::getFloat ( const std::string &  key)

Gets a float from config.

Parameters
[in]keyThe key
Returns
The float.

Referenced by generated::getConfigManagerModule(), and Engine::setup().

int Utility::ConfigManager::getInt ( const std::string &  key)

Gets an int from config.

Parameters
[in]keyThe key
Returns
The int.

Referenced by generated::getConfigManagerModule(), and Engine::setup().

std::string Utility::ConfigManager::getString ( const std::string &  key)

Gets a string from config.

Parameters
[in]keyThe key
Returns
The string.

Referenced by generated::getConfigManagerModule(), and Engine::setup().

std::vector< std::string > Utility::ConfigManager::getStringVector ( const std::string &  key)

Gets a string vector from config.

Parameters
[in]keyThe key
Returns
The string vector.

Referenced by generated::getConfigManagerModule().

unsigned int Utility::ConfigManager::getUnsignedInt ( const std::string &  key)

Gets an unsigned int from config.

Parameters
[in]keyThe key
Returns
The unsigned int.

Referenced by generated::getConfigManagerModule().

std::vector< unsigned int > Utility::ConfigManager::getUnsignedIntVector ( const std::string &  key)

Gets an unsigned int vector from config.

Parameters
[in]keyThe key
Returns
The unsigned int vector.

Referenced by generated::getConfigManagerModule().

bool Utility::ConfigManager::loadConfig ( const std::string &  file_path)

Loads a configuration.

Parameters
[in]file_pathThe file path
Returns
True if successful

The documentation for this class was generated from the following files: