You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2016/05/11 22:24:50 UTC
[28/50] [abbrv] mesos git commit: Moved stout from
libprocess/3rdparty/ to 3rdparty/.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c235f7c1/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc b/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc
deleted file mode 100644
index b2458f0..0000000
--- a/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc
+++ /dev/null
@@ -1,2553 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: protobuf_tests.proto
-
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
-#include "protobuf_tests.pb.h"
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// @@protoc_insertion_point(includes)
-
-namespace tests {
-
-namespace {
-
-const ::google::protobuf::Descriptor* Nested_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Nested_reflection_ = NULL;
-const ::google::protobuf::Descriptor* SimpleMessage_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- SimpleMessage_reflection_ = NULL;
-const ::google::protobuf::Descriptor* Message_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- Message_reflection_ = NULL;
-const ::google::protobuf::Descriptor* ArrayMessage_descriptor_ = NULL;
-const ::google::protobuf::internal::GeneratedMessageReflection*
- ArrayMessage_reflection_ = NULL;
-const ::google::protobuf::EnumDescriptor* Enum_descriptor_ = NULL;
-
-} // namespace
-
-
-void protobuf_AssignDesc_protobuf_5ftests_2eproto() {
- protobuf_AddDesc_protobuf_5ftests_2eproto();
- const ::google::protobuf::FileDescriptor* file =
- ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
- "protobuf_tests.proto");
- GOOGLE_CHECK(file != NULL);
- Nested_descriptor_ = file->message_type(0);
- static const int Nested_offsets_[3] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Nested, str_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Nested, optional_str_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Nested, repeated_str_),
- };
- Nested_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Nested_descriptor_,
- Nested::default_instance_,
- Nested_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Nested, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Nested, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Nested));
- SimpleMessage_descriptor_ = file->message_type(1);
- static const int SimpleMessage_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SimpleMessage, id_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SimpleMessage, numbers_),
- };
- SimpleMessage_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- SimpleMessage_descriptor_,
- SimpleMessage::default_instance_,
- SimpleMessage_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SimpleMessage, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SimpleMessage, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(SimpleMessage));
- Message_descriptor_ = file->message_type(2);
- static const int Message_offsets_[29] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, b_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, str_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, f_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, d_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, e_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, nested_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, repeated_nested_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, empty_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, optional_default_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, optional_no_default_),
- };
- Message_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Message_descriptor_,
- Message::default_instance_,
- Message_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Message));
- ArrayMessage_descriptor_ = file->message_type(3);
- static const int ArrayMessage_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArrayMessage, values_),
- };
- ArrayMessage_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- ArrayMessage_descriptor_,
- ArrayMessage::default_instance_,
- ArrayMessage_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArrayMessage, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArrayMessage, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(ArrayMessage));
- Enum_descriptor_ = file->enum_type(0);
-}
-
-namespace {
-
-GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
-inline void protobuf_AssignDescriptorsOnce() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
- &protobuf_AssignDesc_protobuf_5ftests_2eproto);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Nested_descriptor_, &Nested::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- SimpleMessage_descriptor_, &SimpleMessage::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Message_descriptor_, &Message::default_instance());
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- ArrayMessage_descriptor_, &ArrayMessage::default_instance());
-}
-
-} // namespace
-
-void protobuf_ShutdownFile_protobuf_5ftests_2eproto() {
- delete Nested::default_instance_;
- delete Nested_reflection_;
- delete SimpleMessage::default_instance_;
- delete SimpleMessage_reflection_;
- delete Message::default_instance_;
- delete Message_reflection_;
- delete ArrayMessage::default_instance_;
- delete ArrayMessage_reflection_;
-}
-
-void protobuf_AddDesc_protobuf_5ftests_2eproto() {
- static bool already_here = false;
- if (already_here) return;
- already_here = true;
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- "\n\024protobuf_tests.proto\022\005tests\"A\n\006Nested\022"
- "\013\n\003str\030\001 \002(\t\022\024\n\014optional_str\030\002 \001(\t\022\024\n\014re"
- "peated_str\030\003 \003(\t\",\n\rSimpleMessage\022\n\n\002id\030"
- "\001 \002(\t\022\017\n\007numbers\030\002 \003(\005\"\376\004\n\007Message\022\t\n\001b\030"
- "\032 \002(\010\022\013\n\003str\030\001 \002(\t\022\r\n\005bytes\030\002 \002(\014\022\r\n\005int"
- "32\030\003 \001(\005\022\r\n\005int64\030\004 \001(\003\022\016\n\006uint32\030\005 \001(\r\022"
- "\016\n\006uint64\030\006 \001(\004\022\016\n\006sint32\030\007 \001(\021\022\016\n\006sint6"
- "4\030\010 \001(\022\022\t\n\001f\030\t \002(\002\022\t\n\001d\030\n \002(\001\022\026\n\001e\030\013 \002(\016"
- "2\013.tests.Enum\022\035\n\006nested\030\014 \002(\0132\r.tests.Ne"
- "sted\022\025\n\rrepeated_bool\030\033 \003(\010\022\027\n\017repeated_"
- "string\030\r \003(\t\022\026\n\016repeated_bytes\030\016 \003(\014\022\026\n\016"
- "repeated_int32\030\017 \003(\005\022\026\n\016repeated_int64\030\020"
- " \003(\003\022\027\n\017repeated_uint32\030\021 \003(\r\022\027\n\017repeate"
- "d_uint64\030\022 \003(\004\022\027\n\017repeated_sint32\030\023 \003(\021\022"
- "\027\n\017repeated_sint64\030\024 \003(\022\022\026\n\016repeated_flo"
- "at\030\025 \003(\002\022\027\n\017repeated_double\030\026 \003(\001\022\"\n\rrep"
- "eated_enum\030\027 \003(\0162\013.tests.Enum\022&\n\017repeate"
- "d_nested\030\030 \003(\0132\r.tests.Nested\022\r\n\005empty\030\031"
- " \003(\t\022\034\n\020optional_default\030\034 \001(\001:\00242\022\033\n\023op"
- "tional_no_default\030\035 \001(\001\"4\n\014ArrayMessage\022"
- "$\n\006values\030\001 \003(\0132\024.tests.SimpleMessage*\030\n"
- "\004Enum\022\007\n\003ONE\020\001\022\007\n\003TWO\020\002", 863);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "protobuf_tests.proto", &protobuf_RegisterTypes);
- Nested::default_instance_ = new Nested();
- SimpleMessage::default_instance_ = new SimpleMessage();
- Message::default_instance_ = new Message();
- ArrayMessage::default_instance_ = new ArrayMessage();
- Nested::default_instance_->InitAsDefaultInstance();
- SimpleMessage::default_instance_->InitAsDefaultInstance();
- Message::default_instance_->InitAsDefaultInstance();
- ArrayMessage::default_instance_->InitAsDefaultInstance();
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_protobuf_5ftests_2eproto);
-}
-
-// Force AddDescriptors() to be called at static initialization time.
-struct StaticDescriptorInitializer_protobuf_5ftests_2eproto {
- StaticDescriptorInitializer_protobuf_5ftests_2eproto() {
- protobuf_AddDesc_protobuf_5ftests_2eproto();
- }
-} static_descriptor_initializer_protobuf_5ftests_2eproto_;
-const ::google::protobuf::EnumDescriptor* Enum_descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Enum_descriptor_;
-}
-bool Enum_IsValid(int value) {
- switch(value) {
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Nested::kStrFieldNumber;
-const int Nested::kOptionalStrFieldNumber;
-const int Nested::kRepeatedStrFieldNumber;
-#endif // !_MSC_VER
-
-Nested::Nested()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:tests.Nested)
-}
-
-void Nested::InitAsDefaultInstance() {
-}
-
-Nested::Nested(const Nested& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:tests.Nested)
-}
-
-void Nested::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- str_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_str_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Nested::~Nested() {
- // @@protoc_insertion_point(destructor:tests.Nested)
- SharedDtor();
-}
-
-void Nested::SharedDtor() {
- if (str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete str_;
- }
- if (optional_str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete optional_str_;
- }
- if (this != default_instance_) {
- }
-}
-
-void Nested::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Nested::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Nested_descriptor_;
-}
-
-const Nested& Nested::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
- return *default_instance_;
-}
-
-Nested* Nested::default_instance_ = NULL;
-
-Nested* Nested::New() const {
- return new Nested;
-}
-
-void Nested::Clear() {
- if (_has_bits_[0 / 32] & 3) {
- if (has_str()) {
- if (str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- str_->clear();
- }
- }
- if (has_optional_str()) {
- if (optional_str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- optional_str_->clear();
- }
- }
- }
- repeated_str_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Nested::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:tests.Nested)
- for (;;) {
- ::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)) {
- // required string str = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "str");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_optional_str;
- break;
- }
-
- // optional string optional_str = 2;
- case 2: {
- if (tag == 18) {
- parse_optional_str:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_str()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_str().data(), this->optional_str().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "optional_str");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_repeated_str;
- break;
- }
-
- // repeated string repeated_str = 3;
- case 3: {
- if (tag == 26) {
- parse_repeated_str:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_str()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_str(this->repeated_str_size() - 1).data(),
- this->repeated_str(this->repeated_str_size() - 1).length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "repeated_str");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_repeated_str;
- if (input->ExpectAtEnd()) goto success;
- 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:tests.Nested)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:tests.Nested)
- return false;
-#undef DO_
-}
-
-void Nested::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:tests.Nested)
- // required string str = 1;
- if (has_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "str");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->str(), output);
- }
-
- // optional string optional_str = 2;
- if (has_optional_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_str().data(), this->optional_str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "optional_str");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->optional_str(), output);
- }
-
- // repeated string repeated_str = 3;
- for (int i = 0; i < this->repeated_str_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_str(i).data(), this->repeated_str(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "repeated_str");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 3, this->repeated_str(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:tests.Nested)
-}
-
-::google::protobuf::uint8* Nested::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:tests.Nested)
- // required string str = 1;
- if (has_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "str");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->str(), target);
- }
-
- // optional string optional_str = 2;
- if (has_optional_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_str().data(), this->optional_str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "optional_str");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->optional_str(), target);
- }
-
- // repeated string repeated_str = 3;
- for (int i = 0; i < this->repeated_str_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_str(i).data(), this->repeated_str(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "repeated_str");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(3, this->repeated_str(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:tests.Nested)
- return target;
-}
-
-int Nested::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required string str = 1;
- if (has_str()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str());
- }
-
- // optional string optional_str = 2;
- if (has_optional_str()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_str());
- }
-
- }
- // repeated string repeated_str = 3;
- total_size += 1 * this->repeated_str_size();
- for (int i = 0; i < this->repeated_str_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_str(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Nested::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Nested* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Nested*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Nested::MergeFrom(const Nested& from) {
- GOOGLE_CHECK_NE(&from, this);
- repeated_str_.MergeFrom(from.repeated_str_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_str()) {
- set_str(from.str());
- }
- if (from.has_optional_str()) {
- set_optional_str(from.optional_str());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Nested::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Nested::CopyFrom(const Nested& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Nested::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
-
- return true;
-}
-
-void Nested::Swap(Nested* other) {
- if (other != this) {
- std::swap(str_, other->str_);
- std::swap(optional_str_, other->optional_str_);
- repeated_str_.Swap(&other->repeated_str_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Nested::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Nested_descriptor_;
- metadata.reflection = Nested_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int SimpleMessage::kIdFieldNumber;
-const int SimpleMessage::kNumbersFieldNumber;
-#endif // !_MSC_VER
-
-SimpleMessage::SimpleMessage()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:tests.SimpleMessage)
-}
-
-void SimpleMessage::InitAsDefaultInstance() {
-}
-
-SimpleMessage::SimpleMessage(const SimpleMessage& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:tests.SimpleMessage)
-}
-
-void SimpleMessage::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-SimpleMessage::~SimpleMessage() {
- // @@protoc_insertion_point(destructor:tests.SimpleMessage)
- SharedDtor();
-}
-
-void SimpleMessage::SharedDtor() {
- if (id_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete id_;
- }
- if (this != default_instance_) {
- }
-}
-
-void SimpleMessage::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* SimpleMessage::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return SimpleMessage_descriptor_;
-}
-
-const SimpleMessage& SimpleMessage::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
- return *default_instance_;
-}
-
-SimpleMessage* SimpleMessage::default_instance_ = NULL;
-
-SimpleMessage* SimpleMessage::New() const {
- return new SimpleMessage;
-}
-
-void SimpleMessage::Clear() {
- if (has_id()) {
- if (id_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- id_->clear();
- }
- }
- numbers_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool SimpleMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:tests.SimpleMessage)
- for (;;) {
- ::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)) {
- // required string id = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_id()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->id().data(), this->id().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "id");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(16)) goto parse_numbers;
- break;
- }
-
- // repeated int32 numbers = 2;
- case 2: {
- if (tag == 16) {
- parse_numbers:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 16, input, this->mutable_numbers())));
- } else if (tag == 18) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_numbers())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(16)) goto parse_numbers;
- if (input->ExpectAtEnd()) goto success;
- 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:tests.SimpleMessage)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:tests.SimpleMessage)
- return false;
-#undef DO_
-}
-
-void SimpleMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:tests.SimpleMessage)
- // required string id = 1;
- if (has_id()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->id().data(), this->id().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "id");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->id(), output);
- }
-
- // repeated int32 numbers = 2;
- for (int i = 0; i < this->numbers_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 2, this->numbers(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:tests.SimpleMessage)
-}
-
-::google::protobuf::uint8* SimpleMessage::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:tests.SimpleMessage)
- // required string id = 1;
- if (has_id()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->id().data(), this->id().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "id");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->id(), target);
- }
-
- // repeated int32 numbers = 2;
- for (int i = 0; i < this->numbers_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(2, this->numbers(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:tests.SimpleMessage)
- return target;
-}
-
-int SimpleMessage::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required string id = 1;
- if (has_id()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->id());
- }
-
- }
- // repeated int32 numbers = 2;
- {
- int data_size = 0;
- for (int i = 0; i < this->numbers_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->numbers(i));
- }
- total_size += 1 * this->numbers_size() + data_size;
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void SimpleMessage::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const SimpleMessage* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const SimpleMessage*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void SimpleMessage::MergeFrom(const SimpleMessage& from) {
- GOOGLE_CHECK_NE(&from, this);
- numbers_.MergeFrom(from.numbers_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_id()) {
- set_id(from.id());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void SimpleMessage::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void SimpleMessage::CopyFrom(const SimpleMessage& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool SimpleMessage::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
-
- return true;
-}
-
-void SimpleMessage::Swap(SimpleMessage* other) {
- if (other != this) {
- std::swap(id_, other->id_);
- numbers_.Swap(&other->numbers_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata SimpleMessage::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = SimpleMessage_descriptor_;
- metadata.reflection = SimpleMessage_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Message::kBFieldNumber;
-const int Message::kStrFieldNumber;
-const int Message::kBytesFieldNumber;
-const int Message::kInt32FieldNumber;
-const int Message::kInt64FieldNumber;
-const int Message::kUint32FieldNumber;
-const int Message::kUint64FieldNumber;
-const int Message::kSint32FieldNumber;
-const int Message::kSint64FieldNumber;
-const int Message::kFFieldNumber;
-const int Message::kDFieldNumber;
-const int Message::kEFieldNumber;
-const int Message::kNestedFieldNumber;
-const int Message::kRepeatedBoolFieldNumber;
-const int Message::kRepeatedStringFieldNumber;
-const int Message::kRepeatedBytesFieldNumber;
-const int Message::kRepeatedInt32FieldNumber;
-const int Message::kRepeatedInt64FieldNumber;
-const int Message::kRepeatedUint32FieldNumber;
-const int Message::kRepeatedUint64FieldNumber;
-const int Message::kRepeatedSint32FieldNumber;
-const int Message::kRepeatedSint64FieldNumber;
-const int Message::kRepeatedFloatFieldNumber;
-const int Message::kRepeatedDoubleFieldNumber;
-const int Message::kRepeatedEnumFieldNumber;
-const int Message::kRepeatedNestedFieldNumber;
-const int Message::kEmptyFieldNumber;
-const int Message::kOptionalDefaultFieldNumber;
-const int Message::kOptionalNoDefaultFieldNumber;
-#endif // !_MSC_VER
-
-Message::Message()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:tests.Message)
-}
-
-void Message::InitAsDefaultInstance() {
- nested_ = const_cast< ::tests::Nested*>(&::tests::Nested::default_instance());
-}
-
-Message::Message(const Message& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:tests.Message)
-}
-
-void Message::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- b_ = false;
- str_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- bytes_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- int32_ = 0;
- int64_ = GOOGLE_LONGLONG(0);
- uint32_ = 0u;
- uint64_ = GOOGLE_ULONGLONG(0);
- sint32_ = 0;
- sint64_ = GOOGLE_LONGLONG(0);
- f_ = 0;
- d_ = 0;
- e_ = 1;
- nested_ = NULL;
- optional_default_ = 42;
- optional_no_default_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Message::~Message() {
- // @@protoc_insertion_point(destructor:tests.Message)
- SharedDtor();
-}
-
-void Message::SharedDtor() {
- if (str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete str_;
- }
- if (bytes_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete bytes_;
- }
- if (this != default_instance_) {
- delete nested_;
- }
-}
-
-void Message::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Message::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return Message_descriptor_;
-}
-
-const Message& Message::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
- return *default_instance_;
-}
-
-Message* Message::default_instance_ = NULL;
-
-Message* Message::New() const {
- return new Message;
-}
-
-void Message::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Message*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- if (_has_bits_[0 / 32] & 255) {
- ZR_(b_, int32_);
- ZR_(int64_, sint32_);
- if (has_str()) {
- if (str_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- str_->clear();
- }
- }
- if (has_bytes()) {
- if (bytes_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- bytes_->clear();
- }
- }
- }
- if (_has_bits_[8 / 32] & 7936) {
- ZR_(sint64_, f_);
- e_ = 1;
- if (has_nested()) {
- if (nested_ != NULL) nested_->::tests::Nested::Clear();
- }
- }
- if (_has_bits_[24 / 32] & 402653184) {
- optional_default_ = 42;
- optional_no_default_ = 0;
- }
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- repeated_bool_.Clear();
- repeated_string_.Clear();
- repeated_bytes_.Clear();
- repeated_int32_.Clear();
- repeated_int64_.Clear();
- repeated_uint32_.Clear();
- repeated_uint64_.Clear();
- repeated_sint32_.Clear();
- repeated_sint64_.Clear();
- repeated_float_.Clear();
- repeated_double_.Clear();
- repeated_enum_.Clear();
- repeated_nested_.Clear();
- empty_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Message::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:tests.Message)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required string str = 1;
- case 1: {
- if (tag == 10) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "str");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(18)) goto parse_bytes;
- break;
- }
-
- // required bytes bytes = 2;
- case 2: {
- if (tag == 18) {
- parse_bytes:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_bytes()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(24)) goto parse_int32;
- break;
- }
-
- // optional int32 int32 = 3;
- case 3: {
- if (tag == 24) {
- parse_int32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &int32_)));
- set_has_int32();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(32)) goto parse_int64;
- break;
- }
-
- // optional int64 int64 = 4;
- case 4: {
- if (tag == 32) {
- parse_int64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &int64_)));
- set_has_int64();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(40)) goto parse_uint32;
- break;
- }
-
- // optional uint32 uint32 = 5;
- case 5: {
- if (tag == 40) {
- parse_uint32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &uint32_)));
- set_has_uint32();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(48)) goto parse_uint64;
- break;
- }
-
- // optional uint64 uint64 = 6;
- case 6: {
- if (tag == 48) {
- parse_uint64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &uint64_)));
- set_has_uint64();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(56)) goto parse_sint32;
- break;
- }
-
- // optional sint32 sint32 = 7;
- case 7: {
- if (tag == 56) {
- parse_sint32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, &sint32_)));
- set_has_sint32();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(64)) goto parse_sint64;
- break;
- }
-
- // optional sint64 sint64 = 8;
- case 8: {
- if (tag == 64) {
- parse_sint64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, &sint64_)));
- set_has_sint64();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(77)) goto parse_f;
- break;
- }
-
- // required float f = 9;
- case 9: {
- if (tag == 77) {
- parse_f:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &f_)));
- set_has_f();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(81)) goto parse_d;
- break;
- }
-
- // required double d = 10;
- case 10: {
- if (tag == 81) {
- parse_d:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &d_)));
- set_has_d();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(88)) goto parse_e;
- break;
- }
-
- // required .tests.Enum e = 11;
- case 11: {
- if (tag == 88) {
- parse_e:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::tests::Enum_IsValid(value)) {
- set_e(static_cast< ::tests::Enum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(11, value);
- }
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(98)) goto parse_nested;
- break;
- }
-
- // required .tests.Nested nested = 12;
- case 12: {
- if (tag == 98) {
- parse_nested:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_nested()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(106)) goto parse_repeated_string;
- break;
- }
-
- // repeated string repeated_string = 13;
- case 13: {
- if (tag == 106) {
- parse_repeated_string:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_string()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(this->repeated_string_size() - 1).data(),
- this->repeated_string(this->repeated_string_size() - 1).length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "repeated_string");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(106)) goto parse_repeated_string;
- if (input->ExpectTag(114)) goto parse_repeated_bytes;
- break;
- }
-
- // repeated bytes repeated_bytes = 14;
- case 14: {
- if (tag == 114) {
- parse_repeated_bytes:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_repeated_bytes()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(114)) goto parse_repeated_bytes;
- if (input->ExpectTag(120)) goto parse_repeated_int32;
- break;
- }
-
- // repeated int32 repeated_int32 = 15;
- case 15: {
- if (tag == 120) {
- parse_repeated_int32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 120, input, this->mutable_repeated_int32())));
- } else if (tag == 122) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_repeated_int32())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(120)) goto parse_repeated_int32;
- if (input->ExpectTag(128)) goto parse_repeated_int64;
- break;
- }
-
- // repeated int64 repeated_int64 = 16;
- case 16: {
- if (tag == 128) {
- parse_repeated_int64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 2, 128, input, this->mutable_repeated_int64())));
- } else if (tag == 130) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, this->mutable_repeated_int64())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(128)) goto parse_repeated_int64;
- if (input->ExpectTag(136)) goto parse_repeated_uint32;
- break;
- }
-
- // repeated uint32 repeated_uint32 = 17;
- case 17: {
- if (tag == 136) {
- parse_repeated_uint32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 2, 136, input, this->mutable_repeated_uint32())));
- } else if (tag == 138) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, this->mutable_repeated_uint32())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(136)) goto parse_repeated_uint32;
- if (input->ExpectTag(144)) goto parse_repeated_uint64;
- break;
- }
-
- // repeated uint64 repeated_uint64 = 18;
- case 18: {
- if (tag == 144) {
- parse_repeated_uint64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 2, 144, input, this->mutable_repeated_uint64())));
- } else if (tag == 146) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_repeated_uint64())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(144)) goto parse_repeated_uint64;
- if (input->ExpectTag(152)) goto parse_repeated_sint32;
- break;
- }
-
- // repeated sint32 repeated_sint32 = 19;
- case 19: {
- if (tag == 152) {
- parse_repeated_sint32:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 2, 152, input, this->mutable_repeated_sint32())));
- } else if (tag == 154) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, this->mutable_repeated_sint32())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(152)) goto parse_repeated_sint32;
- if (input->ExpectTag(160)) goto parse_repeated_sint64;
- break;
- }
-
- // repeated sint64 repeated_sint64 = 20;
- case 20: {
- if (tag == 160) {
- parse_repeated_sint64:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 2, 160, input, this->mutable_repeated_sint64())));
- } else if (tag == 162) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, this->mutable_repeated_sint64())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(160)) goto parse_repeated_sint64;
- if (input->ExpectTag(173)) goto parse_repeated_float;
- break;
- }
-
- // repeated float repeated_float = 21;
- case 21: {
- if (tag == 173) {
- parse_repeated_float:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 2, 173, input, this->mutable_repeated_float())));
- } else if (tag == 170) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_repeated_float())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(173)) goto parse_repeated_float;
- if (input->ExpectTag(177)) goto parse_repeated_double;
- break;
- }
-
- // repeated double repeated_double = 22;
- case 22: {
- if (tag == 177) {
- parse_repeated_double:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 2, 177, input, this->mutable_repeated_double())));
- } else if (tag == 178) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, this->mutable_repeated_double())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(177)) goto parse_repeated_double;
- if (input->ExpectTag(184)) goto parse_repeated_enum;
- break;
- }
-
- // repeated .tests.Enum repeated_enum = 23;
- case 23: {
- if (tag == 184) {
- parse_repeated_enum:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::tests::Enum_IsValid(value)) {
- add_repeated_enum(static_cast< ::tests::Enum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(23, value);
- }
- } else if (tag == 186) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumNoInline(
- input,
- &::tests::Enum_IsValid,
- this->mutable_repeated_enum())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(184)) goto parse_repeated_enum;
- if (input->ExpectTag(194)) goto parse_repeated_nested;
- break;
- }
-
- // repeated .tests.Nested repeated_nested = 24;
- case 24: {
- if (tag == 194) {
- parse_repeated_nested:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_repeated_nested()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(194)) goto parse_repeated_nested;
- if (input->ExpectTag(202)) goto parse_empty;
- break;
- }
-
- // repeated string empty = 25;
- case 25: {
- if (tag == 202) {
- parse_empty:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_empty()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->empty(this->empty_size() - 1).data(),
- this->empty(this->empty_size() - 1).length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "empty");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(202)) goto parse_empty;
- if (input->ExpectTag(208)) goto parse_b;
- break;
- }
-
- // required bool b = 26;
- case 26: {
- if (tag == 208) {
- parse_b:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &b_)));
- set_has_b();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(216)) goto parse_repeated_bool;
- break;
- }
-
- // repeated bool repeated_bool = 27;
- case 27: {
- if (tag == 216) {
- parse_repeated_bool:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 2, 216, input, this->mutable_repeated_bool())));
- } else if (tag == 218) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_repeated_bool())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(216)) goto parse_repeated_bool;
- if (input->ExpectTag(225)) goto parse_optional_default;
- break;
- }
-
- // optional double optional_default = 28 [default = 42];
- case 28: {
- if (tag == 225) {
- parse_optional_default:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &optional_default_)));
- set_has_optional_default();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(233)) goto parse_optional_no_default;
- break;
- }
-
- // optional double optional_no_default = 29;
- case 29: {
- if (tag == 233) {
- parse_optional_no_default:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &optional_no_default_)));
- set_has_optional_no_default();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- 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:tests.Message)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:tests.Message)
- return false;
-#undef DO_
-}
-
-void Message::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:tests.Message)
- // required string str = 1;
- if (has_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "str");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->str(), output);
- }
-
- // required bytes bytes = 2;
- if (has_bytes()) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 2, this->bytes(), output);
- }
-
- // optional int32 int32 = 3;
- if (has_int32()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int32(), output);
- }
-
- // optional int64 int64 = 4;
- if (has_int64()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->int64(), output);
- }
-
- // optional uint32 uint32 = 5;
- if (has_uint32()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->uint32(), output);
- }
-
- // optional uint64 uint64 = 6;
- if (has_uint64()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->uint64(), output);
- }
-
- // optional sint32 sint32 = 7;
- if (has_sint32()) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(7, this->sint32(), output);
- }
-
- // optional sint64 sint64 = 8;
- if (has_sint64()) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(8, this->sint64(), output);
- }
-
- // required float f = 9;
- if (has_f()) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->f(), output);
- }
-
- // required double d = 10;
- if (has_d()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->d(), output);
- }
-
- // required .tests.Enum e = 11;
- if (has_e()) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 11, this->e(), output);
- }
-
- // required .tests.Nested nested = 12;
- if (has_nested()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 12, this->nested(), output);
- }
-
- // repeated string repeated_string = 13;
- for (int i = 0; i < this->repeated_string_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(i).data(), this->repeated_string(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "repeated_string");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 13, this->repeated_string(i), output);
- }
-
- // repeated bytes repeated_bytes = 14;
- for (int i = 0; i < this->repeated_bytes_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 14, this->repeated_bytes(i), output);
- }
-
- // repeated int32 repeated_int32 = 15;
- for (int i = 0; i < this->repeated_int32_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 15, this->repeated_int32(i), output);
- }
-
- // repeated int64 repeated_int64 = 16;
- for (int i = 0; i < this->repeated_int64_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(
- 16, this->repeated_int64(i), output);
- }
-
- // repeated uint32 repeated_uint32 = 17;
- for (int i = 0; i < this->repeated_uint32_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(
- 17, this->repeated_uint32(i), output);
- }
-
- // repeated uint64 repeated_uint64 = 18;
- for (int i = 0; i < this->repeated_uint64_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(
- 18, this->repeated_uint64(i), output);
- }
-
- // repeated sint32 repeated_sint32 = 19;
- for (int i = 0; i < this->repeated_sint32_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(
- 19, this->repeated_sint32(i), output);
- }
-
- // repeated sint64 repeated_sint64 = 20;
- for (int i = 0; i < this->repeated_sint64_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(
- 20, this->repeated_sint64(i), output);
- }
-
- // repeated float repeated_float = 21;
- for (int i = 0; i < this->repeated_float_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(
- 21, this->repeated_float(i), output);
- }
-
- // repeated double repeated_double = 22;
- for (int i = 0; i < this->repeated_double_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(
- 22, this->repeated_double(i), output);
- }
-
- // repeated .tests.Enum repeated_enum = 23;
- for (int i = 0; i < this->repeated_enum_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 23, this->repeated_enum(i), output);
- }
-
- // repeated .tests.Nested repeated_nested = 24;
- for (int i = 0; i < this->repeated_nested_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 24, this->repeated_nested(i), output);
- }
-
- // repeated string empty = 25;
- for (int i = 0; i < this->empty_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->empty(i).data(), this->empty(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "empty");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 25, this->empty(i), output);
- }
-
- // required bool b = 26;
- if (has_b()) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(26, this->b(), output);
- }
-
- // repeated bool repeated_bool = 27;
- for (int i = 0; i < this->repeated_bool_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(
- 27, this->repeated_bool(i), output);
- }
-
- // optional double optional_default = 28 [default = 42];
- if (has_optional_default()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(28, this->optional_default(), output);
- }
-
- // optional double optional_no_default = 29;
- if (has_optional_no_default()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(29, this->optional_no_default(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:tests.Message)
-}
-
-::google::protobuf::uint8* Message::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:tests.Message)
- // required string str = 1;
- if (has_str()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->str().data(), this->str().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "str");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->str(), target);
- }
-
- // required bytes bytes = 2;
- if (has_bytes()) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 2, this->bytes(), target);
- }
-
- // optional int32 int32 = 3;
- if (has_int32()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int32(), target);
- }
-
- // optional int64 int64 = 4;
- if (has_int64()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->int64(), target);
- }
-
- // optional uint32 uint32 = 5;
- if (has_uint32()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->uint32(), target);
- }
-
- // optional uint64 uint64 = 6;
- if (has_uint64()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->uint64(), target);
- }
-
- // optional sint32 sint32 = 7;
- if (has_sint32()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(7, this->sint32(), target);
- }
-
- // optional sint64 sint64 = 8;
- if (has_sint64()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(8, this->sint64(), target);
- }
-
- // required float f = 9;
- if (has_f()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->f(), target);
- }
-
- // required double d = 10;
- if (has_d()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(10, this->d(), target);
- }
-
- // required .tests.Enum e = 11;
- if (has_e()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 11, this->e(), target);
- }
-
- // required .tests.Nested nested = 12;
- if (has_nested()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 12, this->nested(), target);
- }
-
- // repeated string repeated_string = 13;
- for (int i = 0; i < this->repeated_string_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(i).data(), this->repeated_string(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "repeated_string");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(13, this->repeated_string(i), target);
- }
-
- // repeated bytes repeated_bytes = 14;
- for (int i = 0; i < this->repeated_bytes_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBytesToArray(14, this->repeated_bytes(i), target);
- }
-
- // repeated int32 repeated_int32 = 15;
- for (int i = 0; i < this->repeated_int32_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(15, this->repeated_int32(i), target);
- }
-
- // repeated int64 repeated_int64 = 16;
- for (int i = 0; i < this->repeated_int64_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt64ToArray(16, this->repeated_int64(i), target);
- }
-
- // repeated uint32 repeated_uint32 = 17;
- for (int i = 0; i < this->repeated_uint32_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt32ToArray(17, this->repeated_uint32(i), target);
- }
-
- // repeated uint64 repeated_uint64 = 18;
- for (int i = 0; i < this->repeated_uint64_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt64ToArray(18, this->repeated_uint64(i), target);
- }
-
- // repeated sint32 repeated_sint32 = 19;
- for (int i = 0; i < this->repeated_sint32_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt32ToArray(19, this->repeated_sint32(i), target);
- }
-
- // repeated sint64 repeated_sint64 = 20;
- for (int i = 0; i < this->repeated_sint64_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt64ToArray(20, this->repeated_sint64(i), target);
- }
-
- // repeated float repeated_float = 21;
- for (int i = 0; i < this->repeated_float_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFloatToArray(21, this->repeated_float(i), target);
- }
-
- // repeated double repeated_double = 22;
- for (int i = 0; i < this->repeated_double_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteDoubleToArray(22, this->repeated_double(i), target);
- }
-
- // repeated .tests.Enum repeated_enum = 23;
- for (int i = 0; i < this->repeated_enum_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 23, this->repeated_enum(i), target);
- }
-
- // repeated .tests.Nested repeated_nested = 24;
- for (int i = 0; i < this->repeated_nested_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 24, this->repeated_nested(i), target);
- }
-
- // repeated string empty = 25;
- for (int i = 0; i < this->empty_size(); i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->empty(i).data(), this->empty(i).length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "empty");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(25, this->empty(i), target);
- }
-
- // required bool b = 26;
- if (has_b()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(26, this->b(), target);
- }
-
- // repeated bool repeated_bool = 27;
- for (int i = 0; i < this->repeated_bool_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBoolToArray(27, this->repeated_bool(i), target);
- }
-
- // optional double optional_default = 28 [default = 42];
- if (has_optional_default()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(28, this->optional_default(), target);
- }
-
- // optional double optional_no_default = 29;
- if (has_optional_no_default()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(29, this->optional_no_default(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:tests.Message)
- return target;
-}
-
-int Message::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required bool b = 26;
- if (has_b()) {
- total_size += 2 + 1;
- }
-
- // required string str = 1;
- if (has_str()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str());
- }
-
- // required bytes bytes = 2;
- if (has_bytes()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->bytes());
- }
-
- // optional int32 int32 = 3;
- if (has_int32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->int32());
- }
-
- // optional int64 int64 = 4;
- if (has_int64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->int64());
- }
-
- // optional uint32 uint32 = 5;
- if (has_uint32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->uint32());
- }
-
- // optional uint64 uint64 = 6;
- if (has_uint64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->uint64());
- }
-
- // optional sint32 sint32 = 7;
- if (has_sint32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
- this->sint32());
- }
-
- }
- if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
- // optional sint64 sint64 = 8;
- if (has_sint64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt64Size(
- this->sint64());
- }
-
- // required float f = 9;
- if (has_f()) {
- total_size += 1 + 4;
- }
-
- // required double d = 10;
- if (has_d()) {
- total_size += 1 + 8;
- }
-
- // required .tests.Enum e = 11;
- if (has_e()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->e());
- }
-
- // required .tests.Nested nested = 12;
- if (has_nested()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->nested());
- }
-
- }
- if (_has_bits_[27 / 32] & (0xffu << (27 % 32))) {
- // optional double optional_default = 28 [default = 42];
- if (has_optional_default()) {
- total_size += 2 + 8;
- }
-
- // optional double optional_no_default = 29;
- if (has_optional_no_default()) {
- total_size += 2 + 8;
- }
-
- }
- // repeated bool repeated_bool = 27;
- {
- int data_size = 0;
- data_size = 1 * this->repeated_bool_size();
- total_size += 2 * this->repeated_bool_size() + data_size;
- }
-
- // repeated string repeated_string = 13;
- total_size += 1 * this->repeated_string_size();
- for (int i = 0; i < this->repeated_string_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_string(i));
- }
-
- // repeated bytes repeated_bytes = 14;
- total_size += 1 * this->repeated_bytes_size();
- for (int i = 0; i < this->repeated_bytes_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->repeated_bytes(i));
- }
-
- // repeated int32 repeated_int32 = 15;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_int32_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->repeated_int32(i));
- }
- total_size += 1 * this->repeated_int32_size() + data_size;
- }
-
- // repeated int64 repeated_int64 = 16;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_int64_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->repeated_int64(i));
- }
- total_size += 2 * this->repeated_int64_size() + data_size;
- }
-
- // repeated uint32 repeated_uint32 = 17;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_uint32_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->repeated_uint32(i));
- }
- total_size += 2 * this->repeated_uint32_size() + data_size;
- }
-
- // repeated uint64 repeated_uint64 = 18;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_uint64_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->repeated_uint64(i));
- }
- total_size += 2 * this->repeated_uint64_size() + data_size;
- }
-
- // repeated sint32 repeated_sint32 = 19;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_sint32_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->repeated_sint32(i));
- }
- total_size += 2 * this->repeated_sint32_size() + data_size;
- }
-
- // repeated sint64 repeated_sint64 = 20;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_sint64_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->repeated_sint64(i));
- }
- total_size += 2 * this->repeated_sint64_size() + data_size;
- }
-
- // repeated float repeated_float = 21;
- {
- int data_size = 0;
- data_size = 4 * this->repeated_float_size();
- total_size += 2 * this->repeated_float_size() + data_size;
- }
-
- // repeated double repeated_double = 22;
- {
- int data_size = 0;
- data_size = 8 * this->repeated_double_size();
- total_size += 2 * this->repeated_double_size() + data_size;
- }
-
- // repeated .tests.Enum repeated_enum = 23;
- {
- int data_size = 0;
- for (int i = 0; i < this->repeated_enum_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_enum(i));
- }
- total_size += 2 * this->repeated_enum_size() + data_size;
- }
-
- // repeated .tests.Nested repeated_nested = 24;
- total_size += 2 * this->repeated_nested_size();
- for (int i = 0; i < this->repeated_nested_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->repeated_nested(i));
- }
-
- // repeated string empty = 25;
- total_size += 2 * this->empty_size();
- for (int i = 0; i < this->empty_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->empty(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Message::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const Message* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Message*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Message::MergeFrom(const Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- repeated_bool_.MergeFrom(from.repeated_bool_);
- repeated_string_.MergeFrom(from.repeated_string_);
- repeated_bytes_.MergeFrom(from.repeated_bytes_);
- repeated_int32_.MergeFrom(from.repeated_int32_);
- repeated_int64_.MergeFrom(from.repeated_int64_);
- repeated_uint32_.MergeFrom(from.repeated_uint32_);
- repeated_uint64_.MergeFrom(from.repeated_uint64_);
- repeated_sint32_.MergeFrom(from.repeated_sint32_);
- repeated_sint64_.MergeFrom(from.repeated_sint64_);
- repeated_float_.MergeFrom(from.repeated_float_);
- repeated_double_.MergeFrom(from.repeated_double_);
- repeated_enum_.MergeFrom(from.repeated_enum_);
- repeated_nested_.MergeFrom(from.repeated_nested_);
- empty_.MergeFrom(from.empty_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_b()) {
- set_b(from.b());
- }
- if (from.has_str()) {
- set_str(from.str());
- }
- if (from.has_bytes()) {
- set_bytes(from.bytes());
- }
- if (from.has_int32()) {
- set_int32(from.int32());
- }
- if (from.has_int64()) {
- set_int64(from.int64());
- }
- if (from.has_uint32()) {
- set_uint32(from.uint32());
- }
- if (from.has_uint64()) {
- set_uint64(from.uint64());
- }
- if (from.has_sint32()) {
- set_sint32(from.sint32());
- }
- }
- if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
- if (from.has_sint64()) {
- set_sint64(from.sint64());
- }
- if (from.has_f()) {
- set_f(from.f());
- }
- if (from.has_d()) {
- set_d(from.d());
- }
- if (from.has_e()) {
- set_e(from.e());
- }
- if (from.has_nested()) {
- mutable_nested()->::tests::Nested::MergeFrom(from.nested());
- }
- }
- if (from._has_bits_[27 / 32] & (0xffu << (27 % 32))) {
- if (from.has_optional_default()) {
- set_optional_default(from.optional_default());
- }
- if (from.has_optional_no_default()) {
- set_optional_no_default(from.optional_no_default());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Message::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Message::CopyFrom(const Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Message::IsInitialized() const {
- if ((_has_bits_[0] & 0x00001e07) != 0x00001e07) return false;
-
- if (has_nested()) {
- if (!this->nested().IsInitialized()) return false;
- }
- if (!::google::protobuf::internal::AllAreInitialized(this->repeated_nested())) return false;
- return true;
-}
-
-void Message::Swap(Message* other) {
- if (other != this) {
- std::swap(b_, other->b_);
- std::swap(str_, other->str_);
- std::swap(bytes_, other->bytes_);
- std::swap(int32_, other->int32_);
- std::swap(int64_, other->int64_);
- std::swap(uint32_, other->uint32_);
- std::swap(uint64_, other->uint64_);
- std::swap(sint32_, other->sint32_);
- std::swap(sint64_, other->sint64_);
- std::swap(f_, other->f_);
- std::swap(d_, other->d_);
- std::swap(e_, other->e_);
- std::swap(nested_, other->nested_);
- repeated_bool_.Swap(&other->repeated_bool_);
- repeated_string_.Swap(&other->repeated_string_);
- repeated_bytes_.Swap(&other->repeated_bytes_);
- repeated_int32_.Swap(&other->repeated_int32_);
- repeated_int64_.Swap(&other->repeated_int64_);
- repeated_uint32_.Swap(&other->repeated_uint32_);
- repeated_uint64_.Swap(&other->repeated_uint64_);
- repeated_sint32_.Swap(&other->repeated_sint32_);
- repeated_sint64_.Swap(&other->repeated_sint64_);
- repeated_float_.Swap(&other->repeated_float_);
- repeated_double_.Swap(&other->repeated_double_);
- repeated_enum_.Swap(&other->repeated_enum_);
- repeated_nested_.Swap(&other->repeated_nested_);
- empty_.Swap(&other->empty_);
- std::swap(optional_default_, other->optional_default_);
- std::swap(optional_no_default_, other->optional_no_default_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata Message::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = Message_descriptor_;
- metadata.reflection = Message_reflection_;
- return metadata;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int ArrayMessage::kValuesFieldNumber;
-#endif // !_MSC_VER
-
-ArrayMessage::ArrayMessage()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:tests.ArrayMessage)
-}
-
-void ArrayMessage::InitAsDefaultInstance() {
-}
-
-ArrayMessage::ArrayMessage(const ArrayMessage& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:tests.ArrayMessage)
-}
-
-void ArrayMessage::SharedCtor() {
- _cached_size_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-ArrayMessage::~ArrayMessage() {
- // @@protoc_insertion_point(destructor:tests.ArrayMessage)
- SharedDtor();
-}
-
-void ArrayMessage::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void ArrayMessage::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ArrayMessage::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return ArrayMessage_descriptor_;
-}
-
-const ArrayMessage& ArrayMessage::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
- return *default_instance_;
-}
-
-ArrayMessage* ArrayMessage::default_instance_ = NULL;
-
-ArrayMessage* ArrayMessage::New() const {
- return new ArrayMessage;
-}
-
-void ArrayMessage::Clear() {
- values_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool ArrayMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:tests.ArrayMessage)
- for (;;) {
- ::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 .tests.SimpleMessage values = 1;
- case 1: {
- if (tag == 10) {
- parse_values:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_values()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(10)) goto parse_values;
- if (input->ExpectAtEnd()) goto success;
- 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:tests.ArrayMessage)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:tests.ArrayMessage)
- return false;
-#undef DO_
-}
-
-void ArrayMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:tests.ArrayMessage)
- // repeated .tests.SimpleMessage values = 1;
- for (int i = 0; i < this->values_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->values(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:tests.ArrayMessage)
-}
-
-::google::protobuf::uint8* ArrayMessage::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:tests.ArrayMessage)
- // repeated .tests.SimpleMessage values = 1;
- for (int i = 0; i < this->values_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 1, this->values(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:tests.ArrayMessage)
- return target;
-}
-
-int ArrayMessage::ByteSize() const {
- int total_size = 0;
-
- // repeated .tests.SimpleMessage values = 1;
- total_size += 1 * this->values_size();
- for (int i = 0; i < this->values_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->values(i));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ArrayMessage::MergeFrom(const ::google::protobuf::Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- const ArrayMessage* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const ArrayMessage*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void ArrayMessage::MergeFrom(const ArrayMessage& from) {
- GOOGLE_CHECK_NE(&from, this);
- values_.MergeFrom(from.values_);
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void ArrayMessage::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ArrayMessage::CopyFrom(const ArrayMessage& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool ArrayMessage::IsInitialized() const {
-
- if (!::google::protobuf::internal::AllAreInitialized(this->values())) return false;
- return true;
-}
-
-void ArrayMessage::Swap(ArrayMessage* other) {
- if (other != this) {
- values_.Swap(&other->values_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::google::protobuf::Metadata ArrayMessage::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = ArrayMessage_descriptor_;
- metadata.reflection = ArrayMessage_reflection_;
-
<TRUNCATED>