XDGKit v0.1.0-1
XDG Utilities for C++
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
XDGINI Class Reference

A parsed INI file. More...

#include <XDGINI.h>

+ Inheritance diagram for XDGINI:

Static Public Member Functions

static std::shared_ptr< XDGINILoad (const std::filesystem::path &iniFile) noexcept
 Loads and parses an INI file.
 

Detailed Description

A parsed INI file.

The content is organized in nested unordered maps. The top-level map represents the sections, while the nested maps hold the key-value pairs within each section.

All values are stored as strings.

Example usage:

const std::string &value = parsedIni["section"]["key"];

Member Function Documentation

◆ Load()

std::shared_ptr< XDGINI > Load ( const std::filesystem::path &  iniFile)
staticnoexcept

Loads and parses an INI file.

Parameters
iniFileThe path to the INI file to be loaded and parsed.
Returns
Always returns a valid pointer to an XDGINI object. The returned pointer may reference an empty object if an error occurs.