Go to the documentation of this file.
35 #include <google/protobuf/compiler/cpp/cpp_file.h>
41 #include <unordered_map>
42 #include <unordered_set>
45 #include <google/protobuf/compiler/cpp/cpp_enum.h>
46 #include <google/protobuf/compiler/cpp/cpp_extension.h>
47 #include <google/protobuf/compiler/cpp/cpp_field.h>
48 #include <google/protobuf/compiler/cpp/cpp_helpers.h>
49 #include <google/protobuf/compiler/cpp/cpp_message.h>
50 #include <google/protobuf/compiler/cpp/cpp_service.h>
51 #include <google/protobuf/compiler/scc.h>
52 #include <google/protobuf/descriptor.pb.h>
53 #include <google/protobuf/io/printer.h>
54 #include <google/protobuf/stubs/strutil.h>
57 #include <google/protobuf/port_def.inc>
70 return val.full_name();
79 bool CompareSortKeys(
const T* a,
const T*
b) {
80 return GetSortKey(*a) < GetSortKey(*
b);
84 std::vector<const T*> Sorted(
const std::unordered_set<const T*>&
vals) {
85 std::vector<const T*> sorted(
vals.begin(),
vals.end());
86 std::sort(sorted.begin(), sorted.end(), CompareSortKeys<T>);
103 variables_[
"file_level_service_descriptors"] =
109 for (
int i = 0;
i < msgs.size();
i++) {
111 MessageGenerator* msg_gen =
117 for (
int i = 0;
i <
file->enum_type_count();
i++) {
122 for (
int i = 0;
i <
file->service_count();
i++) {
131 for (
int i = 0;
i <
file->extension_count();
i++) {
135 for (
int i = 0;
i <
file->weak_dependency_count(); ++
i) {
147 if (
file_->
name() !=
"net/proto2/compiler/proto/plugin.proto" &&
148 file_->
name() !=
"google/protobuf/compiler/plugin.proto") {
151 std::vector<std::string> names_to_undef;
152 std::vector<const FieldDescriptor*>
fields;
154 for (
int i = 0;
i <
fields.size();
i++) {
156 static const char* kMacroNames[] = {
"major",
"minor"};
158 if (
name == kMacroNames[j]) {
159 names_to_undef.push_back(
name);
164 for (
int i = 0;
i < names_to_undef.size(); ++
i) {
177 IncludeFile(
"net/proto2/public/port_def.inc", printer);
184 "PROTOBUF_NAMESPACE_OPEN\n"
185 "namespace internal {\n"
186 "class AnyMetadata;\n"
187 "} // namespace internal\n"
188 "PROTOBUF_NAMESPACE_CLOSE\n");
222 "// @@protoc_insertion_point(namespace_scope)\n"
231 "// @@protoc_insertion_point(global_scope)\n"
233 IncludeFile(
"net/proto2/public/port_undef.inc", printer);
248 "#error \"Do not SWIG-wrap protobufs.\"\n"
254 format(
"// IWYU pragma: private, include \"$1$.proto.h\"\n\n",
265 format(
"// @@protoc_insertion_point(includes)\n");
284 format(
"#include \"$1$.proto.h\" // IWYU pragma: export\n",
297 format(
"// @@protoc_insertion_point(includes)\n");
308 "// @@protoc_insertion_point(namespace_scope)\n");
312 "// @@protoc_insertion_point(global_scope)\n"
332 format(
"#include <google/protobuf/$1$>",
path);
334 format(
"#include \"$1$google/protobuf/$2$\"",
338 format(
"#include \"$1$\"", google3_name);
342 format(
" // IWYU pragma: export");
350 bool use_system_include =
false;
356 use_system_include =
true;
365 if (use_system_include) {
369 return left +
name + right;
380 "// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
381 "// source: $filename$\n"
385 "#include <algorithm>\n"
389 IncludeFile(
"net/proto2/io/public/coded_stream.h", printer);
391 IncludeFile(
"net/proto2/public/extension_set.h", printer);
392 IncludeFile(
"net/proto2/public/wire_format_lite.h", printer);
396 IncludeFile(
"net/proto2/io/public/zero_copy_stream_impl_lite.h", printer);
400 IncludeFile(
"net/proto2/public/descriptor.h", printer);
401 IncludeFile(
"net/proto2/public/generated_message_reflection.h", printer);
402 IncludeFile(
"net/proto2/public/reflection_ops.h", printer);
403 IncludeFile(
"net/proto2/public/wire_format.h", printer);
408 IncludeFile(
"net/proto2/public/generated_message_tctable_impl.h", printer);
421 format(
"#include \"$1$.proto.h\"\n", basename);
426 "#include \"third_party/absl/strings/internal/string_constant.h\"\n");
429 format(
"// @@protoc_insertion_point(includes)\n");
430 IncludeFile(
"net/proto2/public/port_def.inc", printer);
436 format(
"\nPROTOBUF_PRAGMA_INIT_SEG\n");
443 generator->GenerateConstexprConstructor(printer);
450 " : _instance(::$proto_ns$::internal::ConstantInitialized{}) {}\n"
457 generator->classname_);
462 format(
"PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT $1$ $2$;\n",
466 for (
int i = 0;
i < generator->descriptor_->field_count();
i++) {
471 "PROTOBUF_ATTRIBUTE_INIT_PRIORITY std::true_type "
472 "$1$::_init_inline_$2$_ = "
473 "($3$._instance.$2$_.Init(), std::true_type{});\n",
480 format(
"$1$* $2$ = &$3$;\n",
489 struct FileGenerator::CrossFileReferences {
499 CrossFileReferences*
refs) {
501 if (
msg ==
nullptr)
return;
505 refs->weak_default_instances.insert(
msg);
510 CrossFileReferences*
refs) {
517 for (
int i = 0;
i <
file->dependency_count();
i++) {
520 refs->weak_reflection_files.insert(
dep);
522 refs->strong_reflection_files.insert(
dep);
534 for (
auto instance : Sorted(
refs.weak_default_instances)) {
539 format(
"__attribute__((weak)) $1$* $2$ = nullptr;\n",
543 format(
"extern __attribute__((weak)) $1$ $2$;\n",
550 for (
auto file : Sorted(
refs.weak_reflection_files)) {
552 "extern __attribute__((weak)) const "
553 "::$proto_ns$::internal::DescriptorTable $1$;\n",
562 CrossFileReferences
refs;
581 "// @@protoc_insertion_point(namespace_scope)\n");
591 "// @@protoc_insertion_point(global_scope)\n");
626 CrossFileReferences
refs;
684 "// @@protoc_insertion_point(namespace_scope)\n");
696 "// @@protoc_insertion_point(global_scope)\n");
698 IncludeFile(
"net/proto2/public/port_undef.inc", printer);
705 format(
"static ::$proto_ns$::Metadata $file_level_metadata$[$1$];\n",
711 "const ::$proto_ns$::EnumDescriptor* "
712 "$file_level_enum_descriptors$[$1$];\n",
717 "constexpr ::$proto_ns$::EnumDescriptor const** "
718 "$file_level_enum_descriptors$ = nullptr;\n");
723 "const ::$proto_ns$::ServiceDescriptor* "
724 "$file_level_service_descriptors$[$1$];\n",
729 "constexpr ::$proto_ns$::ServiceDescriptor const** "
730 "$file_level_service_descriptors$ = nullptr;\n");
736 "const $uint32$ $tablename$::offsets[] "
737 "PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {\n");
739 std::vector<std::pair<size_t, size_t> > pairs;
747 "static const ::$proto_ns$::internal::MigrationSchema schemas[] "
748 "PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {\n");
762 "::$proto_ns$::Message const * const file_default_instances[] = {\n");
767 "reinterpret_cast<const "
768 "::$proto_ns$::Message*>(&$1$::_$2$_default_instance_),\n",
780 "const $uint32$ $tablename$::offsets[1] = {};\n"
781 "static constexpr ::$proto_ns$::internal::MigrationSchema* schemas = "
784 "static constexpr ::$proto_ns$::Message* const* "
785 "file_default_instances = nullptr;\n"
796 format(
"const char $1$[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =\n",
802 file_proto.SerializeToString(&
file_data);
809 static const int kBytesPerLine = 25;
812 for (
int j = 0;
j < kBytesPerLine &&
i <
file_data.size(); ++
i, ++
j) {
820 static const int kBytesPerLine = 40;
821 for (
int i = 0;
i <
file_data.size();
i += kBytesPerLine) {
831 CrossFileReferences
refs;
834 refs.strong_reflection_files.size() +
refs.weak_reflection_files.size();
839 "static const ::$proto_ns$::internal::DescriptorTable*const "
840 "$desc_table$_deps[$1$] = {\n",
843 for (
auto dep : Sorted(
refs.strong_reflection_files)) {
846 for (
auto dep : Sorted(
refs.weak_reflection_files)) {
859 "static ::$proto_ns$::internal::once_flag $desc_table$_once;\n"
860 "const ::$proto_ns$::internal::DescriptorTable $desc_table$ = {\n"
861 " false, $1$, $2$, $3$, \"$filename$\", \n"
862 " &$desc_table$_once, $4$, $5$, $6$,\n"
863 " schemas, file_default_instances, $tablename$::offsets,\n"
864 " $7$, $file_level_enum_descriptors$, "
865 "$file_level_service_descriptors$,\n"
878 "PROTOBUF_ATTRIBUTE_WEAK const ::$proto_ns$::internal::DescriptorTable* "
879 "$desc_table$_getter() {\n"
880 " return &$desc_table$;\n"
883 eager ?
"true" :
"false",
file_data.size(), protodef_name,
884 num_deps == 0 ?
"nullptr" :
variables_[
"desc_table"] +
"_deps", num_deps,
893 if (
file_->
name() !=
"net/proto2/proto/descriptor.proto") {
895 "// Force running AddDescriptors() at dynamic initialization time.\n"
896 "PROTOBUF_ATTRIBUTE_INIT_PRIORITY "
897 "static ::$proto_ns$::internal::AddDescriptorsRunner "
898 "$1$(&$desc_table$);\n",
909 "PROTOBUF_CONSTEXPR_VAR ::$proto_ns$::internal::ParseTableField\n"
910 " const $tablename$::entries[] "
911 "PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {\n");
914 std::vector<size_t> entries;
918 entries.push_back(
value);
924 format(
"{0, 0, 0, ::$proto_ns$::internal::kInvalidMask, 0, 0},\n");
931 "PROTOBUF_CONSTEXPR_VAR "
932 "::$proto_ns$::internal::AuxiliaryParseTableField\n"
933 " const $tablename$::aux[] "
934 "PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {\n");
937 std::vector<size_t> aux_entries;
941 aux_entries.push_back(
value);
946 format(
"::$proto_ns$::internal::AuxiliaryParseTableField(),\n");
952 "PROTOBUF_CONSTEXPR_VAR ::$proto_ns$::internal::ParseTable const\n"
953 " $tablename$::schema[] "
954 "PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {\n");
958 size_t aux_offset = 0;
962 aux_offset += aux_entries[
i];
966 format(
"{ nullptr, nullptr, 0, -1, -1, false },\n");
977 "const ::$proto_ns$::internal::FieldMetadata "
978 "$tablename$::field_metadata[] "
981 std::vector<int> field_metadata_offsets;
984 field_metadata_offsets.push_back(
idx);
987 field_metadata_offsets.push_back(
idx);
991 "const ::$proto_ns$::internal::SerializationTable "
992 "$tablename$::serialization_table[] = {\n");
997 std::vector<const Descriptor*> calculated_order =
1002 format(
"{$1$, $tablename$::field_metadata + $2$},\n",
1003 field_metadata_offsets[i + 1] - field_metadata_offsets[i],
1004 field_metadata_offsets[i]);
1013 class FileGenerator::ForwardDeclarations {
1019 for (
const auto& p :
enums_) {
1023 "enum ${1$$2$$}$ : int;\n"
1024 "bool $2$_IsValid(int value);\n",
1025 enum_desc, enumname);
1031 "class ${1$$2$$}$;\n"
1033 "$dllexport_decl $extern $3$ $4$;\n",
1043 "template<> $dllexport_decl $"
1044 "$1$* Arena::CreateMaybeMessage<$1$>(Arena*);\n",
1050 std::map<std::string, const Descriptor*>
classes_;
1051 std::map<std::string, const EnumDescriptor*>
enums_;
1055 std::unordered_set<const FileDescriptor*>* fd_set) {
1064 std::vector<const Descriptor*>
classes;
1065 std::vector<const EnumDescriptor*> enums;
1071 std::vector<const FieldDescriptor*>
fields;
1073 for (
int i = 0;
i <
fields.size();
i++) {
1083 std::unordered_set<const FileDescriptor*> public_set;
1086 std::map<std::string, ForwardDeclarations> decls;
1087 for (
int i = 0;
i <
classes.size();
i++) {
1089 if (d && !public_set.count(d->file()))
1092 for (
int i = 0;
i < enums.size();
i++) {
1094 if (d && !public_set.count(d->file()))
1100 for (
const auto&
pair : decls) {
1105 format(
"PROTOBUF_NAMESPACE_OPEN\n");
1106 for (
const auto&
pair : decls) {
1109 format(
"PROTOBUF_NAMESPACE_CLOSE\n");
1116 "// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
1117 "// source: $filename$\n"
1122 "#include <limits>\n"
1123 "#include <string>\n",
1127 format(
"#include <type_traits>\n");
1134 format(
"#endif // $GOOGLE_PROTOBUF$_INCLUDED_$1$\n",
1141 IncludeFile(
"net/proto2/public/implicit_weak_message.h", printer);
1145 IncludeFile(
"net/proto2/public/weak_field_map.h", printer);
1149 IncludeFile(
"net/proto2/public/lazy_field.h", printer);
1152 IncludeFile(
"net/proto2/public/wire_format_verify.h", printer);
1158 IncludeFile(
"net/proto2/public/port_def.inc", printer);
1160 "#if PROTOBUF_VERSION < $1$\n"
1161 "#error This file was generated by a newer version of protoc which is\n"
1162 "#error incompatible with your Protocol Buffer headers. Please update\n"
1163 "#error your headers.\n"
1165 "#if $2$ < PROTOBUF_MIN_PROTOC_VERSION\n"
1166 "#error This file was generated by an older version of protoc which "
1168 "#error incompatible with your Protocol Buffer headers. Please\n"
1169 "#error regenerate this file with a newer version of protoc.\n"
1172 PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC,
1174 IncludeFile(
"net/proto2/public/port_undef.inc", printer);
1178 IncludeFile(
"net/proto2/io/public/coded_stream.h", printer);
1179 IncludeFile(
"net/proto2/public/arena.h", printer);
1180 IncludeFile(
"net/proto2/public/arenastring.h", printer);
1183 IncludeFile(
"net/proto2/public/inlined_string_field.h", printer);
1186 IncludeFile(
"net/proto2/public/generated_message_bases.h", printer);
1188 IncludeFile(
"net/proto2/public/generated_message_table_driven.h", printer);
1191 IncludeFile(
"net/proto2/public/generated_message_tctable_decl.h", printer);
1193 IncludeFile(
"net/proto2/public/generated_message_util.h", printer);
1194 IncludeFile(
"net/proto2/public/metadata_lite.h", printer);
1197 IncludeFile(
"net/proto2/public/generated_message_reflection.h", printer);
1202 IncludeFile(
"net/proto2/public/message.h", printer);
1204 IncludeFile(
"net/proto2/public/message_lite.h", printer);
1220 IncludeFile(
"net/proto2/public/string_piece_field_support.h", printer);
1223 format(
"#include \"third_party/absl/strings/cord.h\"\n");
1229 IncludeFile(
"net/proto2/public/map_entry.h", printer);
1230 IncludeFile(
"net/proto2/public/map_field_inl.h", printer);
1232 IncludeFile(
"net/proto2/public/map_entry_lite.h", printer);
1233 IncludeFile(
"net/proto2/public/map_field_lite.h", printer);
1239 IncludeFile(
"net/proto2/public/generated_enum_reflection.h", printer);
1241 IncludeFile(
"net/proto2/public/generated_enum_util.h", printer);
1246 IncludeFile(
"net/proto2/public/service.h", printer);
1250 IncludeFile(
"net/proto2/public/unknown_field_set.h", printer);
1261 format.Set(
"info_path", info_path);
1264 "#pragma $pragma$ \"$info_path$\"\n"
1265 "#endif // $guard$\n");
1298 "// Internal implementation detail -- do not use these members.\n"
1299 "struct $dllexport_decl $$tablename$ {\n"
1302 " static const ::$proto_ns$::internal::ParseTableField entries[]\n"
1303 " PROTOBUF_SECTION_VARIABLE(protodesc_cold);\n"
1304 " static const ::$proto_ns$::internal::AuxiliaryParseTableField aux[]\n"
1305 " PROTOBUF_SECTION_VARIABLE(protodesc_cold);\n"
1306 " static const ::$proto_ns$::internal::ParseTable schema[$1$]\n"
1307 " PROTOBUF_SECTION_VARIABLE(protodesc_cold);\n"
1308 " static const ::$proto_ns$::internal::FieldMetadata field_metadata[];\n"
1309 " static const ::$proto_ns$::internal::SerializationTable "
1310 "serialization_table[];\n"
1311 " static const $uint32$ offsets[];\n"
1316 "$dllexport_decl $extern const ::$proto_ns$::internal::DescriptorTable "
1364 if (extension_generator->IsScoped())
continue;
1365 extension_generator->GenerateDeclaration(printer);
1375 " #pragma GCC diagnostic push\n"
1376 " #pragma GCC diagnostic ignored \"-Wstrict-aliasing\"\n"
1377 "#endif // __GNUC__\n");
1388 " #pragma GCC diagnostic pop\n"
1389 "#endif // __GNUC__\n");
std::map< std::string, const EnumDescriptor * > enums_
bool IsBootstrapProto(const Options &options, const FileDescriptor *file)
MessageSCCAnalyzer scc_analyzer_
bool HasGeneratedMethods(const FileDescriptor *file, const Options &options)
const Descriptor::ReservedRange value
std::string DefaultInstancePtr(const Descriptor *descriptor, const Options &options)
std::string FieldName(const FieldDescriptor *field)
std::string ProtobufNamespace(const Options &options)
void GenerateSource(io::Printer *printer)
void GenerateHeader(io::Printer *printer)
std::string StripProto(const std::string &filename)
void GenerateServiceDefinitions(io::Printer *printer)
FileDescriptorProto * file_
std::vector< std::unique_ptr< MessageGenerator > > message_generators_
static bool HasEnumDefinitions(const Descriptor *message_type)
static bool HasLazyFields(const Descriptor *descriptor, const Options &options)
bool profile_driven_inline_string
#define GOOGLE_CHECK_EQ(A, B)
void DoIncludeFile(const std::string &google3_name, bool do_export, io::Printer *printer)
void GenerateDependencyIncludes(io::Printer *printer)
void GenerateProto2NamespaceEnumSpecializations(io::Printer *printer)
void IncludeFile(const std::string &google3_name, io::Printer *printer)
std::vector< std::unique_ptr< ExtensionGenerator > > extension_generators_
std::vector< std::unique_ptr< ServiceGenerator > > service_generators_
string CEscape(const string &src)
GRPC_CUSTOM_PRINTER Printer
void GenerateExtensionIdentifiers(io::Printer *printer)
RefCountedPtr< grpc_tls_certificate_provider > instance
std::string QualifiedClassName(const Descriptor *d, const Options &options)
std::unordered_set< const Descriptor * > weak_default_instances
bool IsStringInlined(const FieldDescriptor *descriptor, const Options &options)
void AddEnum(const EnumDescriptor *d)
void GenerateTables(io::Printer *printer)
string UniqueName(const std::string &name, const std::string &filename, const Options &options)
void GenerateSourceDefaultInstance(int idx, io::Printer *printer)
#define T(upbtypeconst, upbtype, ctype, default_value)
static bool HasMapFields(const Descriptor *descriptor)
void FlattenMessagesInFile(const FileDescriptor *file, std::vector< const Descriptor * > *result)
bool IsWeak(const FieldDescriptor *field, const Options &options)
void GeneratePBHeader(io::Printer *printer, const std::string &info_path)
bool HasWeakFields(const Descriptor *descriptor, const Options &options)
const FileDescriptor * file_
std::string FileDllExport(const FileDescriptor *file, const Options &options)
void AddMessage(const Descriptor *d)
static bool HasStringPieceFields(const Descriptor *descriptor, const Options &options)
std::vector< CordRep * > refs
bool UsingImplicitWeakFields(const FileDescriptor *file, const Options &options)
bool HasSimpleBaseClasses(const FileDescriptor *file, const Options &options)
std::unordered_set< const FileDescriptor * > weak_reflection_files
void GenerateMessageDefinitions(io::Printer *printer)
void Print(const Formatter &format, const Options &options) const
void GenerateMetadataPragma(io::Printer *printer, const std::string &info_path)
void GenerateGlobalStateFunctionDeclarations(io::Printer *printer)
static void PublicImportDFS(const FileDescriptor *fd, std::unordered_set< const FileDescriptor * > *fd_set)
FileGenerator(const FileDescriptor *file, const Options &options)
bool lite_implicit_weak_fields
bool IsImplicitWeakField(const FieldDescriptor *field, const Options &options, MessageSCCAnalyzer *scc_analyzer)
int public_dependency_count() const
enum google::protobuf::compiler::cpp::Options::@466 tctable_mode
void GenerateBottomHeaderGuard(io::Printer *printer, bool pb_h)
std::string CreateHeaderInclude(const std::string &basename, const FileDescriptor *file)
std::string DefaultInstanceType(const Descriptor *descriptor, const Options &options)
void GenerateInlineFunctionDefinitions(io::Printer *printer)
std::string DescriptorTableName(const FileDescriptor *file, const Options &options)
bool UseUnknownFieldSet(const FileDescriptor *file, const Options &options)
bool IsDepWeak(const FileDescriptor *dep) const
bool table_driven_serialization
void SetCommonVars(const Options &options, std::map< std::string, std::string > *variables)
bool GetBootstrapBasename(const Options &options, const std::string &basename, std::string *bootstrap_basename)
std::string IncludeGuard(const FileDescriptor *file, bool pb_h, const Options &options)
void GenerateTopHeaderGuard(io::Printer *printer, bool pb_h)
bool HasDescriptorMethods(const FileDescriptor *file, const Options &options)
void ListAllFields(const Descriptor *d, std::vector< const FieldDescriptor * > *fields)
void CopyTo(FileDescriptorProto *proto) const
static bool HasCordFields(const Descriptor *descriptor, const Options &options)
const char kThickSeparator[]
std::string Namespace(const std::string &package)
const std::string & name() const
bool IsWellKnownMessage(const FileDescriptor *file)
const FieldDescriptor * field
std::string annotation_guard_name
std::vector< std::unique_ptr< EnumGenerator > > enum_generators_
void StringReplace(const string &s, const string &oldsub, const string &newsub, bool replace_all, string *res)
DebugStringOptions options_
bool HasGenericServices(const FileDescriptor *file, const Options &options)
static const struct nv classes[]
void GenerateMacroUndefs(io::Printer *printer)
std::string DefaultInstanceName(const Descriptor *descriptor, const Options &options)
void GetCrossFileReferencesForField(const FieldDescriptor *field, CrossFileReferences *refs)
const FileDescriptor * dependency(int index) const
int service_count() const
std::unordered_set< const FileDescriptor * > strong_reflection_files
static bool HasExtensionsOrExtendableMessage(const Descriptor *descriptor)
void GenerateGlobalSource(io::Printer *printer)
void GenerateProtoHeader(io::Printer *printer, const std::string &info_path)
std::string EscapeTrigraphs(const std::string &to_escape)
#define GOOGLE_ARRAYSIZE(a)
static const char prefix[]
void PrintTopLevelDecl(const Formatter &format, const Options &options) const
std::map< std::string, std::string > variables_
std::string ClassName(const Descriptor *descriptor)
static bool HasRepeatedFields(const Descriptor *descriptor)
void GenerateReflectionInitializationCode(io::Printer *printer)
#define GOOGLE_CHECK(EXPRESSION)
void GenerateSourceForMessage(int idx, io::Printer *printer)
void ForEachField(const Descriptor *d, T &&func)
std::set< const FileDescriptor * > weak_deps_
void ListAllTypesForServices(const FileDescriptor *fd, std::vector< const Descriptor * > *types)
std::string annotation_pragma_name
void GenerateForwardDeclarations(io::Printer *printer)
bool table_driven_parsing
void GenerateEnumDefinitions(io::Printer *printer)
const char kThinSeparator[]
std::map< std::string, const Descriptor * > classes_
void GenerateSourceForExtension(int idx, io::Printer *printer)
void GenerateSourceIncludes(io::Printer *printer)
bool ShouldVerify(const Descriptor *descriptor, const Options &options, MessageSCCAnalyzer *scc_analyzer)
const FileDescriptor * public_dependency(int index) const
void GenerateInternalForwardDeclarations(const CrossFileReferences &refs, io::Printer *printer)
static const char descriptor[1336]
std::pair< std::string, std::string > pair
void GetCrossFileReferencesForFile(const FileDescriptor *file, CrossFileReferences *refs)
void GenerateLibraryIncludes(io::Printer *printer)
std::string runtime_include_base
int dependency_count() const
void IncludeFileAndExport(const std::string &google3_name, io::Printer *printer)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:05