![]() |
TCode Library
A library to aid in decoding/using of Toy Code ("T-Code") data.
|
Wrapper for handling settings. More...
#include <SettingManagement.h>
Public Member Functions | |
bool | init (const char *filepath) |
Initializes the Settings class and mounts the SPIFFS filesystem. | |
bool | isMounted () |
checks if the filesystem is mounted and filepath created | |
bool | hasSetting (const char *setting) |
checks if the given setting is in the settings file | |
void | reset () |
template<class T > | |
bool | getSetting (const char *setting, T &settingValue) |
gets the value for a setting | |
template<class T > | |
bool | setSetting (const char *setting, const T &settingValue) |
gets the value for a setting | |
bool | getSystemUsage (SettingsUsage &out) |
gets the system usage of the Settings system | |
Wrapper for handling settings.
Definition at line 29 of file SettingManagement.h.
|
inline |
Definition at line 79 of file SettingManagement.h.
|
inline |
gets the value for a setting
setting | C-String representation of the setting name being accessed |
settingValue | setting being obtained (is a generic type and does allow for type casting) |
Definition at line 109 of file SettingManagement.h.
bool Settings::getSystemUsage | ( | SettingsUsage & | out | ) |
gets the system usage of the Settings system
out | the struct used to store the settings details |
Definition at line 95 of file SettingManagement.cpp.
bool Settings::hasSetting | ( | const char * | setting | ) |
checks if the given setting is in the settings file
setting | C-String representation of the setting being accessed |
Definition at line 61 of file SettingManagement.cpp.
bool Settings::init | ( | const char * | filepath | ) |
Initializes the Settings class and mounts the SPIFFS filesystem.
filepath | Filepath in the SPIFFS filesystem to the relevent Settings Storage |
Definition at line 10 of file SettingManagement.cpp.
bool Settings::isMounted | ( | ) |
checks if the filesystem is mounted and filepath created
Definition at line 56 of file SettingManagement.cpp.
void Settings::reset | ( | ) |
Overwrites the stored settings with the values specified by the createConfigFile function
Definition at line 88 of file SettingManagement.cpp.
|
inline |
gets the value for a setting
setting | C-String representation of the setting name being accessed |
settingValue | setting being stored (is a generic type and does allow for type casting) |
Definition at line 166 of file SettingManagement.h.