Luanti 5.16.0-dev
Loading...
Searching...
No Matches
Settings Class Reference

#include <settings.h>

Collaboration diagram for Settings:

Public Member Functions

 Settings (std::string_view end_tag="")
 Settings (std::string_view end_tag, SettingsHierarchy *h, int settings_layer)
 ~Settings ()
Settingsoperator= (const Settings &other)
bool readConfigFile (const char *filename)
bool updateConfigFile (const char *filename)
bool parseCommandLine (int argc, char *argv[], const std::map< std::string, ValueSpec > &allowed_options)
bool parseConfigLines (std::istream &is)
void writeLines (std::ostream &os, u32 tab_depth=0) const
SettingsgetGroup (const std::string &name) const
const std::string & get (const std::string &name) const
bool getBool (const std::string &name) const
u16 getU16 (const std::string &name) const
s16 getS16 (const std::string &name) const
u32 getU32 (const std::string &name) const
s32 getS32 (const std::string &name) const
u64 getU64 (const std::string &name) const
float getFloat (const std::string &name) const
float getFloat (const std::string &name, float min, float max) const
v2f getV2F (const std::string &name) const
std::optional< v3fgetV3F (const std::string &name) const
u32 getFlagStr (const std::string &name, const FlagDesc *flagdesc, u32 *flagmask) const
bool getNoiseParams (const std::string &name, NoiseParams &np) const
bool getNoiseParamsFromValue (const std::string &name, NoiseParams &np) const
bool getNoiseParamsFromGroup (const std::string &name, NoiseParams &np) const
std::vector< std::string > getNames () const
bool exists (const std::string &name) const
bool existsLocal (const std::string &name) const
bool getGroupNoEx (const std::string &name, Settings *&val) const
bool getNoEx (const std::string &name, std::string &val) const
bool getFlag (const std::string &name) const
bool getU16NoEx (const std::string &name, u16 &val) const
bool getS16NoEx (const std::string &name, s16 &val) const
bool getU32NoEx (const std::string &name, u32 &val) const
bool getS32NoEx (const std::string &name, s32 &val) const
bool getU64NoEx (const std::string &name, u64 &val) const
bool getFloatNoEx (const std::string &name, float &val) const
bool getV2FNoEx (const std::string &name, v2f &val) const
bool getV3FNoEx (const std::string &name, std::optional< v3f > &val) const
bool getFlagStrNoEx (const std::string &name, u32 &val, const FlagDesc *flagdesc) const
bool setEntry (const std::string &name, const void *entry, bool set_group)
bool set (const std::string &name, const std::string &value)
bool setDefault (const std::string &name, const std::string &value)
bool setGroup (const std::string &name, const Settings &group)
bool setBool (const std::string &name, bool value)
bool setS16 (const std::string &name, s16 value)
bool setU16 (const std::string &name, u16 value)
bool setS32 (const std::string &name, s32 value)
bool setU64 (const std::string &name, u64 value)
bool setFloat (const std::string &name, float value)
bool setV2F (const std::string &name, v2f value)
bool setV3F (const std::string &name, v3f value)
bool setFlagStr (const std::string &name, u32 flags, const FlagDesc *flagdesc=nullptr, u32 flagmask=U32_MAX)
bool setNoiseParams (const std::string &name, const NoiseParams &np)
bool remove (const std::string &name)
void setDefault (const std::string &name, const FlagDesc *flagdesc, u32 flags)
const FlagDescgetFlagDescFallback (const std::string &name) const
void registerChangedCallback (const std::string &name, SettingsChangedCallback cbf, void *userdata=NULL)
size_t deregisterAllChangedCallbacks (const void *userdata)
void removeSecureSettings ()
int getLayer () const

Static Public Member Functions

static SettingscreateLayer (SettingsLayer sl, std::string_view end_tag="")
static SettingsgetLayer (SettingsLayer sl)

Private Member Functions

