TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ get_ubjson_array()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array ( )
inlineprivate
Returns
whether array creation completed

Definition at line 10536 of file json.hpp.

10537 {
10538 std::pair<std::size_t, char_int_type> size_and_type;
10539
10540 if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type)))
10541 {
10542 return false;
10543 }
10544
10545 if (size_and_type.first != string_t::npos)
10546 {
10547 if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first)))
10548 {
10549 return false;
10550 }
10551
10552 if (size_and_type.second != 0)
10553 {
10554 if (size_and_type.second != 'N')
10555 {
10556 for (std::size_t i = 0; i < size_and_type.first; ++i)
10557 {
10558 if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second)))
10559 {
10560 return false;
10561 }
10562 }
10563 }
10564 }
10565
10566 else
10567 {
10568 for (std::size_t i = 0; i < size_and_type.first; ++i)
10569 {
10570 if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))
10571 {
10572 return false;
10573 }
10574 }
10575 }
10576 }
10577
10578 else
10579 {
10580 if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1))))
10581 {
10582 return false;
10583 }
10584
10585 while (current != ']')
10586 {
10587 if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false)))
10588 {
10589 return false;
10590 }
10591
10593 }
10594 }
10595
10596 return sax->end_array();
10597 }
char_int_type get_ignore_noop()
Definition: json.hpp:10778
bool parse_ubjson_internal(const bool get_char=true)
Definition: json.hpp:10228
bool get_ubjson_size_type(std::pair< std::size_t, char_int_type > &result)
determine the type and size for a container
Definition: json.hpp:10388
bool get_ubjson_value(const char_int_type prefix)
Definition: json.hpp:10431
char_int_type current
the current character
Definition: json.hpp:10978
json_sax_t * sax
the SAX parser
Definition: json.hpp:10987