Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
index 6edb5e7634f9647277c114cb40f3475b1a0e7439..e9d50a1dcd1c5893fa66b79d3e1a08ecffaf86a1 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
@@ -20,168 +20,140 @@
namespace google {
namespace protobuf {
namespace compiler {
-class VersionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Version> {};
-VersionDefaultTypeInternal _Version_default_instance_;
-class CodeGeneratorRequestDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest> {};
-CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
-class CodeGeneratorResponse_FileDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse_File> {};
-CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
-class CodeGeneratorResponseDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse> {};
-CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance_;
namespace {
-::google::protobuf::Metadata file_level_metadata[4];
+const ::google::protobuf::Descriptor* CodeGeneratorRequest_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ CodeGeneratorRequest_reflection_ = NULL;
+const ::google::protobuf::Descriptor* CodeGeneratorResponse_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ CodeGeneratorResponse_reflection_ = NULL;
+const ::google::protobuf::Descriptor* CodeGeneratorResponse_File_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ CodeGeneratorResponse_File_reflection_ = NULL;
} // namespace
-const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto() GOOGLE_ATTRIBUTE_COLD;
-const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
- static const ::google::protobuf::uint32 offsets[] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, major_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, minor_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, patch_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, suffix_),
- 1,
- 2,
- 3,
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
+void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
+ protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ const ::google::protobuf::FileDescriptor* file =
+ ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+ "google/protobuf/compiler/plugin.proto");
+ GOOGLE_CHECK(file != NULL);
+ CodeGeneratorRequest_descriptor_ = file->message_type(0);
+ static const int CodeGeneratorRequest_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, compiler_version_),
- 2,
- 0,
- 3,
- 1,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
+ };
+ CodeGeneratorRequest_reflection_ =
+ ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
+ CodeGeneratorRequest_descriptor_,
+ CodeGeneratorRequest::default_instance_,
+ CodeGeneratorRequest_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]),
+ -1,
+ -1,
+ sizeof(CodeGeneratorRequest),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _internal_metadata_),
+ -1);
+ CodeGeneratorResponse_descriptor_ = file->message_type(1);
+ static const int CodeGeneratorResponse_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_),
+ };
+ CodeGeneratorResponse_reflection_ =
+ ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
+ CodeGeneratorResponse_descriptor_,
+ CodeGeneratorResponse::default_instance_,
+ CodeGeneratorResponse_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]),
+ -1,
+ -1,
+ sizeof(CodeGeneratorResponse),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _internal_metadata_),
+ -1);
+ CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0);
+ static const int CodeGeneratorResponse_File_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, insertion_point_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, content_),
- 0,
- 1,
- 2,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_),
- 0,
- 1,
};
- return offsets;
+ CodeGeneratorResponse_File_reflection_ =
+ ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
+ CodeGeneratorResponse_File_descriptor_,
+ CodeGeneratorResponse_File::default_instance_,
+ CodeGeneratorResponse_File_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]),
+ -1,
+ -1,
+ sizeof(CodeGeneratorResponse_File),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _internal_metadata_),
+ -1);
}
-static const ::google::protobuf::internal::MigrationSchema schemas[] = {
- { 0, 8, sizeof(Version)},
- { 12, 20, sizeof(CodeGeneratorRequest)},
- { 24, 31, sizeof(CodeGeneratorResponse_File)},
- { 34, 40, sizeof(CodeGeneratorResponse)},
-};
-
-static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = {
- {reinterpret_cast<const ::google::protobuf::Message*>(&_Version_default_instance_), NULL},
- {reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorRequest_default_instance_), NULL},
- {reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorResponse_File_default_instance_), NULL},
- {reinterpret_cast<const ::google::protobuf::Message*>(&_CodeGeneratorResponse_default_instance_), NULL},
-};
-
namespace {
-void protobuf_AssignDescriptors() {
- protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, protobuf_Offsets_google_2fprotobuf_2fcompiler_2fplugin_2eproto(), factory,
- file_level_metadata, NULL, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+ ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+ &protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
}
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ CodeGeneratorRequest_descriptor_, &CodeGeneratorRequest::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ CodeGeneratorResponse_descriptor_, &CodeGeneratorResponse::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ CodeGeneratorResponse_File_descriptor_, &CodeGeneratorResponse_File::default_instance());
}
} // namespace
void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
- _Version_default_instance_.Shutdown();
- delete file_level_metadata[0].reflection;
- _CodeGeneratorRequest_default_instance_.Shutdown();
- delete file_level_metadata[1].reflection;
- _CodeGeneratorResponse_File_default_instance_.Shutdown();
- delete file_level_metadata[2].reflection;
- _CodeGeneratorResponse_default_instance_.Shutdown();
- delete file_level_metadata[3].reflection;
+ delete CodeGeneratorRequest::default_instance_;
+ delete CodeGeneratorRequest_reflection_;
+ delete CodeGeneratorResponse::default_instance_;
+ delete CodeGeneratorResponse_reflection_;
+ delete CodeGeneratorResponse_File::default_instance_;
+ delete CodeGeneratorResponse_File_reflection_;
}
-void protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl() {
+void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
- ::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fdescriptor_2eproto();
- ::google::protobuf::internal::InitProtobufDefaults();
- _Version_default_instance_.DefaultConstruct();
- _CodeGeneratorRequest_default_instance_.DefaultConstruct();
- _CodeGeneratorResponse_File_default_instance_.DefaultConstruct();
- _CodeGeneratorResponse_default_instance_.DefaultConstruct();
- _CodeGeneratorRequest_default_instance_.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>(
- ::google::protobuf::compiler::Version::internal_default_instance());
-}
-
-void protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl);
-}
-void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl() {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- static const char descriptor[] = {
- "\n%google/protobuf/compiler/plugin.proto\022"
- "\030google.protobuf.compiler\032 google/protob"
- "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030"
- "\001 \001(\005\022\r\n\005minor\030\002 \001(\005\022\r\n\005patch\030\003 \001(\005\022\016\n\006s"
- "uffix\030\004 \001(\t\"\272\001\n\024CodeGeneratorRequest\022\030\n\020"
- "file_to_generate\030\001 \003(\t\022\021\n\tparameter\030\002 \001("
- "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf."
- "FileDescriptorProto\022;\n\020compiler_version\030"
- "\003 \001(\0132!.google.protobuf.compiler.Version"
- "\"\252\001\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001("
- "\t\022B\n\004file\030\017 \003(\01324.google.protobuf.compil"
- "er.CodeGeneratorResponse.File\032>\n\004File\022\014\n"
- "\004name\030\001 \001(\t\022\027\n\017insertion_point\030\002 \001(\t\022\017\n\007"
- "content\030\017 \001(\tB7\n\034com.google.protobuf.com"
- "pilerB\014PluginProtosZ\tplugin_go"
- };
+ ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 590);
+ "\n%google/protobuf/compiler/plugin.proto\022"
+ "\030google.protobuf.compiler\032 google/protob"
+ "uf/descriptor.proto\"}\n\024CodeGeneratorRequ"
+ "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet"
+ "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr"
+ "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener"
+ "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003("
+ "\01324.google.protobuf.compiler.CodeGenerat"
+ "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n"
+ "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\tB"
+ "7\n\034com.google.protobuf.compilerB\014PluginP"
+ "rotosZ\tplugin_go", 456);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes);
- ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+ CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest();
+ CodeGeneratorResponse::default_instance_ = new CodeGeneratorResponse();
+ CodeGeneratorResponse_File::default_instance_ = new CodeGeneratorResponse_File();
+ CodeGeneratorRequest::default_instance_->InitAsDefaultInstance();
+ CodeGeneratorResponse::default_instance_->InitAsDefaultInstance();
+ CodeGeneratorResponse_File::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
}
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once_);
-void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once_,
- &protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto_impl);
-}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
@@ -189,508 +161,15 @@ struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto
}
} static_descriptor_initializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto_;
-// ===================================================================
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Version::kMajorFieldNumber;
-const int Version::kMinorFieldNumber;
-const int Version::kPatchFieldNumber;
-const int Version::kSuffixFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Version::Version()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version)
-}
-Version::Version(const Version& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_suffix()) {
- suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
- }
- ::memcpy(&major_, &from.major_,
- reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_) + sizeof(patch_));
- // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
-}
-
-void Version::SharedCtor() {
- _cached_size_ = 0;
- suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&major_, 0, reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_) + sizeof(patch_));
-}
-
-Version::~Version() {
- // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
- SharedDtor();
-}
-
-void Version::SharedDtor() {
- suffix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void Version::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Version::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return file_level_metadata[0].descriptor;
-}
-
-const Version& Version::default_instance() {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- return *internal_default_instance();
-}
-
-Version* Version::New(::google::protobuf::Arena* arena) const {
- Version* n = new Version;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void Version::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
- if (has_suffix()) {
- GOOGLE_DCHECK(!suffix_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*suffix_.UnsafeRawStringPointer())->clear();
- }
- if (_has_bits_[0 / 32] & 14u) {
- ::memset(&major_, 0, reinterpret_cast<char*>(&patch_) -
- reinterpret_cast<char*>(&major_) + sizeof(patch_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
-}
-
-bool Version::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional int32 major = 1;
- case 1: {
- if (tag == 8u) {
- set_has_major();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &major_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // optional int32 minor = 2;
- case 2: {
- if (tag == 16u) {
- set_has_minor();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &minor_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // optional int32 patch = 3;
- case 3: {
- if (tag == 24u) {
- set_has_patch();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &patch_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // optional string suffix = 4;
- case 4: {
- if (tag == 34u) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_suffix()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->suffix().data(), this->suffix().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "google.protobuf.compiler.Version.suffix");
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.compiler.Version)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.Version)
- return false;
-#undef DO_
-}
-
-void Version::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version)
- // optional int32 major = 1;
- if (has_major()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->major(), output);
- }
-
- // optional int32 minor = 2;
- if (has_minor()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->minor(), output);
- }
-
- // optional int32 patch = 3;
- if (has_patch()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->patch(), output);
- }
-
- // optional string suffix = 4;
- if (has_suffix()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->suffix().data(), this->suffix().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "google.protobuf.compiler.Version.suffix");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->suffix(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version)
-}
-
-::google::protobuf::uint8* Version::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
- // optional int32 major = 1;
- if (has_major()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target);
- }
-
- // optional int32 minor = 2;
- if (has_minor()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target);
- }
-
- // optional int32 patch = 3;
- if (has_patch()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target);
- }
-
- // optional string suffix = 4;
- if (has_suffix()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->suffix().data(), this->suffix().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "google.protobuf.compiler.Version.suffix");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->suffix(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version)
- return target;
-}
-
-size_t Version::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- if (_has_bits_[0 / 32] & 15u) {
- // optional string suffix = 4;
- if (has_suffix()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->suffix());
- }
-
- // optional int32 major = 1;
- if (has_major()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->major());
- }
-
- // optional int32 minor = 2;
- if (has_minor()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->minor());
- }
-
- // optional int32 patch = 3;
- if (has_patch()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->patch());
- }
-
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Version::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.Version)
- GOOGLE_DCHECK_NE(&from, this);
- const Version* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Version>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.Version)
- MergeFrom(*source);
- }
-}
-
-void Version::MergeFrom(const Version& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from._has_bits_[0 / 32] & 15u) {
- if (from.has_suffix()) {
- set_has_suffix();
- suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
- }
- if (from.has_major()) {
- set_major(from.major());
- }
- if (from.has_minor()) {
- set_minor(from.minor());
- }
- if (from.has_patch()) {
- set_patch(from.patch());
- }
- }
-}
-
-void Version::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.Version)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Version::CopyFrom(const Version& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.Version)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Version::IsInitialized() const {
- return true;
-}
-
-void Version::Swap(Version* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void Version::InternalSwap(Version* other) {
- suffix_.Swap(&other->suffix_);
- std::swap(major_, other->major_);
- std::swap(minor_, other->minor_);
- std::swap(patch_, other->patch_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Version::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- return file_level_metadata[0];
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// Version
-
-// optional int32 major = 1;
-bool Version::has_major() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-void Version::set_has_major() {
- _has_bits_[0] |= 0x00000002u;
-}
-void Version::clear_has_major() {
- _has_bits_[0] &= ~0x00000002u;
-}
-void Version::clear_major() {
- major_ = 0;
- clear_has_major();
-}
-::google::protobuf::int32 Version::major() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major)
- return major_;
-}
-void Version::set_major(::google::protobuf::int32 value) {
- set_has_major();
- major_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major)
-}
-
-// optional int32 minor = 2;
-bool Version::has_minor() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
-}
-void Version::set_has_minor() {
- _has_bits_[0] |= 0x00000004u;
-}
-void Version::clear_has_minor() {
- _has_bits_[0] &= ~0x00000004u;
-}
-void Version::clear_minor() {
- minor_ = 0;
- clear_has_minor();
-}
-::google::protobuf::int32 Version::minor() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor)
- return minor_;
-}
-void Version::set_minor(::google::protobuf::int32 value) {
- set_has_minor();
- minor_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor)
-}
+namespace {
-// optional int32 patch = 3;
-bool Version::has_patch() const {
- return (_has_bits_[0] & 0x00000008u) != 0;
-}
-void Version::set_has_patch() {
- _has_bits_[0] |= 0x00000008u;
-}
-void Version::clear_has_patch() {
- _has_bits_[0] &= ~0x00000008u;
-}
-void Version::clear_patch() {
- patch_ = 0;
- clear_has_patch();
-}
-::google::protobuf::int32 Version::patch() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch)
- return patch_;
-}
-void Version::set_patch(::google::protobuf::int32 value) {
- set_has_patch();
- patch_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch)
+static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
+static void MergeFromFail(int line) {
+ GOOGLE_CHECK(false) << __FILE__ << ":" << line;
}
-// optional string suffix = 4;
-bool Version::has_suffix() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-void Version::set_has_suffix() {
- _has_bits_[0] |= 0x00000001u;
-}
-void Version::clear_has_suffix() {
- _has_bits_[0] &= ~0x00000001u;
-}
-void Version::clear_suffix() {
- suffix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_suffix();
-}
-const ::std::string& Version::suffix() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix)
- return suffix_.GetNoArena();
-}
-void Version::set_suffix(const ::std::string& value) {
- set_has_suffix();
- suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
-}
-#if LANG_CXX11
-void Version::set_suffix(::std::string&& value) {
- set_has_suffix();
- suffix_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix)
-}
-#endif
-void Version::set_suffix(const char* value) {
- set_has_suffix();
- suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix)
-}
-void Version::set_suffix(const char* value, size_t size) {
- set_has_suffix();
- suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.Version.suffix)
-}
-::std::string* Version::mutable_suffix() {
- set_has_suffix();
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix)
- return suffix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* Version::release_suffix() {
- // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix)
- clear_has_suffix();
- return suffix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void Version::set_allocated_suffix(::std::string* suffix) {
- if (suffix != NULL) {
- set_has_suffix();
- } else {
- clear_has_suffix();
- }
- suffix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), suffix);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix)
-}
+} // namespace
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
@@ -698,41 +177,30 @@ void Version::set_allocated_suffix(::std::string* suffix) {
const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
const int CodeGeneratorRequest::kParameterFieldNumber;
const int CodeGeneratorRequest::kProtoFileFieldNumber;
-const int CodeGeneratorRequest::kCompilerVersionFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
CodeGeneratorRequest::CodeGeneratorRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- }
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
+
+void CodeGeneratorRequest::InitAsDefaultInstance() {
+}
+
CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- _cached_size_(0),
- file_to_generate_(from.file_to_generate_),
- proto_file_(from.proto_file_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_parameter()) {
- parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
- }
- if (from.has_compiler_version()) {
- compiler_version_ = new ::google::protobuf::compiler::Version(*from.compiler_version_);
- } else {
- compiler_version_ = NULL;
- }
+ _internal_metadata_(NULL) {
+ SharedCtor();
+ MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
void CodeGeneratorRequest::SharedCtor() {
+ ::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- compiler_version_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CodeGeneratorRequest::~CodeGeneratorRequest() {
@@ -742,8 +210,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
void CodeGeneratorRequest::SharedDtor() {
parameter_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) {
- delete compiler_version_;
+ if (this != default_instance_) {
}
}
@@ -754,14 +221,16 @@ void CodeGeneratorRequest::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[1].descriptor;
+ return CodeGeneratorRequest_descriptor_;
}
const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- return *internal_default_instance();
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ return *default_instance_;
}
+CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL;
+
CodeGeneratorRequest* CodeGeneratorRequest::New(::google::protobuf::Arena* arena) const {
CodeGeneratorRequest* n = new CodeGeneratorRequest;
if (arena != NULL) {
@@ -772,20 +241,15 @@ CodeGeneratorRequest* CodeGeneratorRequest::New(::google::protobuf::Arena* arena
void CodeGeneratorRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
+ if (has_parameter()) {
+ parameter_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
file_to_generate_.Clear();
proto_file_.Clear();
- if (_has_bits_[0 / 32] & 3u) {
- if (has_parameter()) {
- GOOGLE_DCHECK(!parameter_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*parameter_.UnsafeRawStringPointer())->clear();
- }
- if (has_compiler_version()) {
- GOOGLE_DCHECK(compiler_version_ != NULL);
- compiler_version_->::google::protobuf::compiler::Version::Clear();
- }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
}
- _has_bits_.Clear();
- _internal_metadata_.Clear();
}
bool CodeGeneratorRequest::MergePartialFromCodedStream(
@@ -794,13 +258,14 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated string file_to_generate = 1;
case 1: {
- if (tag == 10u) {
+ if (tag == 10) {
+ parse_file_to_generate:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_file_to_generate()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -811,12 +276,15 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(10)) goto parse_file_to_generate;
+ if (input->ExpectTag(18)) goto parse_parameter;
break;
}
// optional string parameter = 2;
case 2: {
- if (tag == 18u) {
+ if (tag == 18) {
+ parse_parameter:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_parameter()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -826,30 +294,24 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
- break;
- }
-
- // optional .google.protobuf.compiler.Version compiler_version = 3;
- case 3: {
- if (tag == 26u) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_compiler_version()));
- } else {
- goto handle_unusual;
- }
+ if (input->ExpectTag(122)) goto parse_proto_file;
break;
}
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
case 15: {
- if (tag == 122u) {
+ if (tag == 122) {
+ parse_proto_file:
DO_(input->IncrementRecursionDepth());
+ parse_loop_proto_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_proto_file()));
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(122)) goto parse_loop_proto_file;
input->UnsafeDecrementRecursionDepth();
+ if (input->ExpectAtEnd()) goto success;
break;
}
@@ -898,12 +360,6 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
2, this->parameter(), output);
}
- // optional .google.protobuf.compiler.Version compiler_version = 3;
- if (has_compiler_version()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, *this->compiler_version_, output);
- }
-
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
for (unsigned int i = 0, n = this->proto_file_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
@@ -917,9 +373,8 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest)
}
-::google::protobuf::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+::google::protobuf::uint8* CodeGeneratorRequest::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
// repeated string file_to_generate = 1;
for (int i = 0; i < this->file_to_generate_size(); i++) {
@@ -942,18 +397,11 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
2, this->parameter(), target);
}
- // optional .google.protobuf.compiler.Version compiler_version = 3;
- if (has_compiler_version()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 3, *this->compiler_version_, false, target);
- }
-
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
for (unsigned int i = 0, n = this->proto_file_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 15, this->proto_file(i), false, target);
+ WriteMessageNoVirtualToArray(
+ 15, this->proto_file(i), target);
}
if (_internal_metadata_.have_unknown_fields()) {
@@ -964,61 +412,47 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
return target;
}
-size_t CodeGeneratorRequest::ByteSizeLong() const {
+int CodeGeneratorRequest::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest)
- size_t total_size = 0;
+ int total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
+ // optional string parameter = 2;
+ if (has_parameter()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->parameter());
}
+
// repeated string file_to_generate = 1;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->file_to_generate_size());
+ total_size += 1 * this->file_to_generate_size();
for (int i = 0; i < this->file_to_generate_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->file_to_generate(i));
}
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
- {
- unsigned int count = this->proto_file_size();
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->proto_file(i));
- }
+ total_size += 1 * this->proto_file_size();
+ for (int i = 0; i < this->proto_file_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->proto_file(i));
}
- if (_has_bits_[0 / 32] & 3u) {
- // optional string parameter = 2;
- if (has_parameter()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->parameter());
- }
-
- // optional .google.protobuf.compiler.Version compiler_version = 3;
- if (has_compiler_version()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- *this->compiler_version_);
- }
-
+ if (_internal_metadata_.have_unknown_fields()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
}
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
+ _cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
- GOOGLE_DCHECK_NE(&from, this);
- const CodeGeneratorRequest* source =
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
+ const CodeGeneratorRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorRequest>(
&from);
if (source == NULL) {
@@ -1032,18 +466,17 @@ void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) {
void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
file_to_generate_.MergeFrom(from.file_to_generate_);
proto_file_.MergeFrom(from.proto_file_);
- if (from._has_bits_[0 / 32] & 3u) {
+ if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
if (from.has_parameter()) {
set_has_parameter();
parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
}
- if (from.has_compiler_version()) {
- mutable_compiler_version()->::google::protobuf::compiler::Version::MergeFrom(from.compiler_version());
- }
+ }
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
@@ -1062,6 +495,7 @@ void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
}
bool CodeGeneratorRequest::IsInitialized() const {
+
if (!::google::protobuf::internal::AllAreInitialized(this->proto_file())) return false;
return true;
}
@@ -1072,9 +506,8 @@ void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) {
}
void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
file_to_generate_.UnsafeArenaSwap(&other->file_to_generate_);
- proto_file_.UnsafeArenaSwap(&other->proto_file_);
parameter_.Swap(&other->parameter_);
- std::swap(compiler_version_, other->compiler_version_);
+ proto_file_.UnsafeArenaSwap(&other->proto_file_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
@@ -1082,7 +515,10 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[1];
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = CodeGeneratorRequest_descriptor_;
+ metadata.reflection = CodeGeneratorRequest_reflection_;
+ return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
@@ -1095,49 +531,49 @@ int CodeGeneratorRequest::file_to_generate_size() const {
void CodeGeneratorRequest::clear_file_to_generate() {
file_to_generate_.Clear();
}
-const ::std::string& CodeGeneratorRequest::file_to_generate(int index) const {
+ const ::std::string& CodeGeneratorRequest::file_to_generate(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return file_to_generate_.Get(index);
}
-::std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) {
+ ::std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return file_to_generate_.Mutable(index);
}
-void CodeGeneratorRequest::set_file_to_generate(int index, const ::std::string& value) {
+ void CodeGeneratorRequest::set_file_to_generate(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
file_to_generate_.Mutable(index)->assign(value);
}
-void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
+ void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
file_to_generate_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
-void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) {
+ void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) {
file_to_generate_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
-::std::string* CodeGeneratorRequest::add_file_to_generate() {
+ ::std::string* CodeGeneratorRequest::add_file_to_generate() {
// @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return file_to_generate_.Add();
}
-void CodeGeneratorRequest::add_file_to_generate(const ::std::string& value) {
+ void CodeGeneratorRequest::add_file_to_generate(const ::std::string& value) {
file_to_generate_.Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
-void CodeGeneratorRequest::add_file_to_generate(const char* value) {
+ void CodeGeneratorRequest::add_file_to_generate(const char* value) {
file_to_generate_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
-void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) {
+ void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) {
file_to_generate_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
}
-const ::google::protobuf::RepeatedPtrField< ::std::string>&
+ const ::google::protobuf::RepeatedPtrField< ::std::string>&
CodeGeneratorRequest::file_to_generate() const {
// @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return file_to_generate_;
}
-::google::protobuf::RepeatedPtrField< ::std::string>*
+ ::google::protobuf::RepeatedPtrField< ::std::string>*
CodeGeneratorRequest::mutable_file_to_generate() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate)
return &file_to_generate_;
@@ -1145,57 +581,49 @@ CodeGeneratorRequest::mutable_file_to_generate() {
// optional string parameter = 2;
bool CodeGeneratorRequest::has_parameter() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
+ return (_has_bits_[0] & 0x00000002u) != 0;
}
void CodeGeneratorRequest::set_has_parameter() {
- _has_bits_[0] |= 0x00000001u;
+ _has_bits_[0] |= 0x00000002u;
}
void CodeGeneratorRequest::clear_has_parameter() {
- _has_bits_[0] &= ~0x00000001u;
+ _has_bits_[0] &= ~0x00000002u;
}
void CodeGeneratorRequest::clear_parameter() {
parameter_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_parameter();
}
-const ::std::string& CodeGeneratorRequest::parameter() const {
+ const ::std::string& CodeGeneratorRequest::parameter() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter)
- return parameter_.GetNoArena();
+ return parameter_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
+ void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
set_has_parameter();
parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
-#if LANG_CXX11
-void CodeGeneratorRequest::set_parameter(::std::string&& value) {
- set_has_parameter();
- parameter_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter)
-}
-#endif
-void CodeGeneratorRequest::set_parameter(const char* value) {
+ void CodeGeneratorRequest::set_parameter(const char* value) {
set_has_parameter();
parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
-void CodeGeneratorRequest::set_parameter(const char* value, size_t size) {
+ void CodeGeneratorRequest::set_parameter(const char* value, size_t size) {
set_has_parameter();
parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
-::std::string* CodeGeneratorRequest::mutable_parameter() {
+ ::std::string* CodeGeneratorRequest::mutable_parameter() {
set_has_parameter();
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter)
return parameter_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-::std::string* CodeGeneratorRequest::release_parameter() {
+ ::std::string* CodeGeneratorRequest::release_parameter() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter)
clear_has_parameter();
return parameter_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
+ void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
if (parameter != NULL) {
set_has_parameter();
} else {
@@ -1235,51 +663,6 @@ CodeGeneratorRequest::proto_file() const {
return proto_file_;
}
-// optional .google.protobuf.compiler.Version compiler_version = 3;
-bool CodeGeneratorRequest::has_compiler_version() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-void CodeGeneratorRequest::set_has_compiler_version() {
- _has_bits_[0] |= 0x00000002u;
-}
-void CodeGeneratorRequest::clear_has_compiler_version() {
- _has_bits_[0] &= ~0x00000002u;
-}
-void CodeGeneratorRequest::clear_compiler_version() {
- if (compiler_version_ != NULL) compiler_version_->::google::protobuf::compiler::Version::Clear();
- clear_has_compiler_version();
-}
-const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compiler_version() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
- return compiler_version_ != NULL ? *compiler_version_
- : *::google::protobuf::compiler::Version::internal_default_instance();
-}
-::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() {
- set_has_compiler_version();
- if (compiler_version_ == NULL) {
- compiler_version_ = new ::google::protobuf::compiler::Version;
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
- return compiler_version_;
-}
-::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() {
- // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
- clear_has_compiler_version();
- ::google::protobuf::compiler::Version* temp = compiler_version_;
- compiler_version_ = NULL;
- return temp;
-}
-void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version) {
- delete compiler_version_;
- compiler_version_ = compiler_version;
- if (compiler_version) {
- set_has_compiler_version();
- } else {
- clear_has_compiler_version();
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.compiler_version)
-}
-
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
@@ -1292,38 +675,28 @@ const int CodeGeneratorResponse_File::kContentFieldNumber;
CodeGeneratorResponse_File::CodeGeneratorResponse_File()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- }
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
+
+void CodeGeneratorResponse_File::InitAsDefaultInstance() {
+}
+
CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_name()) {
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_insertion_point()) {
- insertion_point_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.insertion_point_);
- }
- content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_content()) {
- content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
- }
+ _internal_metadata_(NULL) {
+ SharedCtor();
+ MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
void CodeGeneratorResponse_File::SharedCtor() {
+ ::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
@@ -1335,6 +708,8 @@ void CodeGeneratorResponse_File::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
insertion_point_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
content_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (this != default_instance_) {
+ }
}
void CodeGeneratorResponse_File::SetCachedSize(int size) const {
@@ -1344,14 +719,16 @@ void CodeGeneratorResponse_File::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[2].descriptor;
+ return CodeGeneratorResponse_File_descriptor_;
}
const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- return *internal_default_instance();
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ return *default_instance_;
}
+CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL;
+
CodeGeneratorResponse_File* CodeGeneratorResponse_File::New(::google::protobuf::Arena* arena) const {
CodeGeneratorResponse_File* n = new CodeGeneratorResponse_File;
if (arena != NULL) {
@@ -1364,20 +741,19 @@ void CodeGeneratorResponse_File::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
if (_has_bits_[0 / 32] & 7u) {
if (has_name()) {
- GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*name_.UnsafeRawStringPointer())->clear();
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
if (has_insertion_point()) {
- GOOGLE_DCHECK(!insertion_point_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*insertion_point_.UnsafeRawStringPointer())->clear();
+ insertion_point_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
if (has_content()) {
- GOOGLE_DCHECK(!content_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*content_.UnsafeRawStringPointer())->clear();
+ content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
}
- _has_bits_.Clear();
- _internal_metadata_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
+ }
}
bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
@@ -1386,13 +762,13 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
- if (tag == 10u) {
+ if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1402,12 +778,14 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(18)) goto parse_insertion_point;
break;
}
// optional string insertion_point = 2;
case 2: {
- if (tag == 18u) {
+ if (tag == 18) {
+ parse_insertion_point:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_insertion_point()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1417,12 +795,14 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(122)) goto parse_content;
break;
}
// optional string content = 15;
case 15: {
- if (tag == 122u) {
+ if (tag == 122) {
+ parse_content:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_content()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1432,6 +812,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
+ if (input->ExpectAtEnd()) goto success;
break;
}
@@ -1497,9 +878,8 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File)
}
-::google::protobuf::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File)
// optional string name = 1;
if (has_name()) {
@@ -1542,15 +922,10 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
return target;
}
-size_t CodeGeneratorResponse_File::ByteSizeLong() const {
+int CodeGeneratorResponse_File::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- size_t total_size = 0;
+ int total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
if (_has_bits_[0 / 32] & 7u) {
// optional string name = 1;
if (has_name()) {
@@ -1574,17 +949,21 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const {
}
}
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ if (_internal_metadata_.have_unknown_fields()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
+ _cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- GOOGLE_DCHECK_NE(&from, this);
- const CodeGeneratorResponse_File* source =
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
+ const CodeGeneratorResponse_File* source =
::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorResponse_File>(
&from);
if (source == NULL) {
@@ -1598,9 +977,8 @@ void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& fr
void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from._has_bits_[0 / 32] & 7u) {
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
@@ -1614,236 +992,53 @@ void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& fro
content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
}
}
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ }
}
-void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool CodeGeneratorResponse_File::IsInitialized() const {
- return true;
-}
-
-void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) {
- name_.Swap(&other->name_);
- insertion_point_.Swap(&other->insertion_point_);
- content_.Swap(&other->content_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- return file_level_metadata[2];
-}
-
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// CodeGeneratorResponse_File
-
-// optional string name = 1;
-bool CodeGeneratorResponse_File::has_name() const {
- return (_has_bits_[0] & 0x00000001u) != 0;
-}
-void CodeGeneratorResponse_File::set_has_name() {
- _has_bits_[0] |= 0x00000001u;
-}
-void CodeGeneratorResponse_File::clear_has_name() {
- _has_bits_[0] &= ~0x00000001u;
-}
-void CodeGeneratorResponse_File::clear_name() {
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_name();
-}
-const ::std::string& CodeGeneratorResponse_File::name() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name)
- return name_.GetNoArena();
-}
-void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
- set_has_name();
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
-}
-#if LANG_CXX11
-void CodeGeneratorResponse_File::set_name(::std::string&& value) {
- set_has_name();
- name_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name)
-}
-#endif
-void CodeGeneratorResponse_File::set_name(const char* value) {
- set_has_name();
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.name)
-}
-void CodeGeneratorResponse_File::set_name(const char* value, size_t size) {
- set_has_name();
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name)
-}
-::std::string* CodeGeneratorResponse_File::mutable_name() {
- set_has_name();
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name)
- return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* CodeGeneratorResponse_File::release_name() {
- // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
- clear_has_name();
- return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
- if (name != NULL) {
- set_has_name();
- } else {
- clear_has_name();
- }
- name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
-}
-
-// optional string insertion_point = 2;
-bool CodeGeneratorResponse_File::has_insertion_point() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
-}
-void CodeGeneratorResponse_File::set_has_insertion_point() {
- _has_bits_[0] |= 0x00000002u;
-}
-void CodeGeneratorResponse_File::clear_has_insertion_point() {
- _has_bits_[0] &= ~0x00000002u;
-}
-void CodeGeneratorResponse_File::clear_insertion_point() {
- insertion_point_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_insertion_point();
-}
-const ::std::string& CodeGeneratorResponse_File::insertion_point() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
- return insertion_point_.GetNoArena();
-}
-void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) {
- set_has_insertion_point();
- insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
-}
-#if LANG_CXX11
-void CodeGeneratorResponse_File::set_insertion_point(::std::string&& value) {
- set_has_insertion_point();
- insertion_point_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
-}
-#endif
-void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
- set_has_insertion_point();
- insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
-}
-void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) {
- set_has_insertion_point();
- insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
-}
-::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
- set_has_insertion_point();
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
- return insertion_point_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-::std::string* CodeGeneratorResponse_File::release_insertion_point() {
- // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
- clear_has_insertion_point();
- return insertion_point_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
- if (insertion_point != NULL) {
- set_has_insertion_point();
- } else {
- clear_has_insertion_point();
- }
- insertion_point_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), insertion_point);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
-}
-
-// optional string content = 15;
-bool CodeGeneratorResponse_File::has_content() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
-}
-void CodeGeneratorResponse_File::set_has_content() {
- _has_bits_[0] |= 0x00000004u;
-}
-void CodeGeneratorResponse_File::clear_has_content() {
- _has_bits_[0] &= ~0x00000004u;
-}
-void CodeGeneratorResponse_File::clear_content() {
- content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_content();
-}
-const ::std::string& CodeGeneratorResponse_File::content() const {
- // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content)
- return content_.GetNoArena();
-}
-void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
- set_has_content();
- content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
-}
-#if LANG_CXX11
-void CodeGeneratorResponse_File::set_content(::std::string&& value) {
- set_has_content();
- content_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
}
-#endif
-void CodeGeneratorResponse_File::set_content(const char* value) {
- set_has_content();
- content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+
+void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
}
-void CodeGeneratorResponse_File::set_content(const char* value, size_t size) {
- set_has_content();
- content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+
+bool CodeGeneratorResponse_File::IsInitialized() const {
+
+ return true;
}
-::std::string* CodeGeneratorResponse_File::mutable_content() {
- set_has_content();
- // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content)
- return content_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+
+void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
+ if (other == this) return;
+ InternalSwap(other);
}
-::std::string* CodeGeneratorResponse_File::release_content() {
- // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
- clear_has_content();
- return content_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) {
+ name_.Swap(&other->name_);
+ insertion_point_.Swap(&other->insertion_point_);
+ content_.Swap(&other->content_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ std::swap(_cached_size_, other->_cached_size_);
}
-void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
- if (content != NULL) {
- set_has_content();
- } else {
- clear_has_content();
- }
- content_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), content);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+
+::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = CodeGeneratorResponse_File_descriptor_;
+ metadata.reflection = CodeGeneratorResponse_File_reflection_;
+ return metadata;
}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-// ===================================================================
+// -------------------------------------------------------------------
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CodeGeneratorResponse::kErrorFieldNumber;
@@ -1852,29 +1047,26 @@ const int CodeGeneratorResponse::kFileFieldNumber;
CodeGeneratorResponse::CodeGeneratorResponse()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- }
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
+
+void CodeGeneratorResponse::InitAsDefaultInstance() {
+}
+
CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- _cached_size_(0),
- file_(from.file_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_error()) {
- error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_);
- }
+ _internal_metadata_(NULL) {
+ SharedCtor();
+ MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
void CodeGeneratorResponse::SharedCtor() {
+ ::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CodeGeneratorResponse::~CodeGeneratorResponse() {
@@ -1884,6 +1076,8 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
void CodeGeneratorResponse::SharedDtor() {
error_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (this != default_instance_) {
+ }
}
void CodeGeneratorResponse::SetCachedSize(int size) const {
@@ -1893,14 +1087,16 @@ void CodeGeneratorResponse::SetCachedSize(int size) const {
}
const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[3].descriptor;
+ return CodeGeneratorResponse_descriptor_;
}
const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
- protobuf_InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
- return *internal_default_instance();
+ if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
+ return *default_instance_;
}
+CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL;
+
CodeGeneratorResponse* CodeGeneratorResponse::New(::google::protobuf::Arena* arena) const {
CodeGeneratorResponse* n = new CodeGeneratorResponse;
if (arena != NULL) {
@@ -1911,13 +1107,14 @@ CodeGeneratorResponse* CodeGeneratorResponse::New(::google::protobuf::Arena* are
void CodeGeneratorResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
- file_.Clear();
if (has_error()) {
- GOOGLE_DCHECK(!error_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*error_.UnsafeRawStringPointer())->clear();
+ error_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ file_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
}
- _has_bits_.Clear();
- _internal_metadata_.Clear();
}
bool CodeGeneratorResponse::MergePartialFromCodedStream(
@@ -1926,13 +1123,13 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string error = 1;
case 1: {
- if (tag == 10u) {
+ if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_error()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
@@ -1942,19 +1139,24 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream(
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(122)) goto parse_file;
break;
}
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
case 15: {
- if (tag == 122u) {
+ if (tag == 122) {
+ parse_file:
DO_(input->IncrementRecursionDepth());
+ parse_loop_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
input, add_file()));
} else {
goto handle_unusual;
}
+ if (input->ExpectTag(122)) goto parse_loop_file;
input->UnsafeDecrementRecursionDepth();
+ if (input->ExpectAtEnd()) goto success;
break;
}
@@ -2006,9 +1208,8 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
// @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse)
}
-::google::protobuf::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse)
// optional string error = 1;
if (has_error()) {
@@ -2024,8 +1225,8 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 15, this->file(i), false, target);
+ WriteMessageNoVirtualToArray(
+ 15, this->file(i), target);
}
if (_internal_metadata_.have_unknown_fields()) {
@@ -2036,25 +1237,9 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
return target;
}
-size_t CodeGeneratorResponse::ByteSizeLong() const {
+int CodeGeneratorResponse::ByteSize() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
- {
- unsigned int count = this->file_size();
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->file(i));
- }
- }
+ int total_size = 0;
// optional string error = 1;
if (has_error()) {
@@ -2063,17 +1248,29 @@ size_t CodeGeneratorResponse::ByteSizeLong() const {
this->error());
}
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
+ total_size += 1 * this->file_size();
+ for (int i = 0; i < this->file_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->file(i));
+ }
+
+ if (_internal_metadata_.have_unknown_fields()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
+ _cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
- GOOGLE_DCHECK_NE(&from, this);
- const CodeGeneratorResponse* source =
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
+ const CodeGeneratorResponse* source =
::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorResponse>(
&from);
if (source == NULL) {
@@ -2087,12 +1284,16 @@ void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) {
void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
+ if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
file_.MergeFrom(from.file_);
- if (from.has_error()) {
- set_has_error();
- error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_error()) {
+ set_has_error();
+ error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_);
+ }
+ }
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
}
@@ -2111,6 +1312,7 @@ void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
}
bool CodeGeneratorResponse::IsInitialized() const {
+
return true;
}
@@ -2119,8 +1321,8 @@ void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) {
InternalSwap(other);
}
void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
- file_.UnsafeArenaSwap(&other->file_);
error_.Swap(&other->error_);
+ file_.UnsafeArenaSwap(&other->file_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
@@ -2128,10 +1330,179 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
- return file_level_metadata[3];
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = CodeGeneratorResponse_descriptor_;
+ metadata.reflection = CodeGeneratorResponse_reflection_;
+ return metadata;
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
+// CodeGeneratorResponse_File
+
+// optional string name = 1;
+bool CodeGeneratorResponse_File::has_name() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+void CodeGeneratorResponse_File::set_has_name() {
+ _has_bits_[0] |= 0x00000001u;
+}
+void CodeGeneratorResponse_File::clear_has_name() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+void CodeGeneratorResponse_File::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_name();
+}
+ const ::std::string& CodeGeneratorResponse_File::name() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+ return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
+ set_has_name();
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+}
+ void CodeGeneratorResponse_File::set_name(const char* value) {
+ set_has_name();
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+}
+ void CodeGeneratorResponse_File::set_name(const char* value, size_t size) {
+ set_has_name();
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+}
+ ::std::string* CodeGeneratorResponse_File::mutable_name() {
+ set_has_name();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ ::std::string* CodeGeneratorResponse_File::release_name() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+ clear_has_name();
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+ set_has_name();
+ } else {
+ clear_has_name();
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name)
+}
+
+// optional string insertion_point = 2;
+bool CodeGeneratorResponse_File::has_insertion_point() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+void CodeGeneratorResponse_File::set_has_insertion_point() {
+ _has_bits_[0] |= 0x00000002u;
+}
+void CodeGeneratorResponse_File::clear_has_insertion_point() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+void CodeGeneratorResponse_File::clear_insertion_point() {
+ insertion_point_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_insertion_point();
+}
+ const ::std::string& CodeGeneratorResponse_File::insertion_point() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+ return insertion_point_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) {
+ set_has_insertion_point();
+ insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+}
+ void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
+ set_has_insertion_point();
+ insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+}
+ void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) {
+ set_has_insertion_point();
+ insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+}
+ ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
+ set_has_insertion_point();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+ return insertion_point_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ ::std::string* CodeGeneratorResponse_File::release_insertion_point() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+ clear_has_insertion_point();
+ return insertion_point_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
+ if (insertion_point != NULL) {
+ set_has_insertion_point();
+ } else {
+ clear_has_insertion_point();
+ }
+ insertion_point_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), insertion_point);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
+}
+
+// optional string content = 15;
+bool CodeGeneratorResponse_File::has_content() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+void CodeGeneratorResponse_File::set_has_content() {
+ _has_bits_[0] |= 0x00000004u;
+}
+void CodeGeneratorResponse_File::clear_has_content() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+void CodeGeneratorResponse_File::clear_content() {
+ content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ clear_has_content();
+}
+ const ::std::string& CodeGeneratorResponse_File::content() const {
+ // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+ return content_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
+ set_has_content();
+ content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+}
+ void CodeGeneratorResponse_File::set_content(const char* value) {
+ set_has_content();
+ content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+}
+ void CodeGeneratorResponse_File::set_content(const char* value, size_t size) {
+ set_has_content();
+ content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+}
+ ::std::string* CodeGeneratorResponse_File::mutable_content() {
+ set_has_content();
+ // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+ return content_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ ::std::string* CodeGeneratorResponse_File::release_content() {
+ // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+ clear_has_content();
+ return content_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+ void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
+ if (content != NULL) {
+ set_has_content();
+ } else {
+ clear_has_content();
+ }
+ content_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), content);
+ // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content)
+}
+
+// -------------------------------------------------------------------
+
// CodeGeneratorResponse
// optional string error = 1;
@@ -2148,45 +1519,37 @@ void CodeGeneratorResponse::clear_error() {
error_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_error();
}
-const ::std::string& CodeGeneratorResponse::error() const {
+ const ::std::string& CodeGeneratorResponse::error() const {
// @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error)
- return error_.GetNoArena();
+ return error_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-void CodeGeneratorResponse::set_error(const ::std::string& value) {
+ void CodeGeneratorResponse::set_error(const ::std::string& value) {
set_has_error();
error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
-#if LANG_CXX11
-void CodeGeneratorResponse::set_error(::std::string&& value) {
- set_has_error();
- error_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error)
-}
-#endif
-void CodeGeneratorResponse::set_error(const char* value) {
+ void CodeGeneratorResponse::set_error(const char* value) {
set_has_error();
error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.error)
}
-void CodeGeneratorResponse::set_error(const char* value, size_t size) {
+ void CodeGeneratorResponse::set_error(const char* value, size_t size) {
set_has_error();
error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.error)
}
-::std::string* CodeGeneratorResponse::mutable_error() {
+ ::std::string* CodeGeneratorResponse::mutable_error() {
set_has_error();
// @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error)
return error_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-::std::string* CodeGeneratorResponse::release_error() {
+ ::std::string* CodeGeneratorResponse::release_error() {
// @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error)
clear_has_error();
return error_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
-void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
+ void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
if (error != NULL) {
set_has_error();
} else {

Powered by Google App Engine
This is Rietveld 408576698