SettingsParseEvent parseConfigObject (const std::string &line, std::string &name, std::string &value)
bool updateConfigObject (std::istream &is, std::ostream &os, u32 tab_depth=0)
SettingsgetParent () const
const SettingsEntrygetEntry (const std::string &name) const
void clearNoLock ()
void doCallbacks (const std::string &name) const

Static Private Member Functions

static bool checkNameValid (std::string_view name)
static bool checkValueValid (std::string_view value)
static std::string getMultiline (std::istream &is, size_t *num_lines=NULL)
static void printEntry (std::ostream &os, const std::string &name, const SettingsEntry &entry, u32 tab_depth=0)

Private Attributes

SettingEntries m_settings
SettingsCallbackMap m_callbacks
std::string m_end_tag
std::mutex m_callback_mutex
std::mutex m_mutex
SettingsHierarchym_hierarchy = nullptr
int m_settingslayer = -1

Static Private Attributes

static std::unordered_map< std::string, const FlagDesc * > s_flags

Friends

class TestSettings
class LuaSettings

Constructor & Destructor Documentation

◆ Settings() [1/2]

Settings::Settings ( std::string_view end_tag = "")
inline

References m_end_tag.

Referenced by createLayer(), getGroup(), getGroupNoEx(), getLayer(), getNoiseParamsFromGroup(), getParent(), operator=(), parseConfigLines(), setEntry(), setGroup(), setNoiseParams(), and updateConfigObject().

Here is the caller graph for this function:

◆ Settings() [2/2]

Settings::Settings ( std::string_view end_tag,
SettingsHierarchy * h,
int settings_layer )

◆ ~Settings()

Settings::~Settings ( )

References clearNoLock(), m_hierarchy, m_mutex, and m_settingslayer.

Here is the call graph for this function:

Member Function Documentation

◆ checkNameValid()

bool Settings::checkNameValid ( std::string_view name)
staticprivate

References errorstream.

Referenced by setEntry().

Here is the caller graph for this function:

◆ checkValueValid()

bool Settings::checkValueValid ( std::string_view value)
staticprivate

References errorstream.

Referenced by setEntry().

Here is the caller graph for this function:

◆ clearNoLock()

void Settings::clearNoLock ( )
private

References m_settings.

Referenced by ~Settings(), and operator=().

Here is the caller graph for this function:

◆ createLayer()

Settings * Settings::createLayer ( SettingsLayer sl,
std::string_view end_tag = "" )
static

References Settings(), and g_hierarchy.

Referenced by Server::init(), init_common(), loadGameConfAndInitWorld(), TestMapSettingsManager::makeUserConfig(), set_default_settings(), TestSettings::testDefaults(), and TestSettings::testFlagDesc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deregisterAllChangedCallbacks()

size_t Settings::deregisterAllChangedCallbacks ( const void * userdata)

◆ doCallbacks()

void Settings::doCallbacks ( const std::string & name) const
private

References m_callback_mutex, and m_callbacks.

Referenced by remove(), and set().

Here is the caller graph for this function:

◆ exists()

◆ existsLocal()

bool Settings::existsLocal ( const std::string & name) const

References m_mutex, and m_settings.

Referenced by exists(), and LuaSettings::l_has().

Here is the caller graph for this function:

◆ get()

◆ getBool()

bool Settings::getBool ( const std::string & name) const

References get(), and is_yes().

Referenced by PlayerDatabaseFiles::deSerialize(), getFlag(), LuaSettings::l_get_bool(), and loadGameConfAndInitWorld().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntry()

const SettingsEntry & Settings::getEntry ( const std::string & name) const
private

References getParent(), m_mutex, and m_settings.

