| 94 | } |
| 95 | |
| 96 | void KVBinaryOutputStream::end_object() { |
| 97 | invariant(!m_objects_stack.empty(), ""); |
| 98 | |
| 99 | auto level = std::move(m_stack.back()); |
| 100 | m_stack.pop_back(); |
| 101 | |
| 102 | auto obj_stream = std::move(m_objects_stack.back()); |
| 103 | m_objects_stack.pop_back(); |
| 104 | |
| 105 | IOutputStream &out = m_objects_stack.empty() ? m_target : stream(); |
| 106 | |
| 107 | if (verbose_debug) |
| 108 | std::cout << "end_object TYPE_OBJECT level.count=" << level.count << " level.name=" << (std::string)level.name |
| 109 | << std::endl; |
| 110 | |
| 111 | write_array_size(out, level.count); |
| 112 | out.write(obj_stream.buffer().data(), obj_stream.buffer().size()); |
| 113 | if (verbose_tokens) |
| 114 | std::cout << "OBJ c=" << level.count << std::endl; |
| 115 | } |
| 116 | |
| 117 | bool KVBinaryOutputStream::begin_array(size_t &size, bool fixed_size) { |
| 118 | write_element_prefix(BIN_KV_SERIALIZE_TYPE_ARRAY); |
nothing calls this directly
no test coverage detected