1#ifndef IV_SRC_DIAMAR_STRUCTS_HPP_
2#define IV_SRC_DIAMAR_STRUCTS_HPP_
8#include "third_party/magic_enum/magic_enum.hpp"
19 static std::optional<Preferences>
load()
29 preferencesFile.
read();
41 preferences.
save(node);
43 return preferencesFile.
save();
49 const auto activeLangTmp = magic_enum::enum_cast<iv::eLanguage>(
53 success &= activeLangTmp.has_value();
55 const auto gmtOffsetTmp = magic_enum::enum_cast<iv::eGmtArea>(
58 success &= gmtOffsetTmp.has_value();
79 static constexpr std::string_view
preferences {
"Preferences"};
84 static constexpr std::string
string {};
93 static constexpr std::string_view
gmtOffset {
"GMTOffset"};
94 static constexpr std::string_view
volume {
"Volume"};
Definition xmlFile.hpp:128
bool save()
Definition xmlFile.cpp:124
iv::file::xml::node getChild(std::string_view name) const
Definition xmlFile.cpp:170
bool read(bool checkIntegrity=true)
Definition xmlFile.cpp:99
iv::file::xml::node setChild(std::string_view name, std::string_view parentName="")
Definition xmlFile.cpp:182
Definition xmlFile.hpp:15
T getAttribute(const std::string_view key, T defaultValue) const
Definition xmlFile.hpp:33
bool addAttribute(const std::string_view key, T value)
Definition xmlFile.hpp:77
Definition DataLoggerManager.cpp:10
bool exists(const std::string_view path)
Definition file.cpp:97
std::string preferencesFilePath()
Definition paths.cpp:84
uint8_t volume
Definition types.hpp:25
eLanguage
Definition enums.hpp:37
eGmtArea
Definition enums.hpp:149
Definition structs.hpp:83
static constexpr iv::types::volume volume
Definition structs.hpp:87
static constexpr std::string string
Definition structs.hpp:84
static constexpr iv::eLanguage language
Definition structs.hpp:85
static constexpr iv::eGmtArea gmtOffset
Definition structs.hpp:86
Definition structs.hpp:91
static constexpr std::string_view volume
Definition structs.hpp:94
static constexpr std::string_view gmtOffset
Definition structs.hpp:93
static constexpr std::string_view activeLanguage
Definition structs.hpp:92
Definition structs.hpp:78
static constexpr std::string_view preferences
Definition structs.hpp:79
Definition structs.hpp:14
bool save(iv::file::xml::node &nodePreferences) const
Definition structs.hpp:65
bool load(const iv::file::xml::node &nodePreferences)
Definition structs.hpp:46
iv::eGmtArea gmtOffset
Definition structs.hpp:16
static std::optional< Preferences > load()
Definition structs.hpp:19
static bool save(const Preferences &preferences)
Definition structs.hpp:36
iv::types::volume volume
Definition structs.hpp:17
iv::eLanguage activeLanguage
Definition structs.hpp:15