mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
No need to duplicate this...
This commit is contained in:
@ -142,11 +142,17 @@ public:
|
||||
plConfigInfo* GetConfigInfo() { return &fConfigInfo; }
|
||||
plConfigInfo* GetConfigInfoLog() { return &fLog; }
|
||||
|
||||
bool GetValue(plString& retval, const plString & section, const plString & key, const plString & desc, const plString& defval = "");
|
||||
bool GetValue(int& retval, const plString & section, const plString & key, const plString & desc, int defval);
|
||||
bool GetValue(bool& retval, const plString & section, const plString & key, const plString & desc, bool defval);
|
||||
bool GetValue(float& retval, const plString & section, const plString & key, const plString & desc, float defval);
|
||||
bool GetValue(double& retval, const plString & section, const plString & key, const plString & desc, double defval);
|
||||
template <typename _Type>
|
||||
bool GetValue(_Type& retval, const plString & section, const plString & key, const plString & desc, const _Type& defval = _Type())
|
||||
{
|
||||
plString descwdef = plFormat("{} # {}", defval, desc);
|
||||
fLog.AddValue(section, key, descwdef, kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
retval = fConfigInfo.GetValue(section, key, defval, &found);
|
||||
return found;
|
||||
}
|
||||
|
||||
bool GetAllValues(std::vector<plString>& values, const plString & section, const plString & key, const plString & desc);
|
||||
|
||||
#if USE_MULT_SECTIONS
|
||||
|
@ -49,57 +49,6 @@ plConfigInfoLogging::~plConfigInfoLogging()
|
||||
{
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetValue(plString& retval, const plString & section, const plString & key, const plString & desc, const plString& defval)
|
||||
{
|
||||
plString descwdef = plString::Format("%s # %s",defval.c_str(),desc.c_str());
|
||||
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
retval = fConfigInfo.GetValue(section,key,defval,&found);
|
||||
return found;
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetValue(int& retval, const plString & section, const plString & key, const plString & desc, int defval)
|
||||
{
|
||||
plString descwdef = plString::Format("%d # %s",defval,desc.c_str());
|
||||
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
retval = fConfigInfo.GetValue(section,key,defval,&found);
|
||||
return found;
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetValue(bool& retval, const plString & section, const plString & key, const plString & desc, bool defval)
|
||||
{
|
||||
plString descwdef = plString::Format("%d # %s",defval,desc.c_str());
|
||||
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
retval = ( fConfigInfo.GetValue(section,key,(int)defval,&found)!=0 );
|
||||
return found;
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetValue(float& retval, const plString & section, const plString & key, const plString & desc, float defval)
|
||||
{
|
||||
plString descwdef = plString::Format("%f # %s",defval,desc.c_str());
|
||||
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
double retvald = fConfigInfo.GetValue(section,key,defval,&found);
|
||||
retval = (float)retvald;
|
||||
return found;
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetValue(double& retval, const plString & section, const plString & key, const plString & desc, double defval)
|
||||
{
|
||||
plString descwdef = plString::Format("%f # %s",defval,desc.c_str());
|
||||
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
|
||||
|
||||
bool found;
|
||||
retval = fConfigInfo.GetValue(section,key,defval,&found);
|
||||
return found;
|
||||
}
|
||||
|
||||
bool plConfigInfoLogging::GetAllValues(std::vector<plString>& values, const plString & section, const plString & key, const plString & desc)
|
||||
{
|
||||
plString descwdef = plFormat("\"Multiple Entries\" # {}", desc);
|
||||
|
Reference in New Issue
Block a user