MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / write_bson_array

Method write_bson_array

dependencies/json/json.hpp:13873–13887  ·  view source on GitHub ↗

! @brief Writes a BSON element with key @a name and array @a value */

Source from the content-addressed store, hash-verified

13871 @brief Writes a BSON element with key @a name and array @a value
13872 */
13873 void write_bson_array(const string_t& name,
13874 const typename BasicJsonType::array_t& value)
13875 {
13876 write_bson_entry_header(name, 0x04); // array
13877 write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_array_size(value)));
13878
13879 std::size_t array_index = 0ul;
13880
13881 for (const auto& el : value)
13882 {
13883 write_bson_element(std::to_string(array_index++), el);
13884 }
13885
13886 oa->write_character(to_char_type(0x00));
13887 }
13888
13889 /*!
13890 @brief Writes a BSON element with key @a name and binary value @a value

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
write_characterMethod · 0.45

Tested by

no test coverage detected