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* GetConfigInfo() { return &fConfigInfo; }
|
||||||
plConfigInfo* GetConfigInfoLog() { return &fLog; }
|
plConfigInfo* GetConfigInfoLog() { return &fLog; }
|
||||||
|
|
||||||
bool GetValue(plString& retval, const plString & section, const plString & key, const plString & desc, const plString& defval = "");
|
template <typename _Type>
|
||||||
bool GetValue(int& retval, const plString & section, const plString & key, const plString & desc, int defval);
|
bool GetValue(_Type& retval, const plString & section, const plString & key, const plString & desc, const _Type& defval = _Type())
|
||||||
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);
|
plString descwdef = plFormat("{} # {}", defval, desc);
|
||||||
bool GetValue(double& retval, const plString & section, const plString & key, const plString & desc, double defval);
|
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);
|
bool GetAllValues(std::vector<plString>& values, const plString & section, const plString & key, const plString & desc);
|
||||||
|
|
||||||
#if USE_MULT_SECTIONS
|
#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)
|
bool plConfigInfoLogging::GetAllValues(std::vector<plString>& values, const plString & section, const plString & key, const plString & desc)
|
||||||
{
|
{
|
||||||
plString descwdef = plFormat("\"Multiple Entries\" # {}", desc);
|
plString descwdef = plFormat("\"Multiple Entries\" # {}", desc);
|
||||||
|
Reference in New Issue
Block a user