ManaPlus
Macros | Functions
configmanager.cpp File Reference

(986a3bf)

#include "configmanager.h"
#include "client.h"
#include "configuration.h"
#include "settings.h"
#include "being/beingspeech.h"
#include "fs/files.h"
#include "fs/mkdir.h"
#include "fs/paths.h"
#include "utils/cast.h"
#include "utils/checkutils.h"
#include "utils/gettext.h"
#include "render/renderers.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define unassignKey(key, value)
 

Functions

static void setDefaultOption (const char *const name, const bool def)
 

Macro Definition Documentation

◆ unassignKey

#define unassignKey (   key,
  value 
)
Value:
if (config.getStringValue(prefix + (key)) == (value)) \
config.setValue(key, "-1");
std::string getStringValue(const std::string &key) const
Configuration config

Definition at line 367 of file configmanager.cpp.

Function Documentation

◆ setDefaultOption()

static void setDefaultOption ( const char *const  name,
const bool  def 
)
static

Definition at line 44 of file configmanager.cpp.

46 {
47  const int val = serverConfig.getValue(name, -1);
48  if (val == -1)
49  serverConfig.setValue(name, def);
50 }
std::string getValue(const std::string &key, const std::string &deflt) const
void setValue(const std::string &key, const std::string &value)
Configuration serverConfig

References ConfigurationObject::getValue(), serverConfig, and Configuration::setValue().

Referenced by ConfigManager::initServerConfig().