Code::Blocks  SVN r11506
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
ConfigManager Class Reference

#include <configmanager.h>

Collaboration diagram for ConfigManager:

Public Member Functions

wxString GetPath () const
 
void SetPath (const wxString &strPath)
 
wxArrayString EnumerateSubPaths (const wxString &path)
 
wxArrayString EnumerateKeys (const wxString &path)
 
void DeleteSubPath (const wxString &strPath)
 
void Clear ()
 
void Delete ()
 
void DeleteAll ()
 
void Flush ()
 
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)
 
bool Exists (const wxString &name)
 
void Set (const wxString &name)
 
void UnSet (const wxString &name)
 
void Write (const wxString &name, const wxArrayString &as)
 
void Read (const wxString &name, wxArrayString *as)
 
wxArrayString ReadArrayString (const wxString &name)
 
void WriteBinary (const wxString &name, const wxString &source)
 
void WriteBinary (const wxString &name, void *ptr, size_t len)
 
wxString ReadBinary (const wxString &name)
 
void Write (const wxString &name, const wxColour &c)
 
bool Read (const wxString &name, wxColour *value)
 
wxColour ReadColour (const wxString &name, const wxColour &defaultVal= *wxBLACK)
 
void Write (const wxString &name, const ISerializable &object)
 
bool Read (const wxString &name, ISerializable *object)
 
void Write (const wxString &name, const ConfigManagerContainer::StringToStringMap &map)
 
void Read (const wxString &name, ConfigManagerContainer::StringToStringMap *map)
 
ConfigManagerContainer::StringToStringMap ReadSSMap (const wxString &name)
 
void Write (const wxString &name, const ConfigManagerContainer::IntToStringMap &map)
 
void Read (const wxString &name, ConfigManagerContainer::IntToStringMap *map)
 
ConfigManagerContainer::IntToStringMap ReadISMap (const wxString &name)
 
void Write (const wxString &name, const ConfigManagerContainer::StringSet &set)
 
void Read (const wxString &name, ConfigManagerContainer::StringSet *map)
 
ConfigManagerContainer::StringSet ReadSSet (const wxString &name)
 
void Write (const wxString &name, const ConfigManagerContainer::SerializableObjectMap *map)
 
template<typename T >
void Read (const wxString &name, std::map< wxString, T *> *map)
 

Static Public Member Functions

static wxString LocateDataFile (const wxString &filename, int search_dirs=sdAllKnown)
 Locate a file in an installation- and platform-independent way. More...
 
static wxString GetFolder (SearchDirs dir)
 Access one of Code::Blocks' folders. More...
 
static wxString GetHomeFolder ()
 
static wxString GetConfigFolder ()
 
static wxString GetPluginsFolder (bool global=true)
 
static wxString GetScriptsFolder (bool global=true)
 
static wxString GetDataFolder (bool global=true)
 
static wxString GetExecutableFolder ()
 
static wxString GetTempFolder ()
 
static wxString GetProxy ()
 
static wxString GetRevisionString ()
 
static unsigned int GetRevisionNumber ()
 
static wxString GetSvnDate ()
 
static wxString ReadDataPath ()
 
static wxString ReadAppPath ()
 

Static Protected Member Functions

static bool SetUserDataFolder (const wxString &user_data_path)
 
static wxString GetUserDataFolder ()
 

Private Member Functions

 ConfigManager (TiXmlElement *r)
 
TiXmlElement * AssertPath (wxString &path)
 
TiXmlElement * GetUniqElement (TiXmlElement *p, const wxString &q)
 
void SetNodeText (TiXmlElement *n, const TiXmlText &t)
 
void Collapse (wxString &str) const
 
wxString InvalidNameMessage (const wxString &what, const wxString &sub, TiXmlElement *localPath) const
 

Static Private Member Functions

static void InitPaths ()
 
static void MigrateFolders ()
 

Private Attributes

TiXmlDocument * doc
 
TiXmlElement * root
 
TiXmlElement * pathNode
 

Static Private Attributes

static wxString config_folder
 
static wxString home_folder
 
static wxString data_path_user
 
static wxString data_path_global
 
static wxString app_path
 
static wxString temp_folder
 
static wxString alternate_user_data_path
 
static bool has_alternate_user_data_path =false
 

Friends

class CfgMgrBldr
 
class CodeBlocksApp
 

Detailed Description

Definition at line 94 of file configmanager.h.

Constructor & Destructor Documentation

◆ ConfigManager()

ConfigManager::ConfigManager ( TiXmlElement *  r)
private

Definition at line 678 of file configmanager.cpp.

Member Function Documentation

◆ AssertPath()

TiXmlElement * ConfigManager::AssertPath ( wxString path)
private

◆ Clear()

void ConfigManager::Clear ( )

Definition at line 785 of file configmanager.cpp.

References root.

◆ Collapse()

void ConfigManager::Collapse ( wxString str) const
inlineprivate

Definition at line 142 of file configmanager.cpp.

References _T, wxString::c_str(), and wxString::Truncate().

Referenced by AssertPath(), and DeleteSubPath().

◆ Delete()

void ConfigManager::Delete ( )

◆ DeleteAll()

void ConfigManager::DeleteAll ( )

◆ DeleteSubPath()

void ConfigManager::DeleteSubPath ( const wxString strPath)

◆ EnumerateKeys()

wxArrayString ConfigManager::EnumerateKeys ( const wxString path)

◆ EnumerateSubPaths()

wxArrayString ConfigManager::EnumerateSubPaths ( const wxString path)

◆ Exists()

bool ConfigManager::Exists ( const wxString name)

◆ Flush()

void ConfigManager::Flush ( )

◆ GetConfigFolder()

static wxString ConfigManager::GetConfigFolder ( )
inlinestatic

◆ GetDataFolder()

static wxString ConfigManager::GetDataFolder ( bool  global = true)
inlinestatic

◆ GetExecutableFolder()

static wxString ConfigManager::GetExecutableFolder ( )
inlinestatic

◆ GetFolder()

wxString ConfigManager::GetFolder ( SearchDirs  dir)
static

◆ GetHomeFolder()

static wxString ConfigManager::GetHomeFolder ( )
inlinestatic

Definition at line 171 of file configmanager.h.

References sdHome.

Referenced by CrashHandlerSaveEditorFiles().

◆ GetPath()

wxString ConfigManager::GetPath ( ) const

Definition at line 693 of file configmanager.cpp.

References _T, wxString::Alloc(), cbC2U(), pathNode, wxString::Prepend(), and root.

◆ GetPluginsFolder()

static wxString ConfigManager::GetPluginsFolder ( bool  global = true)
inlinestatic

Definition at line 173 of file configmanager.h.

References sdPluginsGlobal, and sdPluginsUser.

Referenced by MacrosManager::Reset(), and MainFrame::ScanForPlugins().

◆ GetProxy()

wxString ConfigManager::GetProxy ( )
static

◆ GetRevisionNumber()

unsigned int ConfigManager::GetRevisionNumber ( )
static

◆ GetRevisionString()

wxString ConfigManager::GetRevisionString ( )
static

Definition at line 24 of file configmanager-revision.cpp.

Referenced by cbSplashScreen::DrawReleaseInfo().

◆ GetScriptsFolder()

static wxString ConfigManager::GetScriptsFolder ( bool  global = true)
inlinestatic

Definition at line 174 of file configmanager.h.

References sdScriptsGlobal, and sdScriptsUser.

◆ GetSvnDate()

wxString ConfigManager::GetSvnDate ( )
static

Definition at line 36 of file configmanager-revision.cpp.

Referenced by StartHerePage::StartHerePage().

◆ GetTempFolder()

static wxString ConfigManager::GetTempFolder ( )
inlinestatic

Definition at line 177 of file configmanager.h.

References sdTemp.

Referenced by CodeBlocksApp::OnInit().

◆ GetUniqElement()

TiXmlElement * ConfigManager::GetUniqElement ( TiXmlElement *  p,
const wxString q 
)
private

Definition at line 833 of file configmanager.cpp.

References cbU2C().

Referenced by Set(), UnSet(), Write(), and WriteBinary().

◆ GetUserDataFolder()

wxString ConfigManager::GetUserDataFolder ( )
inlinestaticprotected

◆ InitPaths()

void ConfigManager::InitPaths ( )
staticprivate

◆ InvalidNameMessage()

wxString ConfigManager::InvalidNameMessage ( const wxString what,
const wxString sub,
TiXmlElement *  localPath 
) const
private

Definition at line 715 of file configmanager.cpp.

References _T, wxString::c_str(), cbC2U(), wxString::Printf(), and root.

Referenced by AssertPath().

◆ LocateDataFile()

wxString ConfigManager::LocateDataFile ( const wxString filename,
int  search_dirs = sdAllKnown 
)
static

Locate a file in an installation- and platform-independent way.

You should always use this function if you are looking for "some arbitrary file that belongs to Code::Blocks", as it works across platforms without any additional effort from your side, and it has some builtin redundancy.

So, code that looked like this in the old days:
wxString some_file = ConfigManager::GetScriptsFolder() + wxFILE_SEP_PATH + _T("startup.script");
should be converted to this: This would try to locate the file named "startup.script" in the global and also in the user's scripts folders.
Note
User's dirs always have precedence over global dirs.
Parameters
filenamename of the file to search for
search_dirsA bit-mask of the folders to include in the search.

Definition at line 633 of file configmanager.cpp.

References _T, wxPathList::Add(), wxPathList::AddEnvList(), wxPathList::FindValidPath(), sdBase, sdConfig, sdCurrent, sdDataGlobal, sdDataUser, sdHome, sdPath, sdPluginsGlobal, sdPluginsUser, sdScriptsGlobal, sdScriptsUser, sdTemp, and wxGetCwd().

Referenced by CompilerSettingsDlg::AddPluginPanels(), EnvironmentSettingsDlg::AddPluginPanels(), EditorConfigurationDlg::AddPluginPanels(), PluginManager::ExportPlugin(), Compiler::LoadDefaultOptions(), Compiler::LoadRegExArray(), Manager::LoadResource(), ScriptingManager::LoadScript(), CodeBlocksApp::OnInit(), ScriptingManager::OnScriptMenu(), PluginManager::ReadExtraFilesFromManifestFile(), PluginManager::ReadManifestFile(), ScriptBindings::Register_Globals(), Compiler::ReloadOptions(), MainFrame::RunStartupScripts(), ScriptBindings::ShowDialog(), and PluginManager::UninstallPlugin().

◆ MigrateFolders()

void ConfigManager::MigrateFolders ( )
staticprivate

◆ Read() [1/12]

wxString ConfigManager::Read ( const wxString key,
const wxString defaultVal = wxEmptyString 
)

Definition at line 895 of file configmanager.cpp.

References CfgMgrConsts::app_path, app_path, CfgMgrConsts::data_path, data_path_global, and wxString::IsSameAs().

Referenced by cbAuiNotebook::cbAuiNotebook(), CCOptionsDlg::CCOptionsDlg(), EditorConfigurationDlg::ChangeTheme(), CodeBlocksApp::CheckVersion(), ScriptBindings::ConfigManager_Read(), UserVariableManager::Configure(), cbEditor::CreateEditor(), EncodingDetector::DetectEncoding(), DisassemblyDlg::DisassemblyDlg(), Associations::DoClearAssociation(), MainFrame::DoOnFileOpen(), CompilerGCC::DoRunQueue(), Associations::DoSetAssociation(), EditorConfigurationDlg::EditorConfigurationDlg(), CompilerSettingsDlg::EndModal(), EnvironmentSettingsDlg::EndModal(), EditorConfigurationDlg::EndModal(), EnvironmentSettingsDlg::EnvironmentSettingsDlg(), Compiler::EvalXMLCondition(), ToolsManager::Execute(), ParserCommon::FileType(), FindReplaceDlg::FillComboWithLastValues(), ScriptingSettingsDlg::FillScripts(), FindReplaceDlg::FindReplaceDlg(), ProjectManager::GetDefaultPath(), GetProxy(), GetShellString(), cbDebuggerCommonConfig::GetValueTooltipFont(), CodeBlocksApp::InitLocale(), cbEditor::InternalSetEditorStyleBeforeFileOpen(), FilesGroupsAndMasks::Load(), GetUserVariableDialog::Load(), EditorColourSet::Load(), PluginManager::LoadAllPlugins(), Compiler::LoadDefaultOptions(), Compiler::LoadSettings(), EditorConfigurationDlg::LoadThemes(), ToolsManager::LoadTools(), MainFrame::LoadWindowState(), MainFrame::MainFrame(), UserVariableManager::Migrate(), EditorManager::New(), TemplateManager::NewProjectFromUserTemplate(), ScriptConsole::OnbtnLoadClick(), PluginsConfigurationDlg::OnExport(), DebugLogPanel::OnLoadFile(), MainFrame::OnNotebookDoubleClick(), MainFrame::OnViewLayoutSave(), EditorManager::OpenContainingFolder(), OpenContainingFolderData::OpenContainingFolderData(), DebuggerManager::ProcessSettings(), ConfigManagerWrapper::Read(), ReadActiveDebuggerConfig(), ReadArrayString(), ReadBool(), ReadColour(), ReadDouble(), ReadInt(), ReadISMap(), ReadSSet(), ReadSSMap(), ScriptingManager::RefreshTrusts(), CompilerFactory::RegisterUserCompilers(), FindReplace::ReplaceInFiles(), CodeCompletion::RereadOptions(), CompilerGCC::Run(), cbDebuggerPlugin::RunNixConsole(), CompilerGCC::RunSingleFile(), MainFrame::RunStartupScripts(), cbEditor::SaveAs(), PluginManager::SetupLocaleDomain(), CompilerMINGW::SetVersionString(), WizCompilerPanel::WizCompilerPanel(), and WizGenericSelectPathPanel::WizGenericSelectPathPanel().

◆ Read() [2/12]

bool ConfigManager::Read ( const wxString key,
wxString str 
)

◆ Read() [3/12]

bool ConfigManager::Read ( const wxString name,
int *  value 
)

Definition at line 1021 of file configmanager.cpp.

References AssertPath(), and cbU2C().

◆ Read() [4/12]

bool ConfigManager::Read ( const wxString name,
bool *  value 
)

Definition at line 1054 of file configmanager.cpp.

References AssertPath(), and cbU2C().

◆ Read() [5/12]

bool ConfigManager::Read ( const wxString name,
double *  value 
)

Definition at line 1090 of file configmanager.cpp.

References AssertPath(), and cbU2C().

◆ Read() [6/12]

void ConfigManager::Read ( const wxString name,
wxArrayString as 
)

Definition at line 1157 of file configmanager.cpp.

References wxArrayString::Add(), AssertPath(), cbC2U(), and cbU2C().

◆ Read() [7/12]

bool ConfigManager::Read ( const wxString name,
wxColour value 
)

Definition at line 970 of file configmanager.cpp.

References AssertPath(), cbU2C(), wxColour::Set(), and wxNullColour.

◆ Read() [8/12]

bool ConfigManager::Read ( const wxString name,
ISerializable object 
)

◆ Read() [9/12]

void ConfigManager::Read ( const wxString name,
ConfigManagerContainer::StringToStringMap map 
)

Definition at line 1386 of file configmanager.cpp.

References AssertPath(), cbC2U(), and cbU2C().

◆ Read() [10/12]

void ConfigManager::Read ( const wxString name,
ConfigManagerContainer::IntToStringMap map 
)

Definition at line 1435 of file configmanager.cpp.

References AssertPath(), cbC2U(), cbU2C(), and wxString::ToLong().

◆ Read() [11/12]

void ConfigManager::Read ( const wxString name,
ConfigManagerContainer::StringSet map 
)

Definition at line 1492 of file configmanager.cpp.

References AssertPath(), cbC2U(), and cbU2C().

◆ Read() [12/12]

template<typename T >
void ConfigManager::Read ( const wxString name,
std::map< wxString, T *> *  map 
)
inline

Definition at line 297 of file configmanager.h.

References cbC2U(), wxBase64::Decode(), and wxString::mb_str().

◆ ReadAppPath()

static wxString ConfigManager::ReadAppPath ( )
inlinestatic

Definition at line 192 of file configmanager.h.

References Delete(), ParserConsts::ptr, wxBLACK, and wxEmptyString.

◆ ReadArrayString()

wxArrayString ConfigManager::ReadArrayString ( const wxString name)

◆ ReadBinary()

wxString ConfigManager::ReadBinary ( const wxString name)

◆ ReadBool()

