add Space::get_table_item() method

This commit is contained in:
Tomasz Sowa 2022-05-30 00:55:38 +02:00
parent c3b7ab5793
commit a40bab0445
2 changed files with 15 additions and 3 deletions

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2021, Tomasz Sowa
* Copyright (c) 2008-2022, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -2577,6 +2577,18 @@ void Space::remove_value_table(bool only_clear)
}
Space * Space::get_table_item(size_t index)
{
if( is_table() && index < table_size() )
{
return value.value_table[index];
}
return nullptr;
}
} // namespace

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2010-2021, Tomasz Sowa
* Copyright (c) 2010-2022, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -635,7 +635,7 @@ public:
bool has_value(const wchar_t * field, const std::wstring & val) const;
Space * get_table_item(size_t index);
protected: