MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / StartStruct

Method StartStruct

native/thirdpart/flatbuffers/idl_parser.cpp:2415–2427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2413}
2414
2415CheckedError Parser::StartStruct(const std::string &name, StructDef **dest) {
2416 auto &struct_def = *LookupCreateStruct(name, true, true);
2417 if (!struct_def.predecl) return Error("datatype already exists: " + name);
2418 struct_def.predecl = false;
2419 struct_def.name = name;
2420 struct_def.file = file_being_parsed_;
2421 // Move this struct to the back of the vector just in case it was predeclared,
2422 // to preserve declaration order.
2423 *std::remove(structs_.vec.begin(), structs_.vec.end(), &struct_def) =
2424 &struct_def;
2425 *dest = &struct_def;
2426 return NoError();
2427}
2428
2429CheckedError Parser::CheckClash(std::vector<FieldDef *> &fields,
2430 StructDef *struct_def, const char *suffix,

Callers 2

ParseTableMethod · 0.80
CopyTableFunction · 0.80

Calls 4

ErrorFunction · 0.85
NoErrorFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected