added: to config: HasValue() methods

for checking if a value exists (useful for checking lists -- they don't have to be copied out)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@920 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2013-04-02 22:24:30 +00:00
parent 495499d12f
commit aed891764a
2 changed files with 27 additions and 0 deletions

View File

@ -434,6 +434,28 @@ bool Config::ListText(const std::wstring & name, std::vector<std::wstring> & lis
} }
bool Config::HasValue(const wchar_t * name, const wchar_t * value)
{
return space.HasValue(name, value);
}
bool Config::HasValue(const wchar_t * name, const std::wstring & value)
{
return space.HasValue(name, value);
}
bool Config::HasValue(const std::wstring & name, const wchar_t * value)
{
return space.HasValue(name, value);
}
bool Config::HasValue(const std::wstring & name, const std::wstring & value)
{
return space.HasValue(name, value);
}
void Config::Print(std::wostream & out) void Config::Print(std::wostream & out)
{ {
space.Serialize(out); space.Serialize(out);

View File

@ -616,6 +616,11 @@ public:
bool ListText(const wchar_t * name, std::vector<std::wstring> & list); bool ListText(const wchar_t * name, std::vector<std::wstring> & list);
bool ListText(const std::wstring & name, std::vector<std::wstring> & list); bool ListText(const std::wstring & name, std::vector<std::wstring> & list);
bool HasValue(const wchar_t * name, const wchar_t * value);
bool HasValue(const wchar_t * name, const std::wstring & value);
bool HasValue(const std::wstring & name, const wchar_t * value);
bool HasValue(const std::wstring & name, const std::wstring & value);
// for debug // for debug
void Print(std::wostream & out); void Print(std::wostream & out);