! @brief Writes a BSON element with key @a name and string value @a value */
| 13682 | @brief Writes a BSON element with key @a name and string value @a value |
| 13683 | */ |
| 13684 | void write_bson_string(const string_t& name, |
| 13685 | const string_t& value) |
| 13686 | { |
| 13687 | write_bson_entry_header(name, 0x02); |
| 13688 | |
| 13689 | write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size() + 1ul)); |
| 13690 | oa->write_characters( |
| 13691 | reinterpret_cast<const CharType*>(value.c_str()), |
| 13692 | value.size() + 1); |
| 13693 | } |
| 13694 | |
| 13695 | /*! |
| 13696 | @brief Writes a BSON element with key @a name and null value |