OXY-SYNC-DIRECTORY 1.0
OXY-SYNC-DIRECTORY Library Documentation
Loading...
Searching...
No Matches
oxy::directory::settings::get_fn Struct Reference

A function object that retrieves configuration settings. More...

#include <settings.hpp>

Public Member Functions

settings_t operator() () const
 Retrieves configuration settings from the default configuration file path.
settings_t operator() (std::filesystem::path const &file) const
 Retrieves configuration settings from a specified INI file path.

Detailed Description

A function object that retrieves configuration settings.

This functor provides two overloads to retrieve configuration settings. The first overload retrieves settings from the default configuration file path, while the second overload allows specifying a custom file path. It uses the load function to read the settings from the specified INI file.

Member Function Documentation

◆ operator()() [1/2]

settings_t oxy::directory::settings::get_fn::operator() ( ) const
inline

Retrieves configuration settings from the default configuration file path.

Returns
A settings_t object populated with the configuration settings from the default INI file.

◆ operator()() [2/2]

settings_t oxy::directory::settings::get_fn::operator() ( std::filesystem::path const & file) const
inline

Retrieves configuration settings from a specified INI file path.

Parameters
fileThe path to the INI file to load.
Returns
A settings_t object populated with the configuration settings from the INI file.