TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ get_bson_cstr()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr ( string_t &  result)
inlineprivate

Parses a C-style string from the BSON input.

Parameters
[in,out]resultA reference to the string variable where the read string is to be stored.
Returns
true if the \x00-byte indicating the end of the string was encountered before the EOF; false` indicates an unexpected EOF.

Definition at line 8567 of file json.hpp.

8568 {
8569 auto out = std::back_inserter(result);
8570
8571 while (true)
8572 {
8573 get();
8574
8575 if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "cstring")))
8576 {
8577 return false;
8578 }
8579
8580 if (current == 0x00)
8581 {
8582 return true;
8583 }
8584
8585 *out++ = static_cast<typename string_t::value_type>(current);
8586 }
8587 }
bool unexpect_eof(const input_format_t format, const char *context) const
Definition: json.hpp:10914
char_int_type current
the current character
Definition: json.hpp:10978
char_int_type get()
get next character from the input
Definition: json.hpp:10769