My Project
|
The ConfigManager class provides functionalities to load configuration settings from a file. More...
#include <ConfigManager.h>
Public Member Functions | |
std::unordered_map< std::string, int > | LoadConfig (const std::string &filePath) |
Loads configuration settings from a specified file. | |
The ConfigManager class provides functionalities to load configuration settings from a file.
This class is designed to read configuration files where each line defines a key-value pair, separated by an equals sign (=). Lines starting with '#' or ';' are considered comments and ignored. The class supports integer values for the configuration settings.
|
inline |
Loads configuration settings from a specified file.
filePath | The path to the configuration file. |
Reads the configuration file line by line, ignoring empty lines and comments. Each non-comment line is expected to contain a key-value pair separated by an equals sign (=). The method parses these lines, converting the value part to an integer, and stores them in an unordered_map.