added to Space:

Space & get_add_space(const wchar_t * field);
Space & get_add_space(const std::wstring & field);
This commit is contained in:
Tomasz Sowa 2021-06-27 15:58:53 +02:00
parent 009e240a8d
commit e0d6e7fcb1
2 changed files with 24 additions and 0 deletions

View File

@ -1689,6 +1689,27 @@ Space * Space::get_space(const std::wstring & field)
}
Space & Space::get_add_space(const wchar_t * field)
{
pt::Space * space = get_space(field);
if( !space )
{
return add_empty_space(field);
}
return *space;
}
Space & Space::get_add_space(const std::wstring & field)
{
return get_add_space(field.c_str());
}
bool * Space::get_bool(const wchar_t * field)
{
Space * space = get_space(field);

View File

@ -458,6 +458,9 @@ public:
Space * get_space(const std::wstring & field);
const Space * get_space(const std::wstring & field) const;
// find for such a space in an object, if not found then create one
Space & get_add_space(const wchar_t * field);
Space & get_add_space(const std::wstring & field);
bool * get_bool(const wchar_t * field);
long long * get_llong(const wchar_t * field);