added: to Space:

std::wstring & FindAdd(const wchar_t * name);
       std::wstring & FindAdd(const std::wstring & name);



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@397 e52654a7-88a9-db11-a3e9-0013d4bc506e
master
Tomasz Sowa 11 years ago
parent 0b97609811
commit 0b66e6b807

@ -343,7 +343,33 @@ return def;
}
std::wstring & Space::FindAdd(const wchar_t * name)
{
tmp_name = name;
std::wstring * value = GetValue(tmp_name);
if( !value )
{
value = &table_single[tmp_name];
table.erase(tmp_name);
}
return *value;
}
std::wstring & Space::FindAdd(const std::wstring & name)
{
std::wstring * value = GetValue(name);
if( !value )
{
value = &table_single[name];
table.erase(name);
}
return *value;
}
std::wstring & Space::Add(const wchar_t * name, bool value)

@ -212,6 +212,9 @@ public:
bool Bool(const wchar_t * name, bool def);
bool Bool(const std::wstring & name, bool def);
std::wstring & FindAdd(const wchar_t * name);
std::wstring & FindAdd(const std::wstring & name);
std::wstring & Add(const wchar_t * name, bool value);
std::wstring & Add(const std::wstring & name, bool value);

Loading…
Cancel
Save