bool ConfigManager::ReadBool ( const wxString name,
bool  defaultVal = false 
)

Definition at line 1044 of file configmanager.cpp.

References Read().

Referenced by EditorColourSet::Apply(), cbSmartIndentPlugin::AutoIndentEnabled(), cbSmartIndentPlugin::BraceCompletionEnabled(), cbSmartIndentPlugin::BraceSmartIndentEnabled(), cbAuiNotebook::cbAuiNotebook(), CCOptionsDlg::CCOptionsDlg(), CompilerMessages::CompilerMessages(), ScriptBindings::ConfigManager_Read(), CompilerGCC::Configure(), EncodingDetector::ConvertToWxString(), NativeParser::CreateClassBrowser(), Manager::CreateEmptyToolbar(), ProjectManagerUI::CreateMenuTreeProps(), DebuggerManager::DebuggerManager(), CodeCompletion::DoAllMethodsImpl(), CompilerGCC::DoRegisterCompilers(), CompilerGCC::DoRunQueue(), MainFrame::DoUpdateEditorStyle(), EditorConfigurationDlg::EditorConfigurationDlg(), EnvironmentSettingsDlg::EndModal(), EnvironmentSettingsDlg::EnvironmentSettingsDlg(), ParserCommon::FileType(), ScriptingSettingsDlg::FillTrusts(), FindReplace::Find(), FindReplaceDlg::FindReplaceDlg(), cbEditor::FixFoldState(), cbDebuggerCommonConfig::GetFlag(), CompilerCommandGenerator::GetOrderedIncludeDirs(), CodeBlocksApp::InitAssociations(), CodeBlocksApp::InitLocale(), cbEditor::InternalSetEditorStyleAfterFileOpen(), cbEditor::InternalSetEditorStyleBeforeFileOpen(), DirectCommands::IsObjectOutdated(), EditorColourSet::Load(), PluginManager::LoadAllPlugins(), cbProject::LoadLayout(), Compiler::LoadSettings(), MainFrame::LoadWindowSize(), MainFrame::MainFrame(), NativeParser::NativeParser(), CodeBlocksApp::OnAppActivate(), CompilerOptionsDlg::OnApply(), CompilerGCC::OnAttach(), CCManager::OnCompleteCode(), MainFrame::OnEditorActivated(), cbEditor::OnEditorCharAdded(), MainFrame::OnEditSelectNextSkip(), ProjectManagerUI::OnFindFile(), CodeBlocksApp::OnInit(), CompilerGCC::OnJobEnd(), MainFrame::OnNotebookDoubleClick(), MainFrame::OnSearchMenuUpdateUI(), MainFrame::OnSettingsEnvironment(), MainFrame::OnToggleStatusBar(), CCOptionsDlg::OnUpdateUI(), cbEditor::OnZoom(), cbEditor::Open(), PlaceWindow(), PluginsConfigurationDlg::PluginsConfigurationDlg(), PrintDialog::PrintDialog(), ProjectManagerUI::ProjectManagerUI(), ProjectManagerUI::QueryCloseWorkspace(), ConfigManagerWrapper::ReadBool(), Parser::ReadOptions(), CompilerGCC::Rebuild(), CompilerGCC::RebuildWorkspace(), FindReplace::Replace(), FindReplace::ReplaceInFiles(), DocumentationHelper::RereadOptions(), CodeCompletion::RereadOptions(), NativeParser::RereadParserOptions(), cbProject::SaveLayout(), cbSmartIndentPlugin::SelectionBraceCompletionEnabled(), cbEditor::SetEditorStyleAfterFileOpen(), cbEditor::SetEditorStyleBeforeFileOpen(), cbEditorInternalData::SetLineNumberColWidth(), MainFrame::ShowHideStartPage(), MainFrame::ShowTips(), cbSmartIndentPlugin::SmartIndentEnabled(), cbEditor::Split(), CodeCompletion::UpdateToolBar(), WizCompilerPanel::WizCompilerPanel(), WizFilePathPanel::WizFilePathPanel(), and WizPageBase::WizPageBase().

◆ ReadColour()

wxColour ConfigManager::ReadColour ( const wxString name,
const wxColour defaultVal = *wxBLACK 
)

◆ ReadDataPath()

