spx 2010-12-11 05:27:01 +00:00
parent 54537c66b0
commit fe22cfdf3d
2 changed files with 8 additions and 1 deletions

View File

@ -672,12 +672,18 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT
return result;
}
bool CConfigParser::IsValueDefined(LPCTSTR section, LPCTSTR key)
bool CConfigParser::IsKeyDefined(LPCTSTR section, LPCTSTR key)
{
ReadString(section, key, L"", false);
return !m_LastDefaultUsed;
}
bool CConfigParser::IsValueDefined(LPCTSTR section, LPCTSTR key)
{
const std::wstring& result = ReadString(section, key, L"", false);
return (!m_LastDefaultUsed && !result.empty());
}
void CConfigParser::AddMeasure(CMeasure* pMeasure)
{
if (pMeasure)

View File

@ -52,6 +52,7 @@ public:
void ResetMonitorVariables(CMeterWindow* meterWindow = NULL);
const std::wstring& ReadString(LPCTSTR section, LPCTSTR key, LPCTSTR defValue, bool bReplaceMeasures = true);
bool IsKeyDefined(LPCTSTR section, LPCTSTR key);
bool IsValueDefined(LPCTSTR section, LPCTSTR key);
double ReadFloat(LPCTSTR section, LPCTSTR key, double defValue);
double ReadFormula(LPCTSTR section, LPCTSTR key, double defValue);