TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ get_cbor_array()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array ( const std::size_t  len,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]lenthe length of the array or std::size_t(-1) for an array of indefinite size
[in]tag_handlerhow CBOR tags should be treated
Returns
whether array creation completed

Definition at line 9493 of file json.hpp.

9495 {
9496 if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))
9497 {
9498 return false;
9499 }
9500
9501 if (len != std::size_t(-1))
9502 {
9503 for (std::size_t i = 0; i < len; ++i)
9504 {
9505 if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler)))
9506 {
9507 return false;
9508 }
9509 }
9510 }
9511
9512 else
9513 {
9514 while (get() != 0xFF)
9515 {
9516 if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler)))
9517 {
9518 return false;
9519 }
9520 }
9521 }
9522
9523 return sax->end_array();
9524 }
bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler)
Definition: json.hpp:8794
json_sax_t * sax
the SAX parser
Definition: json.hpp:10987
char_int_type get()
get next character from the input
Definition: json.hpp:10769