Referenced by get(), getGroup(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFlag()

bool Settings::getFlag ( const std::string & name) const

References getBool().

Referenced by ClientLauncher::init_args(), main(), run_dedicated_server(), and setup_log_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFlagDescFallback()

const FlagDesc * Settings::getFlagDescFallback ( const std::string & name) const

References s_flags.

Referenced by getFlagStrNoEx(), LuaSettings::l_get_flags(), and setFlagStr().

Here is the caller graph for this function:

◆ getFlagStr()

u32 Settings::getFlagStr ( const std::string & name,
const FlagDesc * flagdesc,
u32 * flagmask ) const

References get(), getParent(), m_settings, readFlagString(), stoi, and U32_MAX.

Referenced by getFlagStrNoEx(), and TestSettings::testFlagDesc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFlagStrNoEx()

bool Settings::getFlagStrNoEx ( const std::string & name,
u32 & val,
const FlagDesc * flagdesc ) const

References getFlagDescFallback(), and getFlagStr().

Referenced by getNoiseParamsFromGroup(), and LuaSettings::l_get_flags().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFloat() [1/2]

float Settings::getFloat ( const std::string & name) const

References get(), and stof.

Referenced by PlayerDatabaseFiles::deSerialize(), getFloatNoEx(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFloat() [2/2]

float Settings::getFloat ( const std::string & name,
float min,
float max ) const

References get(), rangelim(), and stof.

Here is the call graph for this function:

◆ getFloatNoEx()

bool Settings::getFloatNoEx ( const std::string & name,
float & val ) const

References getFloat().

Referenced by getNoiseParamsFromGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGroup()

Settings * Settings::getGroup ( const std::string & name) const

References Settings(), getEntry(), SettingsEntry::group, and SettingsEntry::is_group.

Referenced by getGroupNoEx(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGroupNoEx()

bool Settings::getGroupNoEx ( const std::string & name,
Settings *& val ) const

References Settings(), and getGroup().

Referenced by compare_settings(), getNoiseParamsFromGroup(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLayer() [1/2]

int Settings::getLayer ( ) const
inline

References m_settingslayer.

Referenced by con::ConnectionSendThread::ConnectionSendThread(), FontEngine::initFont(), ModApiMapgen::l_set_noiseparams(), loadGameConfAndInitWorld(), TestMapSettingsManager::makeUserConfig(), setDefault(), TestSettings::testDefaults(), and TestMapSettingsManager::testMapMetaSaveLoad().

Here is the caller graph for this function:

◆ getLayer() [2/2]

Settings * Settings::getLayer ( SettingsLayer sl)
static

References Settings(), and g_hierarchy.

Referenced by InputHandler::InputHandler(), TestMapSettingsManager::testMapSettingsManager(), and uninit_common().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMultiline()

std::string Settings::getMultiline ( std::istream & is,
size_t * num_lines = NULL )
staticprivate

Referenced by parseConfigLines(), and updateConfigObject().

Here is the caller graph for this function:

◆ getNames()

std::vector< std::string > Settings::getNames ( ) const

References m_mutex, and m_settings.

Referenced by ModConfiguration::addModsFromConfig(), compare_settings(), LuaSettings::l_get_names(), and removeSecureSettings().

Here is the caller graph for this function:

◆ getNoEx()

bool Settings::getNoEx ( const std::string & name,
std::string & val ) const

References get().

Referenced by compare_settings(), ServerMap::createDatabase(), getNoiseParamsFromValue(), ServerEnvironment::init(), ServerEnvironment::openAuthDatabase(), Server::openModStorageDatabase(), ServerEnvironment::openPlayerDatabase(), and setup_log_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNoiseParams()

bool Settings::getNoiseParams ( const std::string & name,
NoiseParams & np ) const

References getNoiseParamsFromGroup(), getNoiseParamsFromValue(), and getParent().

Referenced by LuaSettings::l_get_np_group(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNoiseParamsFromGroup()

bool Settings::getNoiseParamsFromGroup ( const std::string & name,
NoiseParams & np ) const

References Settings(), flagdesc_noiseparams, NoiseParams::flags, getFlagStrNoEx(), getFloatNoEx(), getGroupNoEx(), getS32NoEx(), getU16NoEx(), getV3FNoEx(), NoiseParams::lacunarity, NOISE_FLAG_DEFAULTS, NoiseParams::octaves, NoiseParams::offset, NoiseParams::persist, NoiseParams::scale, NoiseParams::seed, and NoiseParams::spread.

Referenced by getNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNoiseParamsFromValue()

bool Settings::getNoiseParamsFromValue ( const std::string & name,
NoiseParams & np ) const

References getNoEx(), NoiseParams::lacunarity, BasicStrfnd< T >::next(), NoiseParams::octaves, NoiseParams::offset, NoiseParams::persist, NoiseParams::scale, NoiseParams::seed, NoiseParams::spread, stof, and stoi.

Referenced by getNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParent()

Settings * Settings::getParent ( ) const
private

References Settings(), m_hierarchy, and m_settingslayer.

Referenced by exists(), getEntry(), getFlagStr(), and getNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getS16()

s16 Settings::getS16 ( const std::string & name) const

References get(), and stoi.

Referenced by getS16NoEx(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getS16NoEx()

bool Settings::getS16NoEx ( const std::string & name,
s16 & val ) const

References getS16().

Here is the call graph for this function:

◆ getS32()

s32 Settings::getS32 ( const std::string & name) const

References get(), and stoi.

Referenced by getS32NoEx(), getSubgameSpec(), parseContentInfo(), parseModContents(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getS32NoEx()

bool Settings::getS32NoEx ( const std::string & name,
s32 & val ) const

References getS32().

Referenced by getNoiseParamsFromGroup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getU16()

u16 Settings::getU16 ( const std::string & name) const

References get(), and stoi.

Referenced by Database_Redis::Database_Redis(), PlayerDatabaseFiles::deSerialize(), game_configure_port(), and getU16NoEx().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getU16NoEx()

bool Settings::getU16NoEx ( const std::string & name,
u16 & val ) const

References getU16().

Referenced by getNoiseParamsFromGroup(), and ServerEnvironment::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getU32()

u32 Settings::getU32 ( const std::string & name) const

References get(), and stoi.

Referenced by getU32NoEx(), and ServerEnvironment::loadMeta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getU32NoEx()

bool Settings::getU32NoEx ( const std::string & name,
u32 & val ) const

References getU32().

Here is the call graph for this function:

◆ getU64()

u64 Settings::getU64 ( const std::string & name) const

References from_string(), and get().

Referenced by getU64NoEx(), and ServerEnvironment::loadMeta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getU64NoEx()

bool Settings::getU64NoEx ( const std::string & name,
u64 & val ) const

References getU64().

Here is the call graph for this function:

◆ getV2F()

v2f Settings::getV2F ( const std::string & name) const

References get(), BasicStrfnd< T >::next(), and stof.

Referenced by getV2FNoEx().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getV2FNoEx()

bool Settings::getV2FNoEx ( const std::string & name,
v2f & val ) const

References getV2F().

Here is the call graph for this function:

◆ getV3F()

std::optional< v3f > Settings::getV3F ( const std::string & name) const

References get(), and str_to_v3f().

Referenced by PlayerDatabaseFiles::deSerialize(), getV3FNoEx(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getV3FNoEx()

bool Settings::getV3FNoEx ( const std::string & name,
std::optional< v3f > & val ) const

References getV3F().

Referenced by getNoiseParamsFromGroup(), LuaSettings::l_get_pos(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

Settings & Settings::operator= ( const Settings & other)

References Settings(), clearNoLock(), FATAL_ERROR_IF, m_callbacks, m_hierarchy, m_mutex, and m_settings.

Here is the call graph for this function:

◆ parseCommandLine()

bool Settings::parseCommandLine ( int argc,
char * argv[],
const std::map< std::string, ValueSpec > & allowed_options )

References allowed_options, errorstream, itos(), set(), and VALUETYPE_FLAG.

Referenced by get_cmdline_opts().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseConfigLines()

bool Settings::parseConfigLines ( std::istream & is)

References Settings(), getMultiline(), m_end_tag, m_mutex, m_settings, parseConfigLines(), parseConfigObject(), SPE_COMMENT, SPE_END, SPE_GROUP, SPE_INVALID, SPE_KVPAIR, SPE_MULTILINE, and SPE_NONE.

Referenced by PlayerDatabaseFiles::deSerialize(), ServerEnvironment::loadMeta(), parseConfigLines(), readConfigFile(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseConfigObject()

SettingsParseEvent Settings::parseConfigObject ( const std::string & line,
std::string & name,
std::string & value )
private

References m_end_tag, SPE_COMMENT, SPE_END, SPE_GROUP, SPE_INVALID, SPE_KVPAIR, SPE_MULTILINE, SPE_NONE, and trim().

Referenced by parseConfigLines(), and updateConfigObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printEntry()

void Settings::printEntry ( std::ostream & os,
const std::string & name,
const SettingsEntry & entry,
u32 tab_depth = 0 )
staticprivate

References SettingsEntry::group, SettingsEntry::is_group, SettingsEntry::value, and writeLines().

Referenced by updateConfigObject(), and writeLines().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readConfigFile()

bool Settings::readConfigFile ( const char * filename)

References parseConfigLines().

Referenced by ServerMap::ServerMap(), ModConfiguration::addModsFromConfig(), getAvailableGameIds(), getSubgameSpec(), getWorldGameId(), getWorldName(), ServerEnvironment::init(), loadGameConfAndInitWorld(), migrate_map_database(), ServerEnvironment::migrateAuthDatabase(), Server::migrateModStorageDatabase(), ServerEnvironment::migratePlayersDatabase(), Server::openModStorageDatabase(), parseContentInfo(), parseModContents(), and recompress_map_database().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerChangedCallback()

void Settings::registerChangedCallback ( const std::string & name,
SettingsChangedCallback cbf,
void * userdata = NULL )

References m_callback_mutex, and m_callbacks.

◆ remove()

bool Settings::remove ( const std::string & name)

References doCallbacks(), m_mutex, and m_settings.

Referenced by ModConfiguration::addModsFromConfig(), LuaSettings::l_remove(), and removeSecureSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSecureSettings()

void Settings::removeSecureSettings ( )

References errorstream, getNames(), and remove().

Referenced by loadGameConfAndInitWorld().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set()

bool Settings::set ( const std::string & name,
const std::string & value )

◆ setBool()

bool Settings::setBool ( const std::string & name,
bool value )

References set().

Referenced by LuaSettings::l_set_bool(), and loadGameConfAndInitWorld().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDefault() [1/2]

void Settings::setDefault ( const std::string & name,
const FlagDesc * flagdesc,
u32 flags )

References s_flags, setDefault(), U32_MAX, and writeFlagString().

Here is the call graph for this function:

◆ setDefault() [2/2]

bool Settings::setDefault ( const std::string & name,
const std::string & value )

References FATAL_ERROR_IF, g_hierarchy, getLayer(), m_hierarchy, and SL_DEFAULTS.

Referenced by setDefault(), and TestSettings::testFlagDesc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEntry()

bool Settings::setEntry ( const std::string & name,
const void * entry,
bool set_group )

References Settings(), checkNameValid(), checkValueValid(), SettingsEntry::group, SettingsEntry::is_group, m_end_tag, m_mutex, m_settings, and SettingsEntry::value.

Referenced by set(), setGroup(), and setNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFlagStr()

bool Settings::setFlagStr ( const std::string & name,
u32 flags,
const FlagDesc * flagdesc = nullptr,
u32 flagmask = U32_MAX )

References getFlagDescFallback(), set(), and writeFlagString().

Referenced by setNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFloat()

bool Settings::setFloat ( const std::string & name,
float value )

References ftos(), and set().

Referenced by PlayerDatabaseFiles::serialize(), setNoiseParams(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGroup()

bool Settings::setGroup ( const std::string & name,
const Settings & group )

References Settings(), and setEntry().

Referenced by TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNoiseParams()

bool Settings::setNoiseParams ( const std::string & name,
const NoiseParams & np )

References Settings(), flagdesc_noiseparams, NoiseParams::flags, NoiseParams::lacunarity, NoiseParams::octaves, NoiseParams::offset, NoiseParams::persist, NoiseParams::scale, NoiseParams::seed, setEntry(), setFlagStr(), setFloat(), setS32(), setU16(), setV3F(), and NoiseParams::spread.

Referenced by LuaSettings::l_set_np_group(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setS16()

bool Settings::setS16 ( const std::string & name,
s16 value )

References itos(), and set().

Referenced by TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setS32()

bool Settings::setS32 ( const std::string & name,
s32 value )

References itos(), and set().

Referenced by PlayerDatabaseFiles::serialize(), and setNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setU16()

bool Settings::setU16 ( const std::string & name,
u16 value )

References itos(), and set().

Referenced by PlayerDatabaseFiles::serialize(), and setNoiseParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setU64()

bool Settings::setU64 ( const std::string & name,
u64 value )

References set().

Referenced by ServerEnvironment::saveMeta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setV2F()

bool Settings::setV2F ( const std::string & name,
v2f value )

References set().

Here is the call graph for this function:

◆ setV3F()

bool Settings::setV3F ( const std::string & name,
v3f value )

References set().

Referenced by LuaSettings::l_set_pos(), PlayerDatabaseFiles::serialize(), setNoiseParams(), and TestSettings::testAllSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateConfigFile()

bool Settings::updateConfigFile ( const char * filename)

References m_mutex, fs::safeWriteToFile(), and updateConfigObject().

Referenced by ServerMap::ServerMap(), ModConfiguration::addModsFromConfig(), ServerEnvironment::init(), LuaSettings::l_write(), loadGameConfAndInitWorld(), migrate_map_database(), ServerEnvironment::migrateAuthDatabase(), Server::migrateModStorageDatabase(), ServerEnvironment::migratePlayersDatabase(), and TestServerModManager::testCreation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateConfigObject()

bool Settings::updateConfigObject ( std::istream & is,
std::ostream & os,
u32 tab_depth = 0 )
private

References Settings(), getMultiline(), m_end_tag, m_settings, parseConfigObject(), printEntry(), sanity_check, SPE_END, SPE_GROUP, SPE_KVPAIR, SPE_MULTILINE, and updateConfigObject().

Referenced by TestSettings::testAllSettings(), updateConfigFile(), and updateConfigObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLines()

void Settings::writeLines ( std::ostream & os,
u32 tab_depth = 0 ) const

References m_end_tag, m_mutex, m_settings, and printEntry().

Referenced by printEntry(), ServerEnvironment::saveMeta(), and PlayerDatabaseFiles::serialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LuaSettings

friend class LuaSettings
friend

References LuaSettings.

Referenced by LuaSettings.

◆ TestSettings

friend class TestSettings
friend

References TestSettings.

Referenced by TestSettings.

Member Data Documentation

◆ m_callback_mutex

std::mutex Settings::m_callback_mutex
mutableprivate

◆ m_callbacks

◆ m_end_tag

std::string Settings::m_end_tag
private

◆ m_hierarchy

SettingsHierarchy* Settings::m_hierarchy = nullptr
private

◆ m_mutex

std::mutex Settings::m_mutex
mutableprivate

◆ m_settings

◆ m_settingslayer

int Settings::m_settingslayer = -1
private

◆ s_flags

std::unordered_map< std::string, const FlagDesc * > Settings::s_flags
staticprivate

Referenced by getFlagDescFallback(), and setDefault().


The documentation for this class was generated from the following files: