MCPcopy Create free account
hub / github.com/bcndev/bytecoin / begin_object

Method begin_object

src/seria/KVBinaryOutputStream.cpp:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80void KVBinaryOutputStream::next_map_key(std::string &name) { m_next_key = name; }
81
82bool KVBinaryOutputStream::begin_object() {
83 if (m_stack.empty()) {
84 invariant(m_expecting_root, "expecting only object");
85 m_expecting_root = false;
86 } else
87 write_element_prefix(BIN_KV_SERIALIZE_TYPE_OBJECT);
88
89 m_stack.push_back(Level(common::StringView("")));
90 m_objects_stack.emplace_back();
91 if (verbose_debug)
92 std::cout << "begin_object m_objects_stack.push_back, m_stack.push_back name=" << std::endl;
93 return true;
94}
95
96void KVBinaryOutputStream::end_object() {
97 invariant(!m_objects_stack.empty(), "");

Callers

nothing calls this directly

Calls 3

StringViewClass · 0.85
LevelClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected