mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
Core: GetIniKeys (all)
git-svn-id: svn://ultimatepp.org/upp/trunk@6389 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
685361024a
commit
e737343bc6
2 changed files with 15 additions and 1 deletions
|
|
@ -83,10 +83,22 @@ String GetIniFile()
|
|||
return *sIniFile ? sIniFile : ~ConfigFile("q.ini");
|
||||
}
|
||||
|
||||
static VectorMap<String, String>& sIniKeys()
|
||||
{
|
||||
static VectorMap<String, String> key;
|
||||
return key;
|
||||
}
|
||||
|
||||
VectorMap<String, String> GetIniKeys()
|
||||
{
|
||||
Mutex::Lock __(sMtx);
|
||||
return VectorMap<String, String>(sIniKeys(), 0);
|
||||
}
|
||||
|
||||
String GetIniKey(const char *id, const String& def) {
|
||||
ASSERT_(IsMainRunning(), "GetIniKey is allowed only after APP_MAIN has started");
|
||||
Mutex::Lock __(sMtx);
|
||||
static VectorMap<String, String> key;
|
||||
VectorMap<String, String>& key = sIniKeys();
|
||||
static int version;
|
||||
if(version != ini_version__) {
|
||||
version = ini_version__;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ String GetIniFile();
|
|||
String GetIniKey(const char *id, const String& def);
|
||||
String GetIniKey(const char *id);
|
||||
|
||||
VectorMap<String, String> GetIniKeys();
|
||||
|
||||
#ifdef flagSO
|
||||
bool IniChanged__(int version);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue