Code::Blocks
SVN r11506
|
Wrapper class for reading or writing config values, without the need for the full path. More...
#include <configmanager.h>
Public Member Functions | |
ConfigManagerWrapper () | |
ConfigManagerWrapper (wxString namespace_, wxString basepath) | |
bool | IsValid () const |
const wxString & | GetBasepath () const |
void | Write (const wxString &name, const wxString &value, bool ignoreEmpty=false) |
wxString | Read (const wxString &key, const wxString &defaultVal=wxEmptyString) |
bool | Read (const wxString &key, wxString *str) |
void | Write (const wxString &key, const char *str) |
void | Write (const wxString &name, int value) |
bool | Read (const wxString &name, int *value) |
int | ReadInt (const wxString &name, int defaultVal=0) |
void | Write (const wxString &name, bool value) |
bool | Read (const wxString &name, bool *value) |
bool | ReadBool (const wxString &name, bool defaultVal=false) |
void | Write (const wxString &name, double value) |
bool | Read (const wxString &name, double *value) |
double | ReadDouble (const wxString &name, double defaultVal=0.0f) |
Private Attributes | |
wxString | m_namespace |
wxString | m_basepath |
Wrapper class for reading or writing config values, without the need for the full path.
It provides a way to sandbox a part of the code from the namespace details or the full path used to access the config values.
Definition at line 316 of file configmanager.h.
|
inline |
Definition at line 319 of file configmanager.h.
Definition at line 320 of file configmanager.h.
References wxT.
|
inline |
Definition at line 326 of file configmanager.h.
References wxEmptyString.
Referenced by DebuggerSettingsDlg::OnOK().
|
inline |
Definition at line 325 of file configmanager.h.
Referenced by DebuggerSettingsDlg::OnOK().
wxString ConfigManagerWrapper::Read | ( | const wxString & | key, |
const wxString & | defaultVal = wxEmptyString |
||
) |
Definition at line 1672 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Read().
Definition at line 1680 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Read().
bool ConfigManagerWrapper::Read | ( | const wxString & | name, |
int * | value | ||
) |
Definition at line 1702 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Read().
bool ConfigManagerWrapper::Read | ( | const wxString & | name, |
bool * | value | ||
) |
Definition at line 1725 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Read().
bool ConfigManagerWrapper::Read | ( | const wxString & | name, |
double * | value | ||
) |
Definition at line 1747 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Read().
bool ConfigManagerWrapper::ReadBool | ( | const wxString & | name, |
bool | defaultVal = false |
||
) |
Definition at line 1732 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::ReadBool().
double ConfigManagerWrapper::ReadDouble | ( | const wxString & | name, |
double | defaultVal = 0.0f |
||
) |
Definition at line 1754 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::ReadDouble().
int ConfigManagerWrapper::ReadInt | ( | const wxString & | name, |
int | defaultVal = 0 |
||
) |
Definition at line 1710 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::ReadInt().
void ConfigManagerWrapper::Write | ( | const wxString & | name, |
const wxString & | value, | ||
bool | ignoreEmpty = false |
||
) |
Definition at line 1664 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
void ConfigManagerWrapper::Write | ( | const wxString & | key, |
const char * | str | ||
) |
Definition at line 1687 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
void ConfigManagerWrapper::Write | ( | const wxString & | name, |
int | value | ||
) |
Definition at line 1695 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
void ConfigManagerWrapper::Write | ( | const wxString & | name, |
bool | value | ||
) |
Definition at line 1718 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
void ConfigManagerWrapper::Write | ( | const wxString & | name, |
double | value | ||
) |
Definition at line 1740 of file configmanager.cpp.
References Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
|
private |
Definition at line 348 of file configmanager.h.
|
private |
Definition at line 347 of file configmanager.h.