aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/plugin.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/plugin.pb.cc')
-rw-r--r--src/google/protobuf/compiler/plugin.pb.cc333
1 files changed, 213 insertions, 120 deletions
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index b5cd01b5..efa64f3d 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -53,11 +53,12 @@ void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
CodeGeneratorRequest::default_instance_,
CodeGeneratorRequest_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _unknown_fields_),
+ -1,
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
- sizeof(CodeGeneratorRequest));
+ sizeof(CodeGeneratorRequest),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _internal_metadata_));
CodeGeneratorResponse_descriptor_ = file->message_type(1);
static const int CodeGeneratorResponse_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_),
@@ -69,11 +70,12 @@ void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
CodeGeneratorResponse::default_instance_,
CodeGeneratorResponse_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _unknown_fields_),
+ -1,
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
- sizeof(CodeGeneratorResponse));
+ sizeof(CodeGeneratorResponse),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _internal_metadata_));
CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0);
static const int CodeGeneratorResponse_File_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_),
@@ -86,11 +88,12 @@ void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
CodeGeneratorResponse_File::default_instance_,
CodeGeneratorResponse_File_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _unknown_fields_),
+ -1,
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
- sizeof(CodeGeneratorResponse_File));
+ sizeof(CodeGeneratorResponse_File),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _internal_metadata_));
}
namespace {
@@ -169,16 +172,27 @@ const int CodeGeneratorRequest::kProtoFileFieldNumber;
#endif // !_MSC_VER
CodeGeneratorRequest::CodeGeneratorRequest()
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message() , _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest)
}
+CodeGeneratorRequest::CodeGeneratorRequest(::google::protobuf::Arena* arena)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(arena),
+ file_to_generate_(arena),
+ proto_file_(arena) {
+ SharedCtor();
+ RegisterArenaDtor(arena);
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest)
+}
+
void CodeGeneratorRequest::InitAsDefaultInstance() {
}
CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
@@ -187,7 +201,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
void CodeGeneratorRequest::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -197,13 +211,21 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
}
void CodeGeneratorRequest::SharedDtor() {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete parameter_;
+ if (GetArenaNoVirtual() != NULL) {
+ return;
}
+
+ parameter_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
if (this != default_instance_) {
}
}
+void CodeGeneratorRequest::ArenaDtor(void* object) {
+ CodeGeneratorRequest* _this = reinterpret_cast< CodeGeneratorRequest* >(object);
+ (void)_this;
+}
+void CodeGeneratorRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+}
void CodeGeneratorRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
@@ -221,20 +243,20 @@ const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL;
-CodeGeneratorRequest* CodeGeneratorRequest::New() const {
- return new CodeGeneratorRequest;
+CodeGeneratorRequest* CodeGeneratorRequest::New(::google::protobuf::Arena* arena) const {
+ return ::google::protobuf::Arena::CreateMessage<CodeGeneratorRequest>(arena);
}
void CodeGeneratorRequest::Clear() {
if (has_parameter()) {
- if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- parameter_->clear();
- }
+ parameter_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
file_to_generate_.Clear();
proto_file_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
+ }
}
bool CodeGeneratorRequest::MergePartialFromCodedStream(
@@ -257,7 +279,7 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
this->file_to_generate(this->file_to_generate_size() - 1).data(),
this->file_to_generate(this->file_to_generate_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE,
- "file_to_generate");
+ "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
} else {
goto handle_unusual;
}
@@ -275,7 +297,7 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->parameter().data(), this->parameter().length(),
::google::protobuf::internal::WireFormat::PARSE,
- "parameter");
+ "google.protobuf.compiler.CodeGeneratorRequest.parameter");
} else {
goto handle_unusual;
}
@@ -327,7 +349,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->file_to_generate(i).data(), this->file_to_generate(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "file_to_generate");
+ "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->file_to_generate(i), output);
}
@@ -337,7 +359,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->parameter().data(), this->parameter().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "parameter");
+ "google.protobuf.compiler.CodeGeneratorRequest.parameter");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->parameter(), output);
}
@@ -348,7 +370,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
15, this->proto_file(i), output);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
@@ -363,7 +385,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->file_to_generate(i).data(), this->file_to_generate(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "file_to_generate");
+ "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(1, this->file_to_generate(i), target);
}
@@ -373,7 +395,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->parameter().data(), this->parameter().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "parameter");
+ "google.protobuf.compiler.CodeGeneratorRequest.parameter");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->parameter(), target);
@@ -386,7 +408,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
15, this->proto_file(i), target);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
@@ -397,15 +419,13 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
int CodeGeneratorRequest::ByteSize() const {
int total_size = 0;
- if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- // optional string parameter = 2;
- if (has_parameter()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->parameter());
- }
-
+ // 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 * this->file_to_generate_size();
for (int i = 0; i < this->file_to_generate_size(); i++) {
@@ -421,7 +441,7 @@ int CodeGeneratorRequest::ByteSize() const {
this->proto_file(i));
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
@@ -453,7 +473,9 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
set_parameter(from.parameter());
}
}
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ }
}
void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) {
@@ -475,15 +497,29 @@ bool CodeGeneratorRequest::IsInitialized() const {
}
void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) {
- if (other != this) {
- file_to_generate_.Swap(&other->file_to_generate_);
- std::swap(parameter_, other->parameter_);
- proto_file_.Swap(&other->proto_file_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
+ if (other == this) return;
+ if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
+ InternalSwap(other);
+ } else {
+ CodeGeneratorRequest temp;
+ temp.MergeFrom(*this);
+ CopyFrom(*other);
+ other->CopyFrom(temp);
}
}
+void CodeGeneratorRequest::UnsafeArenaSwap(CodeGeneratorRequest* other) {
+ if (other == this) return;
+ GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
+ InternalSwap(other);
+}
+void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
+ file_to_generate_.UnsafeArenaSwap(&other->file_to_generate_);
+ parameter_.Swap(&other->parameter_);
+ 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_);
+}
::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
@@ -503,16 +539,25 @@ const int CodeGeneratorResponse_File::kContentFieldNumber;
#endif // !_MSC_VER
CodeGeneratorResponse_File::CodeGeneratorResponse_File()
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message() , _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
}
+CodeGeneratorResponse_File::CodeGeneratorResponse_File(::google::protobuf::Arena* arena)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(arena) {
+ SharedCtor();
+ RegisterArenaDtor(arena);
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
+}
+
void CodeGeneratorResponse_File::InitAsDefaultInstance() {
}
CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
@@ -521,9 +566,9 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
void CodeGeneratorResponse_File::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ 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_));
}
@@ -533,19 +578,23 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
}
void CodeGeneratorResponse_File::SharedDtor() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete insertion_point_;
- }
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete content_;
+ if (GetArenaNoVirtual() != NULL) {
+ return;
}
+
+ name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+ insertion_point_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
+ content_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
if (this != default_instance_) {
}
}
+void CodeGeneratorResponse_File::ArenaDtor(void* object) {
+ CodeGeneratorResponse_File* _this = reinterpret_cast< CodeGeneratorResponse_File* >(object);
+ (void)_this;
+}
+void CodeGeneratorResponse_File::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+}
void CodeGeneratorResponse_File::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
@@ -563,30 +612,26 @@ const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance()
CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL;
-CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const {
- return new CodeGeneratorResponse_File;
+CodeGeneratorResponse_File* CodeGeneratorResponse_File::New(::google::protobuf::Arena* arena) const {
+ return ::google::protobuf::Arena::CreateMessage<CodeGeneratorResponse_File>(arena);
}
void CodeGeneratorResponse_File::Clear() {
if (_has_bits_[0 / 32] & 7) {
if (has_name()) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
+ name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
if (has_insertion_point()) {
- if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- insertion_point_->clear();
- }
+ insertion_point_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
if (has_content()) {
- if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- content_->clear();
- }
+ content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
+ }
}
bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
@@ -607,7 +652,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE,
- "name");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.name");
} else {
goto handle_unusual;
}
@@ -624,7 +669,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->insertion_point().data(), this->insertion_point().length(),
::google::protobuf::internal::WireFormat::PARSE,
- "insertion_point");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
} else {
goto handle_unusual;
}
@@ -641,7 +686,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->content().data(), this->content().length(),
::google::protobuf::internal::WireFormat::PARSE,
- "content");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.content");
} else {
goto handle_unusual;
}
@@ -679,7 +724,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
@@ -689,7 +734,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->insertion_point().data(), this->insertion_point().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "insertion_point");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->insertion_point(), output);
}
@@ -699,12 +744,12 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->content().data(), this->content().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "content");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.content");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
15, this->content(), output);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
@@ -719,7 +764,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
@@ -730,7 +775,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->insertion_point().data(), this->insertion_point().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "insertion_point");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->insertion_point(), target);
@@ -741,13 +786,13 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->content().data(), this->content().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "content");
+ "google.protobuf.compiler.CodeGeneratorResponse.File.content");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
15, this->content(), target);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
@@ -758,7 +803,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
int CodeGeneratorResponse_File::ByteSize() const {
int total_size = 0;
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (_has_bits_[0 / 32] & 7) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
@@ -781,7 +826,7 @@ int CodeGeneratorResponse_File::ByteSize() const {
}
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
@@ -817,7 +862,9 @@ void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& fro
set_content(from.content());
}
}
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ }
}
void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) {
@@ -838,15 +885,29 @@ bool CodeGeneratorResponse_File::IsInitialized() const {
}
void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
- if (other != this) {
- std::swap(name_, other->name_);
- std::swap(insertion_point_, other->insertion_point_);
- std::swap(content_, other->content_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
+ if (other == this) return;
+ if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
+ InternalSwap(other);
+ } else {
+ CodeGeneratorResponse_File temp;
+ temp.MergeFrom(*this);
+ CopyFrom(*other);
+ other->CopyFrom(temp);
}
}
+void CodeGeneratorResponse_File::UnsafeArenaSwap(CodeGeneratorResponse_File* other) {
+ if (other == this) return;
+ GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
+ 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();
@@ -865,16 +926,26 @@ const int CodeGeneratorResponse::kFileFieldNumber;
#endif // !_MSC_VER
CodeGeneratorResponse::CodeGeneratorResponse()
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message() , _internal_metadata_(NULL) {
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse)
}
+CodeGeneratorResponse::CodeGeneratorResponse(::google::protobuf::Arena* arena)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(arena),
+ file_(arena) {
+ SharedCtor();
+ RegisterArenaDtor(arena);
+ // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse)
+}
+
void CodeGeneratorResponse::InitAsDefaultInstance() {
}
CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
- : ::google::protobuf::Message() {
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL) {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
@@ -883,7 +954,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
void CodeGeneratorResponse::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -893,13 +964,21 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
}
void CodeGeneratorResponse::SharedDtor() {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete error_;
+ if (GetArenaNoVirtual() != NULL) {
+ return;
}
+
+ error_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
if (this != default_instance_) {
}
}
+void CodeGeneratorResponse::ArenaDtor(void* object) {
+ CodeGeneratorResponse* _this = reinterpret_cast< CodeGeneratorResponse* >(object);
+ (void)_this;
+}
+void CodeGeneratorResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) {
+}
void CodeGeneratorResponse::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
@@ -917,19 +996,19 @@ const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL;
-CodeGeneratorResponse* CodeGeneratorResponse::New() const {
- return new CodeGeneratorResponse;
+CodeGeneratorResponse* CodeGeneratorResponse::New(::google::protobuf::Arena* arena) const {
+ return ::google::protobuf::Arena::CreateMessage<CodeGeneratorResponse>(arena);
}
void CodeGeneratorResponse::Clear() {
if (has_error()) {
- if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- error_->clear();
- }
+ error_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
file_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
+ if (_internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->Clear();
+ }
}
bool CodeGeneratorResponse::MergePartialFromCodedStream(
@@ -950,7 +1029,7 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->error().data(), this->error().length(),
::google::protobuf::internal::WireFormat::PARSE,
- "error");
+ "google.protobuf.compiler.CodeGeneratorResponse.error");
} else {
goto handle_unusual;
}
@@ -1002,7 +1081,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->error().data(), this->error().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "error");
+ "google.protobuf.compiler.CodeGeneratorResponse.error");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->error(), output);
}
@@ -1013,7 +1092,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
15, this->file(i), output);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
@@ -1028,7 +1107,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->error().data(), this->error().length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
- "error");
+ "google.protobuf.compiler.CodeGeneratorResponse.error");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->error(), target);
@@ -1041,7 +1120,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
15, this->file(i), target);
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
@@ -1052,15 +1131,13 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
int CodeGeneratorResponse::ByteSize() const {
int total_size = 0;
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional string error = 1;
- if (has_error()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->error());
- }
-
+ // optional string error = 1;
+ if (has_error()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->error());
}
+
// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
total_size += 1 * this->file_size();
for (int i = 0; i < this->file_size(); i++) {
@@ -1069,7 +1146,7 @@ int CodeGeneratorResponse::ByteSize() const {
this->file(i));
}
- if (!unknown_fields().empty()) {
+ if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
@@ -1100,7 +1177,9 @@ void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
set_error(from.error());
}
}
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ if (from._internal_metadata_.have_unknown_fields()) {
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+ }
}
void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) {
@@ -1121,14 +1200,28 @@ bool CodeGeneratorResponse::IsInitialized() const {
}
void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) {
- if (other != this) {
- std::swap(error_, other->error_);
- file_.Swap(&other->file_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
+ if (other == this) return;
+ if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
+ InternalSwap(other);
+ } else {
+ CodeGeneratorResponse temp;
+ temp.MergeFrom(*this);
+ CopyFrom(*other);
+ other->CopyFrom(temp);
}
}
+void CodeGeneratorResponse::UnsafeArenaSwap(CodeGeneratorResponse* other) {
+ if (other == this) return;
+ GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
+ InternalSwap(other);
+}
+void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
+ 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_);
+}
::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
protobuf_AssignDescriptorsOnce();