static wxString ConfigManager::ReadDataPath ( )
inlinestatic

◆ ReadDouble()

double ConfigManager::ReadDouble ( const wxString name,
double  defaultVal = 0.0f 
)

Definition at line 1080 of file configmanager.cpp.

References Read().

Referenced by ScriptBindings::ConfigManager_Read(), and ConfigManagerWrapper::ReadDouble().

◆ ReadInt()

int ConfigManager::ReadInt ( const wxString name,
int  defaultVal = 0 
)

Definition at line 1011 of file configmanager.cpp.

References Read().

Referenced by CompilerGCC::AddOutputLine(), CompilerGCC::AllocProcesses(), CCOptionsDlg::CCOptionsDlg(), ClassBrowser::ClassBrowser(), ScriptBindings::ConfigManager_Read(), MainFrame::CreateIDE(), EncodingDetector::DetectEncoding(), MainFrame::DoUpdateEditorStyle(), MainFrame::DoUpdateLayoutColours(), EditorConfigurationDlg::EditorConfigurationDlg(), EditorManager::EditorManager(), EnvironmentSettingsDlg::EnvironmentSettingsDlg(), ExamineMemoryDlg::ExamineMemoryDlg(), FindReplaceDlg::FindReplaceDlg(), GetEOLStr(), cbDebuggerCommonConfig::GetPerspective(), InitPrinting(), cbEditor::InternalSetEditorStyleAfterFileOpen(), cbEditor::InternalSetEditorStyleBeforeFileOpen(), cbProject::LoadLayout(), Compiler::LoadSettings(), ToolsManager::LoadTools(), MainFrame::LoadWindowSize(), CompilerOptionsDlg::OnApply(), CCManager::OnEditorHook(), CCManager::OnEditorTooltip(), CCManager::OnShowCallTip(), PlaceWindow(), PrintDialog::PrintDialog(), ReadActiveDebuggerConfig(), ConfigManagerWrapper::ReadInt(), Parser::ReadOptions(), NativeParser::RemoveObsoleteParsers(), CodeCompletion::RereadOptions(), cbEditor::SetEditorStyleBeforeFileOpen(), cbEditorInternalData::SetLineNumberColWidth(), MainFrame::SetupGUILogging(), PluginManager::SetupLocaleDomain(), MainFrame::ShowTips(), cbEditor::Split(), ClassBrowser::UpdateSash(), TextCtrlLogger::UpdateSettings(), ListCtrlLogger::UpdateSettings(), CodeCompletion::UpdateToolBar(), and WizGenericSingleChoiceList::WizGenericSingleChoiceList().

◆ ReadISMap()

ConfigManagerContainer::IntToStringMap ConfigManager::ReadISMap ( const wxString name)

Definition at line 1455 of file configmanager.cpp.

References Read().

◆ ReadSSet()

ConfigManagerContainer::StringSet ConfigManager::ReadSSet ( const wxString name)

◆ ReadSSMap()

ConfigManagerContainer::StringToStringMap ConfigManager::ReadSSMap ( const wxString name)

Definition at line 1402 of file configmanager.cpp.

References Read().

◆ Set()

void ConfigManager::Set ( const wxString name)

Definition at line 1104 of file configmanager.cpp.

References AssertPath(), and GetUniqElement().

◆ SetNodeText()

void ConfigManager::SetNodeText ( TiXmlElement *  n,
const TiXmlText &  t 
)
private

Definition at line 842 of file configmanager.cpp.

Referenced by Write(), and WriteBinary().

◆ SetPath()

void ConfigManager::SetPath ( const wxString strPath)

Definition at line 709 of file configmanager.cpp.

References _T, AssertPath(), and pathNode.

◆ SetUserDataFolder()

bool ConfigManager::SetUserDataFolder ( const wxString user_data_path)
staticprotected

◆ UnSet()

void ConfigManager::UnSet ( const wxString name)

Definition at line 1111 of file configmanager.cpp.

References AssertPath(), and GetUniqElement().

Referenced by FindReplaceDlg::FindReplaceDlg(), ColourManager::Save(), and Write().

◆ Write() [1/12]

void ConfigManager::Write ( const wxString name,
const wxString value,
bool  ignoreEmpty = false 
)

Definition at line 859 of file configmanager.cpp.

References _T, CfgMgrConsts::app_path, AssertPath(), CfgMgrConsts::data_path, data_path_global, GetUniqElement(), wxString::IsEmpty(), wxString::IsSameAs(), wxString::mb_str(), SetNodeText(), and UnSet().

Referenced by cbWriteBatchBuildPlugins(), CodeBlocksApp::CheckVersion(), EditorManager::CollectDefines(), ScriptBindings::ConfigManager_Write(), ProjectManagerUI::CreateMenuTreeProps(), MainFrame::DoOnFileOpen(), MainFrame::DoSelectLayout(), PrintDialog::EndModal(), CompilerSettingsDlg::EndModal(), EnvironmentSettingsDlg::EndModal(), BatchLogWindow::EndModal(), PluginsConfigurationDlg::EndModal(), NewFromTemplateDlg::EndModal(), ScriptingSettingsDlg::EndModal(), EditorConfigurationDlg::EndModal(), EnvironmentSettingsDlg::EnvironmentSettingsDlg(), IMPLEMENT_APP(), AnnoyingDialog::Init(), CodeBlocksApp::InitAssociations(), PluginManager::LoadAllPlugins(), MainFrame::MainFrame(), UserVariableManager::Migrate(), CCOptionsDlg::OnApply(), CompilerOptionsDlg::OnApply(), CompilerMessages::OnAutoFit(), ScriptConsole::OnbtnLoadClick(), AnnoyingDialog::OnButton(), PluginsConfigurationDlg::OnExport(), ProjectManagerUI::OnFindFile(), ExamineMemoryDlg::OnGo(), DebugLogPanel::OnLoadFile(), GotoFunctionDlg::OnModeClick(), DebuggerSettingsDlg::OnOK(), WizPageBase::OnPageChanging(), WizFilePathPanel::OnPageChanging(), WizGenericSelectPathPanel::OnPageChanging(), WizCompilerPanel::OnPageChanging(), WizGenericSingleChoiceList::OnPageChanging(), CompilerGCC::OnRelease(), ClassBrowser::OnSetSortType(), InfoPane::OnTabPosition(), ProjectManagerUI::OnTabPosition(), EditorManager::OnTabPosition(), PluginsConfigurationDlg::OnToggle(), MainFrame::OnToggleStatusBar(), ProjectManagerUI::OnViewCategorize(), MainFrame::OnViewHideEditorTabs(), ProjectManagerUI::OnViewHideFolderName(), ClassBrowser::OnViewScope(), ProjectManagerUI::OnViewUseFolders(), cbEditor::Print(), DebuggerManager::ProcessSettings(), ProjectManagerUI::ProjectManagerUI(), Parser::ReadOptions(), ColourManager::Save(), FilesGroupsAndMasks::Save(), EditorColourSet::Save(), cbEditor::SaveAs(), FindReplaceDlg::SaveComboValues(), Compiler::SaveSettings(), ToolsManager::SaveTools(), MainFrame::SaveWindowState(), ScriptBindings::IOLib::SecurityAllows(), ProjectManager::SetDefaultPath(), DebuggerManager::SetDisassemblyMixedMode(), cbDebuggerCommonConfig::SetFlag(), cbDebuggerCommonConfig::SetPerspective(), PluginManager::SetupLocaleDomain(), cbDebuggerCommonConfig::SetValueTooltipFont(), MainFrame::ShowTips(), RecentItemsList::TerminateHistory(), Write(), ConfigManagerWrapper::Write(), WriteActiveDebuggerConfig(), DocumentationHelper::WriteOptions(), Parser::WriteOptions(), ClassBrowser::~ClassBrowser(), EditorManager::~EditorManager(), FindReplaceDlg::~FindReplaceDlg(), and ScriptingManager::~ScriptingManager().

◆ Write() [2/12]

void ConfigManager::Write ( const wxString key,
const char *  str 
)

Definition at line 888 of file configmanager.cpp.

References cbC2U(), and Write().

◆ Write() [3/12]

void ConfigManager::Write ( const wxString name,
int  value 
)

Definition at line 1002 of file configmanager.cpp.

References AssertPath(), and GetUniqElement().

◆ Write() [4/12]

