gz-cpp-util 1.3
A c++20 library containing various utilities
gz::SettingsManagerCreateInfo< CacheTypes > Struct Template Reference

Creation info for SettingsManager. More...

#include <settings_manager.hpp>

Public Attributes

std::string filepath
 (Optional) Path to the file containing the settings
 
util::unordered_string_map< std::string > initialValues
 (Optional) Map containing default values. More...
 
bool insertFallbacks = false
 Wether to insert a fallback, when no value is present. More...
 
bool readFileOnCreation = false
 Wether to load values from filepath when creating the SettingsManager.
 
bool writeFileOnExit = false
 Wether to write the values to filepath when destroying the SettingsManager.
 
bool throwExceptionWhenNewValueNotAllowed = true
 Wether to throw an exception when trying to set an invalid value.
 

Detailed Description

template<StringConvertible... CacheTypes>
struct gz::SettingsManagerCreateInfo< CacheTypes >

Creation info for SettingsManager.

Member Data Documentation

◆ initialValues

template<StringConvertible... CacheTypes>
util::unordered_string_map<std::string> gz::SettingsManagerCreateInfo< CacheTypes >::initialValues

(Optional) Map containing default values.

Values loaded from a file will overwrite these.

◆ insertFallbacks

template<StringConvertible... CacheTypes>
bool gz::SettingsManagerCreateInfo< CacheTypes >::insertFallbacks = false

Wether to insert a fallback, when no value is present.

If true, fallback value for key will be added if key does not have a value. This applies when calling SettingsManager::getOr or SettingsManager::getCopyOr


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