MCPcopy Create free account
hub / github.com/Samsung/UTopia / genProtoFile

Method genProtoFile

lib/generation/ProtobufDescriptor.cpp:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void ProtobufDescriptor::genProtoFile(const std::string &OutDir) const {
35 google::protobuf::DescriptorPool DescriptorPool;
36 auto *FD = DescriptorPool.BuildFile(ProtoFile);
37 if (!FD) {
38 assert(false && "Failed to generate proto file");
39 }
40 std::ofstream OFS((fs::path(OutDir) / ProtoFile.name()).string());
41 OFS << FD->DebugString();
42 OFS.close();
43}
44
45std::string ProtobufDescriptor::getHeaderName() const { return Name + ".pb.h"; }
46

Callers 3

genEntryMethod · 0.80
verifyProtoMethod · 0.80
TEST_FFunction · 0.80

Calls 1

nameMethod · 0.80

Tested by 2

verifyProtoMethod · 0.64
TEST_FFunction · 0.64