Browse Source

add Space::get_table_item() method

master
Tomasz Sowa 6 months ago
parent
commit
a40bab0445
  1. 14
      src/space/space.cpp
  2. 4
      src/space/space.h

14
src/space/space.cpp

@ -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

4
src/space/space.h

@ -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:

Loading…
Cancel
Save