Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

ConfigManager in main.cpp

(1/2) > >>

puneet_m:
In the function DoOnFileOpen(bool bProject), there is a  statement

ConfigManager* mgr = Manager::Get()->GetConfigManager(_T("app"));

Can anyone explain as to what does this function do?

Puneet

Biplab:
It fetches the instance of ConfigManager. Download the SDK documentation from the following link. That will be helpful for you.

--- Quote ---http://prdownload.berlios.de/codeblocks/codeblocks_sdk_doc_r4395.chm
--- End quote ---

puneet_m:
Thanks Biplab. I got the point that it is creating the instance, but what is the use of passing a namespace argument in the function GetConfigManager.

Also there are couple of statements saying this -->

mgr->Read(_T("/file_dialogs/file_new_open/filter"));
mgr->Read(_T("/file_dialogs/file_new_open/directory"), Path);

But I do not see any such folder. Where are these folders located?

Ceniza:
Those aren't folders. That's used to read configuration values. Check default.conf (Code::Blocks' configuration file) to get an idea.

P.S.: default.conf is a XML file.

Biplab:
Ceniza explained what I was about to post. :)

Navigation

[0] Message Index

[#] Next page

Go to full version