MCPcopy Create free account
hub / github.com/apache/brpc / object_add_item

Function object_add_item

src/mcpack2pb/serializer.cpp:193–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 Serializer::GroupInfo& group_info);
192
193inline bool object_add_item(Serializer::GroupInfo & group_info,
194 const StringWrapper& name) {
195 if (name.size() > 254) {
196 CHECK(false) << "Too long name=`" << name << '\'';
197 return false;
198 }
199 if (group_info.type != FIELD_OBJECT) {
200 CHECK(false) << "Cannot add `" << name << "' to " << group_info;
201 return false;
202 }
203 ++group_info.item_count;
204 return true;
205}
206
207inline bool array_add_item(OutputStream* stream,
208 Serializer::GroupInfo & group_info,

Callers 6

add_primitiveFunction · 0.85
add_binary_internalFunction · 0.85
add_null_internalFunction · 0.85
add_empty_array_internalFunction · 0.85
begin_object_internalMethod · 0.85
begin_array_internalMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected