You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/01/14 21:04:53 UTC
[02/15] git commit: Upgraded stout to protobuf 2.5.0.
Upgraded stout to protobuf 2.5.0.
Review: https://reviews.apache.org/r/16652
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2cf87851
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2cf87851
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2cf87851
Branch: refs/heads/master
Commit: 2cf878513fb5fdb1fe0e34df51c42916da5c29e6
Parents: bdc372d
Author: Benjamin Hindman <be...@gmail.com>
Authored: Mon Dec 30 11:15:02 2013 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Mon Jan 13 23:38:54 2014 -0800
----------------------------------------------------------------------
.../3rdparty/stout/tests/protobuf_tests.pb.cc | 242 ++++++++++---------
.../3rdparty/stout/tests/protobuf_tests.pb.h | 215 +++++++++-------
2 files changed, 257 insertions(+), 200 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2cf87851/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
index ecf34e1..ca01feb 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc
+++ b/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc
@@ -1,14 +1,17 @@
// 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)
@@ -154,7 +157,6 @@ struct 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_;
@@ -219,7 +221,8 @@ const ::google::protobuf::Descriptor* Nested::descriptor() {
}
const Nested& Nested::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto(); return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
+ return *default_instance_;
}
Nested* Nested::default_instance_ = NULL;
@@ -261,7 +264,7 @@ bool Nested::MergePartialFromCodedStream(
if (input->ExpectAtEnd()) return true;
break;
}
-
+
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -288,7 +291,7 @@ void Nested::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->str(), output);
}
-
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -306,7 +309,7 @@ void Nested::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->str(), target);
}
-
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -316,7 +319,7 @@ void Nested::SerializeWithCachedSizes(
int Nested::ByteSize() const {
int total_size = 0;
-
+
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string str = 1;
if (has_str()) {
@@ -324,7 +327,7 @@ int Nested::ByteSize() const {
::google::protobuf::internal::WireFormatLite::StringSize(
this->str());
}
-
+
}
if (!unknown_fields().empty()) {
total_size +=
@@ -372,7 +375,7 @@ void Nested::CopyFrom(const Nested& from) {
}
bool Nested::IsInitialized() const {
-
+
return true;
}
@@ -483,7 +486,8 @@ const ::google::protobuf::Descriptor* Message::descriptor() {
}
const Message& Message::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto(); return *default_instance_;
+ if (default_instance_ == NULL) protobuf_AddDesc_protobuf_5ftests_2eproto();
+ return *default_instance_;
}
Message* Message::default_instance_ = NULL;
@@ -557,7 +561,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(18)) goto parse_bytes;
break;
}
-
+
// required bytes bytes = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -571,7 +575,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(24)) goto parse_int32;
break;
}
-
+
// optional int32 int32 = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -587,7 +591,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(32)) goto parse_int64;
break;
}
-
+
// optional int64 int64 = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -603,7 +607,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(40)) goto parse_uint32;
break;
}
-
+
// optional uint32 uint32 = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -619,7 +623,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(48)) goto parse_uint64;
break;
}
-
+
// optional uint64 uint64 = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -635,7 +639,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(56)) goto parse_sint32;
break;
}
-
+
// optional sint32 sint32 = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -651,7 +655,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(64)) goto parse_sint64;
break;
}
-
+
// optional sint64 sint64 = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -667,7 +671,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(77)) goto parse_f;
break;
}
-
+
// required float f = 9;
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -683,7 +687,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(81)) goto parse_d;
break;
}
-
+
// required double d = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -699,7 +703,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(88)) goto parse_e;
break;
}
-
+
// required .tests.Enum e = 11;
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -709,8 +713,8 @@ bool Message::MergePartialFromCodedStream(
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));
+ if (::tests::Enum_IsValid(value)) {
+ set_e(static_cast< ::tests::Enum >(value));
} else {
mutable_unknown_fields()->AddVarint(11, value);
}
@@ -720,7 +724,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(98)) goto parse_nested;
break;
}
-
+
// required .tests.Nested nested = 12;
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -734,7 +738,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(106)) goto parse_repeated_string;
break;
}
-
+
// repeated string repeated_string = 13;
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -743,7 +747,8 @@ bool Message::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_repeated_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
- this->repeated_string(0).data(), this->repeated_string(0).length(),
+ this->repeated_string(this->repeated_string_size() - 1).data(),
+ this->repeated_string(this->repeated_string_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
@@ -752,7 +757,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(114)) goto parse_repeated_bytes;
break;
}
-
+
// repeated bytes repeated_bytes = 14;
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -767,7 +772,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(120)) goto parse_repeated_int32;
break;
}
-
+
// repeated int32 repeated_int32 = 15;
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -789,7 +794,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(128)) goto parse_repeated_int64;
break;
}
-
+
// repeated int64 repeated_int64 = 16;
case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -811,7 +816,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(136)) goto parse_repeated_uint32;
break;
}
-
+
// repeated uint32 repeated_uint32 = 17;
case 17: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -833,7 +838,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(144)) goto parse_repeated_uint64;
break;
}
-
+
// repeated uint64 repeated_uint64 = 18;
case 18: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -855,7 +860,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(152)) goto parse_repeated_sint32;
break;
}
-
+
// repeated sint32 repeated_sint32 = 19;
case 19: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -877,7 +882,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(160)) goto parse_repeated_sint64;
break;
}
-
+
// repeated sint64 repeated_sint64 = 20;
case 20: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -899,7 +904,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(173)) goto parse_repeated_float;
break;
}
-
+
// repeated float repeated_float = 21;
case 21: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -921,7 +926,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(177)) goto parse_repeated_double;
break;
}
-
+
// repeated double repeated_double = 22;
case 22: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -943,7 +948,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(184)) goto parse_repeated_enum;
break;
}
-
+
// repeated .tests.Enum repeated_enum = 23;
case 23: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -953,8 +958,8 @@ bool Message::MergePartialFromCodedStream(
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));
+ if (::tests::Enum_IsValid(value)) {
+ add_repeated_enum(static_cast< ::tests::Enum >(value));
} else {
mutable_unknown_fields()->AddVarint(23, value);
}
@@ -963,7 +968,7 @@ bool Message::MergePartialFromCodedStream(
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumNoInline(
input,
- &tests::Enum_IsValid,
+ &::tests::Enum_IsValid,
this->mutable_repeated_enum())));
} else {
goto handle_uninterpreted;
@@ -972,7 +977,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(194)) goto parse_repeated_nested;
break;
}
-
+
// repeated .tests.Nested repeated_nested = 24;
case 24: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -987,7 +992,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectTag(202)) goto parse_empty;
break;
}
-
+
// repeated string empty = 25;
case 25: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -996,7 +1001,8 @@ bool Message::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_empty()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
- this->empty(0).data(), this->empty(0).length(),
+ this->empty(this->empty_size() - 1).data(),
+ this->empty(this->empty_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
@@ -1005,7 +1011,7 @@ bool Message::MergePartialFromCodedStream(
if (input->ExpectAtEnd()) return true;
break;
}
-
+
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -1032,65 +1038,65 @@ void Message::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->str(), output);
}
-
+
// required bytes bytes = 2;
if (has_bytes()) {
::google::protobuf::internal::WireFormatLite::WriteBytes(
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::VerifyUTF8String(
@@ -1099,73 +1105,73 @@ void Message::SerializeWithCachedSizes(
::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::VerifyUTF8String(
@@ -1174,7 +1180,7 @@ void Message::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteString(
25, this->empty(i), output);
}
-
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -1192,67 +1198,67 @@ void Message::SerializeWithCachedSizes(
::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::VerifyUTF8String(
@@ -1261,74 +1267,74 @@ void Message::SerializeWithCachedSizes(
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::VerifyUTF8String(
@@ -1337,7 +1343,7 @@ void Message::SerializeWithCachedSizes(
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(25, this->empty(i), target);
}
-
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -1347,7 +1353,7 @@ void Message::SerializeWithCachedSizes(
int Message::ByteSize() const {
int total_size = 0;
-
+
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string str = 1;
if (has_str()) {
@@ -1355,81 +1361,81 @@ int Message::ByteSize() const {
::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());
}
-
+
// optional sint64 sint64 = 8;
if (has_sint64()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::SInt64Size(
this->sint64());
}
-
+
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
// 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());
}
-
+
}
// repeated string repeated_string = 13;
total_size += 1 * this->repeated_string_size();
@@ -1437,14 +1443,14 @@ int Message::ByteSize() const {
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;
@@ -1454,7 +1460,7 @@ int Message::ByteSize() const {
}
total_size += 1 * this->repeated_int32_size() + data_size;
}
-
+
// repeated int64 repeated_int64 = 16;
{
int data_size = 0;
@@ -1464,7 +1470,7 @@ int Message::ByteSize() const {
}
total_size += 2 * this->repeated_int64_size() + data_size;
}
-
+
// repeated uint32 repeated_uint32 = 17;
{
int data_size = 0;
@@ -1474,7 +1480,7 @@ int Message::ByteSize() const {
}
total_size += 2 * this->repeated_uint32_size() + data_size;
}
-
+
// repeated uint64 repeated_uint64 = 18;
{
int data_size = 0;
@@ -1484,7 +1490,7 @@ int Message::ByteSize() const {
}
total_size += 2 * this->repeated_uint64_size() + data_size;
}
-
+
// repeated sint32 repeated_sint32 = 19;
{
int data_size = 0;
@@ -1494,7 +1500,7 @@ int Message::ByteSize() const {
}
total_size += 2 * this->repeated_sint32_size() + data_size;
}
-
+
// repeated sint64 repeated_sint64 = 20;
{
int data_size = 0;
@@ -1504,21 +1510,21 @@ int Message::ByteSize() const {
}
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;
@@ -1528,7 +1534,7 @@ int Message::ByteSize() const {
}
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++) {
@@ -1536,14 +1542,14 @@ int Message::ByteSize() const {
::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(
@@ -1639,7 +1645,7 @@ void Message::CopyFrom(const Message& from) {
bool Message::IsInitialized() const {
if ((_has_bits_[0] & 0x00000f03) != 0x00000f03) return false;
-
+
return true;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/2cf87851/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h b/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h
index aef5b29..c155133 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h
+++ b/3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h
@@ -8,21 +8,23 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2004000
+#if GOOGLE_PROTOBUF_VERSION < 2005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
-#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
namespace tests {
@@ -60,29 +62,29 @@ class Nested : public ::google::protobuf::Message {
public:
Nested();
virtual ~Nested();
-
+
Nested(const Nested& from);
-
+
inline Nested& operator=(const Nested& from) {
CopyFrom(from);
return *this;
}
-
+
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
-
+
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
-
+
static const ::google::protobuf::Descriptor* descriptor();
static const Nested& default_instance();
-
+
void Swap(Nested* other);
-
+
// implements Message ----------------------------------------------
-
+
Nested* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
@@ -90,7 +92,7 @@ class Nested : public ::google::protobuf::Message {
void MergeFrom(const Nested& from);
void Clear();
bool IsInitialized() const;
-
+
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
@@ -103,13 +105,13 @@ class Nested : public ::google::protobuf::Message {
void SharedDtor();
void SetCachedSize(int size) const;
public:
-
+
::google::protobuf::Metadata GetMetadata() const;
-
+
// nested types ----------------------------------------------------
-
+
// accessors -------------------------------------------------------
-
+
// optional string str = 1;
inline bool has_str() const;
inline void clear_str();
@@ -120,23 +122,24 @@ class Nested : public ::google::protobuf::Message {
inline void set_str(const char* value, size_t size);
inline ::std::string* mutable_str();
inline ::std::string* release_str();
-
+ inline void set_allocated_str(::std::string* str);
+
// @@protoc_insertion_point(class_scope:tests.Nested)
private:
inline void set_has_str();
inline void clear_has_str();
-
+
::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+
::std::string* str_;
-
+
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
-
+
friend void protobuf_AddDesc_protobuf_5ftests_2eproto();
friend void protobuf_AssignDesc_protobuf_5ftests_2eproto();
friend void protobuf_ShutdownFile_protobuf_5ftests_2eproto();
-
+
void InitAsDefaultInstance();
static Nested* default_instance_;
};
@@ -146,29 +149,29 @@ class Message : public ::google::protobuf::Message {
public:
Message();
virtual ~Message();
-
+
Message(const Message& from);
-
+
inline Message& operator=(const Message& from) {
CopyFrom(from);
return *this;
}
-
+
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _unknown_fields_;
}
-
+
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return &_unknown_fields_;
}
-
+
static const ::google::protobuf::Descriptor* descriptor();
static const Message& default_instance();
-
+
void Swap(Message* other);
-
+
// implements Message ----------------------------------------------
-
+
Message* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
@@ -176,7 +179,7 @@ class Message : public ::google::protobuf::Message {
void MergeFrom(const Message& from);
void Clear();
bool IsInitialized() const;
-
+
int ByteSize() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
@@ -189,13 +192,13 @@ class Message : public ::google::protobuf::Message {
void SharedDtor();
void SetCachedSize(int size) const;
public:
-
+
::google::protobuf::Metadata GetMetadata() const;
-
+
// nested types ----------------------------------------------------
-
+
// accessors -------------------------------------------------------
-
+
// required string str = 1;
inline bool has_str() const;
inline void clear_str();
@@ -206,7 +209,8 @@ class Message : public ::google::protobuf::Message {
inline void set_str(const char* value, size_t size);
inline ::std::string* mutable_str();
inline ::std::string* release_str();
-
+ inline void set_allocated_str(::std::string* str);
+
// required bytes bytes = 2;
inline bool has_bytes() const;
inline void clear_bytes();
@@ -217,70 +221,71 @@ class Message : public ::google::protobuf::Message {
inline void set_bytes(const void* value, size_t size);
inline ::std::string* mutable_bytes();
inline ::std::string* release_bytes();
-
+ inline void set_allocated_bytes(::std::string* bytes);
+
// optional int32 int32 = 3;
inline bool has_int32() const;
inline void clear_int32();
static const int kInt32FieldNumber = 3;
inline ::google::protobuf::int32 int32() const;
inline void set_int32(::google::protobuf::int32 value);
-
+
// optional int64 int64 = 4;
inline bool has_int64() const;
inline void clear_int64();
static const int kInt64FieldNumber = 4;
inline ::google::protobuf::int64 int64() const;
inline void set_int64(::google::protobuf::int64 value);
-
+
// optional uint32 uint32 = 5;
inline bool has_uint32() const;
inline void clear_uint32();
static const int kUint32FieldNumber = 5;
inline ::google::protobuf::uint32 uint32() const;
inline void set_uint32(::google::protobuf::uint32 value);
-
+
// optional uint64 uint64 = 6;
inline bool has_uint64() const;
inline void clear_uint64();
static const int kUint64FieldNumber = 6;
inline ::google::protobuf::uint64 uint64() const;
inline void set_uint64(::google::protobuf::uint64 value);
-
+
// optional sint32 sint32 = 7;
inline bool has_sint32() const;
inline void clear_sint32();
static const int kSint32FieldNumber = 7;
inline ::google::protobuf::int32 sint32() const;
inline void set_sint32(::google::protobuf::int32 value);
-
+
// optional sint64 sint64 = 8;
inline bool has_sint64() const;
inline void clear_sint64();
static const int kSint64FieldNumber = 8;
inline ::google::protobuf::int64 sint64() const;
inline void set_sint64(::google::protobuf::int64 value);
-
+
// required float f = 9;
inline bool has_f() const;
inline void clear_f();
static const int kFFieldNumber = 9;
inline float f() const;
inline void set_f(float value);
-
+
// required double d = 10;
inline bool has_d() const;
inline void clear_d();
static const int kDFieldNumber = 10;
inline double d() const;
inline void set_d(double value);
-
+
// required .tests.Enum e = 11;
inline bool has_e() const;
inline void clear_e();
static const int kEFieldNumber = 11;
- inline tests::Enum e() const;
- inline void set_e(tests::Enum value);
-
+ inline ::tests::Enum e() const;
+ inline void set_e(::tests::Enum value);
+
// required .tests.Nested nested = 12;
inline bool has_nested() const;
inline void clear_nested();
@@ -288,7 +293,8 @@ class Message : public ::google::protobuf::Message {
inline const ::tests::Nested& nested() const;
inline ::tests::Nested* mutable_nested();
inline ::tests::Nested* release_nested();
-
+ inline void set_allocated_nested(::tests::Nested* nested);
+
// repeated string repeated_string = 13;
inline int repeated_string_size() const;
inline void clear_repeated_string();
@@ -304,7 +310,7 @@ class Message : public ::google::protobuf::Message {
inline void add_repeated_string(const char* value, size_t size);
inline const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_string() const;
inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_string();
-
+
// repeated bytes repeated_bytes = 14;
inline int repeated_bytes_size() const;
inline void clear_repeated_bytes();
@@ -320,7 +326,7 @@ class Message : public ::google::protobuf::Message {
inline void add_repeated_bytes(const void* value, size_t size);
inline const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_bytes() const;
inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_bytes();
-
+
// repeated int32 repeated_int32 = 15;
inline int repeated_int32_size() const;
inline void clear_repeated_int32();
@@ -332,7 +338,7 @@ class Message : public ::google::protobuf::Message {
repeated_int32() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_repeated_int32();
-
+
// repeated int64 repeated_int64 = 16;
inline int repeated_int64_size() const;
inline void clear_repeated_int64();
@@ -344,7 +350,7 @@ class Message : public ::google::protobuf::Message {
repeated_int64() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
mutable_repeated_int64();
-
+
// repeated uint32 repeated_uint32 = 17;
inline int repeated_uint32_size() const;
inline void clear_repeated_uint32();
@@ -356,7 +362,7 @@ class Message : public ::google::protobuf::Message {
repeated_uint32() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
mutable_repeated_uint32();
-
+
// repeated uint64 repeated_uint64 = 18;
inline int repeated_uint64_size() const;
inline void clear_repeated_uint64();
@@ -368,7 +374,7 @@ class Message : public ::google::protobuf::Message {
repeated_uint64() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
mutable_repeated_uint64();
-
+
// repeated sint32 repeated_sint32 = 19;
inline int repeated_sint32_size() const;
inline void clear_repeated_sint32();
@@ -380,7 +386,7 @@ class Message : public ::google::protobuf::Message {
repeated_sint32() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
mutable_repeated_sint32();
-
+
// repeated sint64 repeated_sint64 = 20;
inline int repeated_sint64_size() const;
inline void clear_repeated_sint64();
@@ -392,7 +398,7 @@ class Message : public ::google::protobuf::Message {
repeated_sint64() const;
inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
mutable_repeated_sint64();
-
+
// repeated float repeated_float = 21;
inline int repeated_float_size() const;
inline void clear_repeated_float();
@@ -404,7 +410,7 @@ class Message : public ::google::protobuf::Message {
repeated_float() const;
inline ::google::protobuf::RepeatedField< float >*
mutable_repeated_float();
-
+
// repeated double repeated_double = 22;
inline int repeated_double_size() const;
inline void clear_repeated_double();
@@ -416,17 +422,17 @@ class Message : public ::google::protobuf::Message {
repeated_double() const;
inline ::google::protobuf::RepeatedField< double >*
mutable_repeated_double();
-
+
// repeated .tests.Enum repeated_enum = 23;
inline int repeated_enum_size() const;
inline void clear_repeated_enum();
static const int kRepeatedEnumFieldNumber = 23;
- inline tests::Enum repeated_enum(int index) const;
- inline void set_repeated_enum(int index, tests::Enum value);
- inline void add_repeated_enum(tests::Enum value);
+ inline ::tests::Enum repeated_enum(int index) const;
+ inline void set_repeated_enum(int index, ::tests::Enum value);
+ inline void add_repeated_enum(::tests::Enum value);
inline const ::google::protobuf::RepeatedField<int>& repeated_enum() const;
inline ::google::protobuf::RepeatedField<int>* mutable_repeated_enum();
-
+
// repeated .tests.Nested repeated_nested = 24;
inline int repeated_nested_size() const;
inline void clear_repeated_nested();
@@ -438,7 +444,7 @@ class Message : public ::google::protobuf::Message {
repeated_nested() const;
inline ::google::protobuf::RepeatedPtrField< ::tests::Nested >*
mutable_repeated_nested();
-
+
// repeated string empty = 25;
inline int empty_size() const;
inline void clear_empty();
@@ -454,7 +460,7 @@ class Message : public ::google::protobuf::Message {
inline void add_empty(const char* value, size_t size);
inline const ::google::protobuf::RepeatedPtrField< ::std::string>& empty() const;
inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_empty();
-
+
// @@protoc_insertion_point(class_scope:tests.Message)
private:
inline void set_has_str();
@@ -481,9 +487,9 @@ class Message : public ::google::protobuf::Message {
inline void clear_has_e();
inline void set_has_nested();
inline void clear_has_nested();
-
+
::google::protobuf::UnknownFieldSet _unknown_fields_;
-
+
::std::string* str_;
::std::string* bytes_;
::google::protobuf::int64 int64_;
@@ -509,14 +515,14 @@ class Message : public ::google::protobuf::Message {
::google::protobuf::RepeatedPtrField< ::tests::Nested > repeated_nested_;
::google::protobuf::RepeatedPtrField< ::std::string> empty_;
int e_;
-
+
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(25 + 31) / 32];
-
+
friend void protobuf_AddDesc_protobuf_5ftests_2eproto();
friend void protobuf_AssignDesc_protobuf_5ftests_2eproto();
friend void protobuf_ShutdownFile_protobuf_5ftests_2eproto();
-
+
void InitAsDefaultInstance();
static Message* default_instance_;
};
@@ -584,6 +590,18 @@ inline ::std::string* Nested::release_str() {
return temp;
}
}
+inline void Nested::set_allocated_str(::std::string* str) {
+ if (str_ != &::google::protobuf::internal::kEmptyString) {
+ delete str_;
+ }
+ if (str) {
+ set_has_str();
+ str_ = str;
+ } else {
+ clear_has_str();
+ str_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
// -------------------------------------------------------------------
@@ -646,6 +664,18 @@ inline ::std::string* Message::release_str() {
return temp;
}
}
+inline void Message::set_allocated_str(::std::string* str) {
+ if (str_ != &::google::protobuf::internal::kEmptyString) {
+ delete str_;
+ }
+ if (str) {
+ set_has_str();
+ str_ = str;
+ } else {
+ clear_has_str();
+ str_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
// required bytes bytes = 2;
inline bool Message::has_bytes() const {
@@ -704,6 +734,18 @@ inline ::std::string* Message::release_bytes() {
return temp;
}
}
+inline void Message::set_allocated_bytes(::std::string* bytes) {
+ if (bytes_ != &::google::protobuf::internal::kEmptyString) {
+ delete bytes_;
+ }
+ if (bytes) {
+ set_has_bytes();
+ bytes_ = bytes;
+ } else {
+ clear_has_bytes();
+ bytes_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
// optional int32 int32 = 3;
inline bool Message::has_int32() const {
@@ -895,11 +937,11 @@ inline void Message::clear_e() {
e_ = 1;
clear_has_e();
}
-inline tests::Enum Message::e() const {
- return static_cast< tests::Enum >(e_);
+inline ::tests::Enum Message::e() const {
+ return static_cast< ::tests::Enum >(e_);
}
-inline void Message::set_e(tests::Enum value) {
- GOOGLE_DCHECK(tests::Enum_IsValid(value));
+inline void Message::set_e(::tests::Enum value) {
+ assert(::tests::Enum_IsValid(value));
set_has_e();
e_ = value;
}
@@ -932,6 +974,15 @@ inline ::tests::Nested* Message::release_nested() {
nested_ = NULL;
return temp;
}
+inline void Message::set_allocated_nested(::tests::Nested* nested) {
+ delete nested_;
+ nested_ = nested;
+ if (nested) {
+ set_has_nested();
+ } else {
+ clear_has_nested();
+ }
+}
// repeated string repeated_string = 13;
inline int Message::repeated_string_size() const {
@@ -1228,15 +1279,15 @@ inline int Message::repeated_enum_size() const {
inline void Message::clear_repeated_enum() {
repeated_enum_.Clear();
}
-inline tests::Enum Message::repeated_enum(int index) const {
- return static_cast< tests::Enum >(repeated_enum_.Get(index));
+inline ::tests::Enum Message::repeated_enum(int index) const {
+ return static_cast< ::tests::Enum >(repeated_enum_.Get(index));
}
-inline void Message::set_repeated_enum(int index, tests::Enum value) {
- GOOGLE_DCHECK(tests::Enum_IsValid(value));
+inline void Message::set_repeated_enum(int index, ::tests::Enum value) {
+ assert(::tests::Enum_IsValid(value));
repeated_enum_.Set(index, value);
}
-inline void Message::add_repeated_enum(tests::Enum value) {
- GOOGLE_DCHECK(tests::Enum_IsValid(value));
+inline void Message::add_repeated_enum(::tests::Enum value) {
+ assert(::tests::Enum_IsValid(value));
repeated_enum_.Add(value);
}
inline const ::google::protobuf::RepeatedField<int>&
@@ -1327,8 +1378,8 @@ namespace google {
namespace protobuf {
template <>
-inline const EnumDescriptor* GetEnumDescriptor< tests::Enum>() {
- return tests::Enum_descriptor();
+inline const EnumDescriptor* GetEnumDescriptor< ::tests::Enum>() {
+ return ::tests::Enum_descriptor();
}
} // namespace google