void ConfigManager::Write ( const wxString name,
bool  value 
)

Definition at line 1035 of file configmanager.cpp.

References AssertPath(), and GetUniqElement().

◆ Write() [5/12]

void ConfigManager::Write ( const wxString name,
double  value 
)

Definition at line 1071 of file configmanager.cpp.

References AssertPath(), and GetUniqElement().

◆ Write() [6/12]

void ConfigManager::Write ( const wxString name,
const wxArrayString as 
)

Definition at line 1133 of file configmanager.cpp.

References _T, AssertPath(), wxArrayString::GetCount(), and GetUniqElement().

◆ Write() [7/12]

void ConfigManager::Write ( const wxString name,
const wxColour c 
)

◆ Write() [8/12]

void ConfigManager::Write ( const wxString name,
const ISerializable object 
)

◆ Write() [9/12]

void ConfigManager::Write ( const wxString name,
const ConfigManagerContainer::StringToStringMap map 
)

Definition at line 1362 of file configmanager.cpp.

References _T, AssertPath(), cbU2C(), and GetUniqElement().

◆ Write() [10/12]

void ConfigManager::Write ( const wxString name,
const ConfigManagerContainer::IntToStringMap map 
)

◆ Write() [11/12]

void ConfigManager::Write ( const wxString name,
const ConfigManagerContainer::StringSet set 
)

Definition at line 1467 of file configmanager.cpp.

References _T, AssertPath(), cbU2C(), and GetUniqElement().

◆ Write() [12/12]

void ConfigManager::Write ( const wxString name,
const ConfigManagerContainer::SerializableObjectMap map 
)

Definition at line 1516 of file configmanager.cpp.

References _T, AssertPath(), cbU2C(), wxBase64::Encode(), and GetUniqElement().

◆ WriteBinary() [1/2]

void ConfigManager::WriteBinary ( const wxString name,
const wxString source 
)

◆ WriteBinary() [2/2]

void ConfigManager::WriteBinary ( const wxString name,
void *  ptr,
size_t  len 
)

Definition at line 1192 of file configmanager.cpp.

References WriteBinary().

Friends And Related Function Documentation

◆ CfgMgrBldr

friend class CfgMgrBldr
friend

Definition at line 96 of file configmanager.h.

◆ CodeBlocksApp

friend class CodeBlocksApp
friend

Definition at line 97 of file configmanager.h.

Member Data Documentation

◆ alternate_user_data_path

wxString ConfigManager::alternate_user_data_path
staticprivate

Definition at line 122 of file configmanager.h.

◆ app_path

wxString ConfigManager::app_path
staticprivate

Definition at line 120 of file configmanager.h.

Referenced by GetFolder(), InitPaths(), and Read().

◆ config_folder

wxString ConfigManager::config_folder
staticprivate

Definition at line 112 of file configmanager.h.

Referenced by GetFolder().

◆ data_path_global

wxString ConfigManager::data_path_global
staticprivate

Definition at line 115 of file configmanager.h.

Referenced by GetFolder(), InitPaths(), Read(), and Write().

◆ data_path_user

wxString ConfigManager::data_path_user
staticprivate

Definition at line 114 of file configmanager.h.

Referenced by GetFolder().

◆ doc

TiXmlDocument* ConfigManager::doc
private

Definition at line 99 of file configmanager.h.

Referenced by Delete(), DeleteAll(), and DeleteSubPath().

◆ has_alternate_user_data_path

bool ConfigManager::has_alternate_user_data_path =false
staticprivate

Definition at line 123 of file configmanager.h.

Referenced by CfgMgrBldr::FindConfigFile(), GetUserDataFolder(), and InitPaths().

◆ home_folder

wxString ConfigManager::home_folder
staticprivate

Definition at line 113 of file configmanager.h.

Referenced by GetFolder().

◆ pathNode

TiXmlElement* ConfigManager::pathNode
private

Definition at line 101 of file configmanager.h.

Referenced by AssertPath(), DeleteSubPath(), GetPath(), and SetPath().

◆ root

TiXmlElement* ConfigManager::root
private

◆ temp_folder

wxString ConfigManager::temp_folder
staticprivate

Definition at line 121 of file configmanager.h.

Referenced by GetFolder().


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