- Added !SetOption/!SetOptionGroup bangs.

- Script: Added GetOption() function
This commit is contained in:
Birunthan Mohanathas
2011-07-27 10:42:35 +00:00
parent 23f4a31bf0
commit 822c10060a
19 changed files with 235 additions and 329 deletions

View File

@ -1195,6 +1195,26 @@ void CConfigParser::SetValue(const std::wstring& strSection, const std::wstring&
m_Values[StrToLower(strTmp)] = strValue;
}
//==============================================================================
/**
** Deletes the value for the key under the given section.
**
** \param strSection The name of the section.
** \param strKey The name of the key.
** \param strValue The value for the key.
*/
void CConfigParser::DeleteValue(const std::wstring& strSection, const std::wstring& strKey)
{
std::wstring strTmp = strSection + L"::";
strTmp += strKey;
std::unordered_map<std::wstring, std::wstring>::iterator i = m_Values.find(StrToLower(strTmp));
if (i != m_Values.end())
{
m_Values.erase(i);
}
}
//==============================================================================
/**
** Returns the value for the key under the given section.