My Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ConfigManager Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ LoadConfig()

std::unordered_map< std::string, int > ConfigManager::LoadConfig ( const std::string & filePath)
inline

Loads configuration settings from a specified file.

Parameters
filePathThe path to the configuration file.
Returns
An unordered_map containing the configuration settings.

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.


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