MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / get_bson_string

Method get_bson_string

Source/Utils/json.hpp:7848–7857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7846 */
7847 template<typename NumberType>
7848 bool get_bson_string(const NumberType len, string_t& result)
7849 {
7850 if (JSON_HEDLEY_UNLIKELY(len < 1))
7851 {
7852 auto last_token = get_token_string();
7853 return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string")));
7854 }
7855
7856 return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof();
7857 }
7858
7859 /*!
7860 @brief Parses a byte array input of length @a len from the BSON input.

Callers

nothing calls this directly

Calls 4

get_token_stringFunction · 0.85
createFunction · 0.85
getFunction · 0.85
parse_errorMethod · 0.45

Tested by

no test coverage detected