Go to the documentation of this file.
35 #include <google/protobuf/compiler/cpp/cpp_extension.h>
37 #include <google/protobuf/compiler/cpp/cpp_helpers.h>
38 #include <google/protobuf/descriptor.pb.h>
39 #include <google/protobuf/io/printer.h>
40 #include <google/protobuf/stubs/strutil.h>
110 qualifier =
"extern";
115 qualifier =
"static";
119 "static const int $constant_name$ = $number$;\n"
120 "$1$ ::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n"
121 " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n"
133 "net/proto2/proto/descriptor.proto") {
147 format(
"const std::string $1$($2$);\n", default_str,
161 "#if !defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)\n"
162 "const int $scope$$constant_name$;\n"
167 "PROTOBUF_ATTRIBUTE_INIT_PRIORITY "
168 "::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n"
169 " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n"
170 " $scoped_name$($constant_name$, $1$);\n",
178 "PROTOBUF_ATTRIBUTE_INIT_PRIORITY "
179 "::$proto_ns$::internal::RegisterExtensionVerify< $extendee$,\n"
180 " $1$, $number$> $2$_$name$_register;\n",
std::string FieldConstantName(const FieldDescriptor *field)
const Descriptor * message_type
const Descriptor * containing_type() const
GRPC_CUSTOM_PRINTER Printer
std::string QualifiedClassName(const Descriptor *d, const Options &options)
const Descriptor * extension_scope
string StrCat(const AlphaNum &a, const AlphaNum &b)
std::string ExtensionName(const FieldDescriptor *d)
MessageSCCAnalyzer * scc_analyzer_
std::map< std::string, std::string > variables_
bool lite_implicit_weak_fields
std::string ResolveKeyword(const string &name)
std::string FieldMessageTypeName(const FieldDescriptor *field, const Options &options)
ExtensionGenerator(const FieldDescriptor *descriptor, const Options &options)
std::string DefaultValue(const FieldDescriptor *field)
void SetCommonVars(const Options &options, std::map< std::string, std::string > *variables)
const EnumDescriptor * enum_type
const FieldDescriptor * descriptor_
const std::string & name() const
void StringReplace(const string &s, const string &oldsub, const string &newsub, bool replace_all, string *res)
DebugStringOptions options_
const std::string & name() const
void GenerateDefinition(io::Printer *printer)
const FileDescriptor * file() const
std::string ClassName(const Descriptor *descriptor)
const char * PrimitiveTypeName(FieldDescriptor::CppType type)
std::string dllexport_decl
void GenerateDeclaration(io::Printer *printer) const
bool ShouldVerify(const Descriptor *descriptor, const Options &options, MessageSCCAnalyzer *scc_analyzer)
static const char descriptor[1336]
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:04