openMSX
|
#include <SettingsConfig.hh>
Public Member Functions | |
SettingsConfig (GlobalCommandController &globalCommandController, HotKey &hotKey, Shortcuts &shortcuts) | |
~SettingsConfig () | |
void | loadSetting (const FileContext &context, std::string_view filename) |
void | saveSetting (std::string filename={}) |
void | setSaveSettings (bool save) |
void | setSaveFilename (const FileContext &context, std::string_view filename) |
SettingsManager & | getSettingsManager () |
const std::string * | getValueForSetting (std::string_view setting) const |
void | setValueForSetting (std::string_view setting, std::string_view value) |
void | removeValueForSetting (std::string_view setting) |
Definition at line 21 of file SettingsConfig.hh.
openmsx::SettingsConfig::SettingsConfig | ( | GlobalCommandController & | globalCommandController, |
HotKey & | hotKey, | ||
Shortcuts & | shortcuts | ||
) |
Definition at line 71 of file SettingsConfig.cc.
openmsx::SettingsConfig::~SettingsConfig | ( | ) |
Definition at line 83 of file SettingsConfig.cc.
References openmsx::CommandController::getCliComm(), openmsx::CliComm::printWarning(), and saveSetting().
|
inline |
Definition at line 33 of file SettingsConfig.hh.
Referenced by openmsx::GlobalCommandController::getSettingsManager(), and loadSetting().
const std::string * openmsx::SettingsConfig::getValueForSetting | ( | std::string_view | setting | ) | const |
Definition at line 160 of file SettingsConfig.cc.
References lookup(), and setting.
Referenced by openmsx::SettingsManager::loadSettings().
void openmsx::SettingsConfig::loadSetting | ( | const FileContext & | context, |
std::string_view | filename | ||
) |
Definition at line 95 of file SettingsConfig.cc.
References openmsx::SettingsParser::binds, hash_set< Value, Extractor, Hasher, Equal >::clear(), openmsx::MemBuffer< T, ALIGNMENT >::data(), hash_set< Value, Extractor, Hasher, Equal >::emplace(), rapidsax::EXTRA_BUFFER_SPACE, openmsx::MemBuffer< T, ALIGNMENT >::first(), openmsx::CommandController::getCliComm(), getSettingsManager(), openmsx::File::getSize(), openmsx::HotKey::loadBind(), openmsx::HotKey::loadInit(), openmsx::SettingsManager::loadSettings(), openmsx::HotKey::loadUnbind(), openmsx::CliComm::printWarning(), openmsx::File::read(), hash_set< Value, Extractor, Hasher, Equal >::reserve(), openmsx::MemBuffer< T, ALIGNMENT >::resize(), openmsx::Shortcuts::setDefaultShortcuts(), openmsx::Shortcuts::setShortcut(), openmsx::SettingsParser::settings, openmsx::SettingsParser::shortcutItems, openmsx::SettingsParser::systemID, and openmsx::SettingsParser::unbinds.
void openmsx::SettingsConfig::removeValueForSetting | ( | std::string_view | setting | ) |
Definition at line 170 of file SettingsConfig.cc.
References hash_set< Value, Extractor, Hasher, Equal >::erase(), and setting.
void openmsx::SettingsConfig::saveSetting | ( | std::string | filename = {} | ) |
Definition at line 175 of file SettingsConfig.cc.
References XMLOutputStream< Operations >::attribute(), XMLOutputStream< Operations >::data(), openmsx::HotKey::saveBindings(), openmsx::Shortcuts::saveShortcuts(), and XMLOutputStream< Operations >::with_tag().
Referenced by ~SettingsConfig().
void openmsx::SettingsConfig::setSaveFilename | ( | const FileContext & | context, |
std::string_view | filename | ||
) |
Definition at line 155 of file SettingsConfig.cc.
|
inline |
Definition at line 30 of file SettingsConfig.hh.
Referenced by openmsx::GlobalSettings::~GlobalSettings().
void openmsx::SettingsConfig::setValueForSetting | ( | std::string_view | setting, |
std::string_view | value | ||
) |
Definition at line 165 of file SettingsConfig.cc.
References hash_map< Key, Value, Hasher, Equal >::insert_or_assign(), and setting.