1529 lines
56 KiB
C++
1529 lines
56 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: ProtoOption.proto
|
|
|
|
#include "ProtoOption.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/wire_format_lite.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)
|
|
#include <google/protobuf/port_def.inc>
|
|
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
|
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
|
namespace _pbi = _pb::internal;
|
|
|
|
namespace OPTIONTEST {
|
|
PROTOBUF_CONSTEXPR AdditionOption::AdditionOption(
|
|
::_pbi::ConstantInitialized)
|
|
: s_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
|
|
, d_(0)
|
|
, n_(0)
|
|
, b_(false){}
|
|
struct AdditionOptionDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR AdditionOptionDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~AdditionOptionDefaultTypeInternal() {}
|
|
union {
|
|
AdditionOption _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AdditionOptionDefaultTypeInternal _AdditionOption_default_instance_;
|
|
PROTOBUF_CONSTEXPR Non_Option_Message::Non_Option_Message(
|
|
::_pbi::ConstantInitialized)
|
|
: sourceid_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
|
|
, fcff_(nullptr)
|
|
, id_(0)
|
|
, b_(false)
|
|
, d_(0){}
|
|
struct Non_Option_MessageDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR Non_Option_MessageDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~Non_Option_MessageDefaultTypeInternal() {}
|
|
union {
|
|
Non_Option_Message _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Non_Option_MessageDefaultTypeInternal _Non_Option_Message_default_instance_;
|
|
PROTOBUF_CONSTEXPR Single_Option_Message::Single_Option_Message(
|
|
::_pbi::ConstantInitialized)
|
|
: sourceid_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
|
|
, fcff_(nullptr)
|
|
, id_(0)
|
|
, b_(false)
|
|
, d_(0){}
|
|
struct Single_Option_MessageDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR Single_Option_MessageDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~Single_Option_MessageDefaultTypeInternal() {}
|
|
union {
|
|
Single_Option_Message _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Single_Option_MessageDefaultTypeInternal _Single_Option_Message_default_instance_;
|
|
PROTOBUF_CONSTEXPR Full_Option_Message::Full_Option_Message(
|
|
::_pbi::ConstantInitialized)
|
|
: sourceid_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
|
|
, fcff_(nullptr)
|
|
, id_(0)
|
|
, b_(false)
|
|
, d_(0){}
|
|
struct Full_Option_MessageDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR Full_Option_MessageDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~Full_Option_MessageDefaultTypeInternal() {}
|
|
union {
|
|
Full_Option_Message _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Full_Option_MessageDefaultTypeInternal _Full_Option_Message_default_instance_;
|
|
} // namespace OPTIONTEST
|
|
static ::_pb::Metadata file_level_metadata_ProtoOption_2eproto[4];
|
|
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_ProtoOption_2eproto = nullptr;
|
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_ProtoOption_2eproto = nullptr;
|
|
|
|
const uint32_t TableStruct_ProtoOption_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::AdditionOption, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::AdditionOption, s_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::AdditionOption, n_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::AdditionOption, d_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::AdditionOption, b_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, id_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, sourceid_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, d_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, b_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Non_Option_Message, fcff_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, id_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, sourceid_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, d_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, b_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Single_Option_Message, fcff_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, id_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, sourceid_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, d_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, b_),
|
|
PROTOBUF_FIELD_OFFSET(::OPTIONTEST::Full_Option_Message, fcff_),
|
|
};
|
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, -1, sizeof(::OPTIONTEST::AdditionOption)},
|
|
{ 10, -1, -1, sizeof(::OPTIONTEST::Non_Option_Message)},
|
|
{ 21, -1, -1, sizeof(::OPTIONTEST::Single_Option_Message)},
|
|
{ 32, -1, -1, sizeof(::OPTIONTEST::Full_Option_Message)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::OPTIONTEST::_AdditionOption_default_instance_._instance,
|
|
&::OPTIONTEST::_Non_Option_Message_default_instance_._instance,
|
|
&::OPTIONTEST::_Single_Option_Message_default_instance_._instance,
|
|
&::OPTIONTEST::_Full_Option_Message_default_instance_._instance,
|
|
};
|
|
|
|
const char descriptor_table_protodef_ProtoOption_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\021ProtoOption.proto\022\nOPTIONTEST\032\036google/"
|
|
"protobuf/wrappers.proto\032 google/protobuf"
|
|
"/descriptor.proto\"<\n\016AdditionOption\022\t\n\001s"
|
|
"\030\001 \001(\t\022\t\n\001n\030\002 \001(\005\022\t\n\001d\030\003 \001(\001\022\t\n\001b\030\004 \001(\010\""
|
|
"\225\001\n\022Non_Option_Message\022\n\n\002id\030\001 \001(\005\022\020\n\010so"
|
|
"urceid\030\002 \001(\t\022\t\n\001d\030\003 \001(\001\022\t\n\001b\030\004 \001(\010\022*\n\004FC"
|
|
"FF\030\005 \001(\0132\034.google.protobuf.DoubleValue:\037"
|
|
"\212\361\004\024\n\022Non_Option_Message\212\361\004\003\020\351\007\"\253\001\n\025Sing"
|
|
"le_Option_Message\022\032\n\002id\030\001 \001(\005B\016\222\361\004\004\n\002id\222"
|
|
"\361\004\002\020\001\022\020\n\010sourceid\030\002 \001(\t\022\t\n\001d\030\003 \001(\001\022\t\n\001b\030"
|
|
"\004 \001(\010\022*\n\004FCFF\030\005 \001(\0132\034.google.protobuf.Do"
|
|
"ubleValue:\"\212\361\004\027\n\025Single_Option_Message\212\361"
|
|
"\004\003\020\352\007\"\342\002\n\023Full_Option_Message\022-\n\002id\030\001 \001("
|
|
"\005B!\222\361\004\004\n\002id\222\361\004\002\020\001\222\361\004\t\031\303\365(\\\217\302\361\?\222\361\004\002 \000\0227\n\010"
|
|
"sourceid\030\002 \001(\tB%\222\361\004\010\n\006source\222\361\004\002\020\002\222\361\004\t\031\303"
|
|
"\365(\\\217\302\001@\222\361\004\002 \001\0220\n\001d\030\003 \001(\001B%\222\361\004\010\n\006double\222\361"
|
|
"\004\002\020\003\222\361\004\t\031\244p=\n\327\243\n@\222\361\004\002 \000\022.\n\001b\030\004 \001(\010B#\222\361\004\006"
|
|
"\n\004bool\222\361\004\002\020\004\222\361\004\t\031\303\365(\\\217\302\021@\222\361\004\002 \001\022_\n\004FCFF\030"
|
|
"\005 \001(\0132\034.google.protobuf.DoubleValueB3\222\361\004"
|
|
"\026\n\024protobuf.doublevalue\222\361\004\002\020\005\222\361\004\t\031333333"
|
|
"\026@\222\361\004\002 \000: \212\361\004\025\n\023Full_Option_Message\212\361\004\003\020"
|
|
"\353\007:2\n\013File_Option\022\034.google.protobuf.File"
|
|
"Options\030\220N \001(\t:S\n\rmessageOption\022\037.google"
|
|
".protobuf.MessageOptions\030\221N \001(\0132\032.OPTION"
|
|
"TEST.AdditionOption:O\n\013filedOptipn\022\035.goo"
|
|
"gle.protobuf.FieldOptions\030\222N \001(\0132\032.OPTIO"
|
|
"NTEST.AdditionOptionB\"\202\361\004\036ProtoOption.pr"
|
|
"oto.FiledOptionsb\006proto3"
|
|
;
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_ProtoOption_2eproto_deps[2] = {
|
|
&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
|
|
&::descriptor_table_google_2fprotobuf_2fwrappers_2eproto,
|
|
};
|
|
static ::_pbi::once_flag descriptor_table_ProtoOption_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_ProtoOption_2eproto = {
|
|
false, false, 1104, descriptor_table_protodef_ProtoOption_2eproto,
|
|
"ProtoOption.proto",
|
|
&descriptor_table_ProtoOption_2eproto_once, descriptor_table_ProtoOption_2eproto_deps, 2, 4,
|
|
schemas, file_default_instances, TableStruct_ProtoOption_2eproto::offsets,
|
|
file_level_metadata_ProtoOption_2eproto, file_level_enum_descriptors_ProtoOption_2eproto,
|
|
file_level_service_descriptors_ProtoOption_2eproto,
|
|
};
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ProtoOption_2eproto_getter() {
|
|
return &descriptor_table_ProtoOption_2eproto;
|
|
}
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_ProtoOption_2eproto(&descriptor_table_ProtoOption_2eproto);
|
|
namespace OPTIONTEST {
|
|
|
|
// ===================================================================
|
|
|
|
class AdditionOption::_Internal {
|
|
public:
|
|
};
|
|
|
|
AdditionOption::AdditionOption(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(arena_constructor:OPTIONTEST.AdditionOption)
|
|
}
|
|
AdditionOption::AdditionOption(const AdditionOption& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
s_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
s_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_s().empty()) {
|
|
s_.Set(from._internal_s(),
|
|
GetArenaForAllocation());
|
|
}
|
|
::memcpy(&d_, &from.d_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&b_) -
|
|
reinterpret_cast<char*>(&d_)) + sizeof(b_));
|
|
// @@protoc_insertion_point(copy_constructor:OPTIONTEST.AdditionOption)
|
|
}
|
|
|
|
inline void AdditionOption::SharedCtor() {
|
|
s_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
s_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
|
|
reinterpret_cast<char*>(&d_) - reinterpret_cast<char*>(this)),
|
|
0, static_cast<size_t>(reinterpret_cast<char*>(&b_) -
|
|
reinterpret_cast<char*>(&d_)) + sizeof(b_));
|
|
}
|
|
|
|
AdditionOption::~AdditionOption() {
|
|
// @@protoc_insertion_point(destructor:OPTIONTEST.AdditionOption)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void AdditionOption::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
s_.Destroy();
|
|
}
|
|
|
|
void AdditionOption::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
|
|
void AdditionOption::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:OPTIONTEST.AdditionOption)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
s_.ClearToEmpty();
|
|
::memset(&d_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&b_) -
|
|
reinterpret_cast<char*>(&d_)) + sizeof(b_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* AdditionOption::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// string s = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_s();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "OPTIONTEST.AdditionOption.s"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int32 n = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
n_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// double d = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) {
|
|
d_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
|
|
ptr += sizeof(double);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bool b = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
b_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* AdditionOption::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:OPTIONTEST.AdditionOption)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string s = 1;
|
|
if (!this->_internal_s().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_s().data(), static_cast<int>(this->_internal_s().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"OPTIONTEST.AdditionOption.s");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_s(), target);
|
|
}
|
|
|
|
// int32 n = 2;
|
|
if (this->_internal_n() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_n(), target);
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_d(), target);
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_b(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:OPTIONTEST.AdditionOption)
|
|
return target;
|
|
}
|
|
|
|
size_t AdditionOption::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:OPTIONTEST.AdditionOption)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string s = 1;
|
|
if (!this->_internal_s().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_s());
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
// int32 n = 2;
|
|
if (this->_internal_n() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_n());
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AdditionOption::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
AdditionOption::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AdditionOption::GetClassData() const { return &_class_data_; }
|
|
|
|
void AdditionOption::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
static_cast<AdditionOption *>(to)->MergeFrom(
|
|
static_cast<const AdditionOption &>(from));
|
|
}
|
|
|
|
|
|
void AdditionOption::MergeFrom(const AdditionOption& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:OPTIONTEST.AdditionOption)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_s().empty()) {
|
|
_internal_set_s(from._internal_s());
|
|
}
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = from._internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
_internal_set_d(from._internal_d());
|
|
}
|
|
if (from._internal_n() != 0) {
|
|
_internal_set_n(from._internal_n());
|
|
}
|
|
if (from._internal_b() != 0) {
|
|
_internal_set_b(from._internal_b());
|
|
}
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void AdditionOption::CopyFrom(const AdditionOption& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:OPTIONTEST.AdditionOption)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool AdditionOption::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void AdditionOption::InternalSwap(AdditionOption* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&s_, lhs_arena,
|
|
&other->s_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(AdditionOption, b_)
|
|
+ sizeof(AdditionOption::b_)
|
|
- PROTOBUF_FIELD_OFFSET(AdditionOption, d_)>(
|
|
reinterpret_cast<char*>(&d_),
|
|
reinterpret_cast<char*>(&other->d_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata AdditionOption::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_ProtoOption_2eproto_getter, &descriptor_table_ProtoOption_2eproto_once,
|
|
file_level_metadata_ProtoOption_2eproto[0]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Non_Option_Message::_Internal {
|
|
public:
|
|
static const ::PROTOBUF_NAMESPACE_ID::DoubleValue& fcff(const Non_Option_Message* msg);
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::DoubleValue&
|
|
Non_Option_Message::_Internal::fcff(const Non_Option_Message* msg) {
|
|
return *msg->fcff_;
|
|
}
|
|
void Non_Option_Message::clear_fcff() {
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
}
|
|
Non_Option_Message::Non_Option_Message(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(arena_constructor:OPTIONTEST.Non_Option_Message)
|
|
}
|
|
Non_Option_Message::Non_Option_Message(const Non_Option_Message& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_sourceid().empty()) {
|
|
sourceid_.Set(from._internal_sourceid(),
|
|
GetArenaForAllocation());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
fcff_ = new ::PROTOBUF_NAMESPACE_ID::DoubleValue(*from.fcff_);
|
|
} else {
|
|
fcff_ = nullptr;
|
|
}
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
// @@protoc_insertion_point(copy_constructor:OPTIONTEST.Non_Option_Message)
|
|
}
|
|
|
|
inline void Non_Option_Message::SharedCtor() {
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
|
|
reinterpret_cast<char*>(&fcff_) - reinterpret_cast<char*>(this)),
|
|
0, static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&fcff_)) + sizeof(d_));
|
|
}
|
|
|
|
Non_Option_Message::~Non_Option_Message() {
|
|
// @@protoc_insertion_point(destructor:OPTIONTEST.Non_Option_Message)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Non_Option_Message::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
sourceid_.Destroy();
|
|
if (this != internal_default_instance()) delete fcff_;
|
|
}
|
|
|
|
void Non_Option_Message::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
|
|
void Non_Option_Message::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:OPTIONTEST.Non_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
sourceid_.ClearToEmpty();
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Non_Option_Message::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// int32 id = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
|
id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// string sourceid = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
auto str = _internal_mutable_sourceid();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "OPTIONTEST.Non_Option_Message.sourceid"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// double d = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) {
|
|
d_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
|
|
ptr += sizeof(double);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bool b = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
b_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_fcff(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* Non_Option_Message::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:OPTIONTEST.Non_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int32 id = 1;
|
|
if (this->_internal_id() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
|
|
}
|
|
|
|
// string sourceid = 2;
|
|
if (!this->_internal_sourceid().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_sourceid().data(), static_cast<int>(this->_internal_sourceid().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"OPTIONTEST.Non_Option_Message.sourceid");
|
|
target = stream->WriteStringMaybeAliased(
|
|
2, this->_internal_sourceid(), target);
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_d(), target);
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_b(), target);
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
if (this->_internal_has_fcff()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(5, _Internal::fcff(this),
|
|
_Internal::fcff(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:OPTIONTEST.Non_Option_Message)
|
|
return target;
|
|
}
|
|
|
|
size_t Non_Option_Message::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:OPTIONTEST.Non_Option_Message)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string sourceid = 2;
|
|
if (!this->_internal_sourceid().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_sourceid());
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
if (this->_internal_has_fcff()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*fcff_);
|
|
}
|
|
|
|
// int32 id = 1;
|
|
if (this->_internal_id() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Non_Option_Message::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
Non_Option_Message::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Non_Option_Message::GetClassData() const { return &_class_data_; }
|
|
|
|
void Non_Option_Message::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
static_cast<Non_Option_Message *>(to)->MergeFrom(
|
|
static_cast<const Non_Option_Message &>(from));
|
|
}
|
|
|
|
|
|
void Non_Option_Message::MergeFrom(const Non_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:OPTIONTEST.Non_Option_Message)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_sourceid().empty()) {
|
|
_internal_set_sourceid(from._internal_sourceid());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
_internal_mutable_fcff()->::PROTOBUF_NAMESPACE_ID::DoubleValue::MergeFrom(from._internal_fcff());
|
|
}
|
|
if (from._internal_id() != 0) {
|
|
_internal_set_id(from._internal_id());
|
|
}
|
|
if (from._internal_b() != 0) {
|
|
_internal_set_b(from._internal_b());
|
|
}
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = from._internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
_internal_set_d(from._internal_d());
|
|
}
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Non_Option_Message::CopyFrom(const Non_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:OPTIONTEST.Non_Option_Message)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Non_Option_Message::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Non_Option_Message::InternalSwap(Non_Option_Message* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&sourceid_, lhs_arena,
|
|
&other->sourceid_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Non_Option_Message, d_)
|
|
+ sizeof(Non_Option_Message::d_)
|
|
- PROTOBUF_FIELD_OFFSET(Non_Option_Message, fcff_)>(
|
|
reinterpret_cast<char*>(&fcff_),
|
|
reinterpret_cast<char*>(&other->fcff_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Non_Option_Message::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_ProtoOption_2eproto_getter, &descriptor_table_ProtoOption_2eproto_once,
|
|
file_level_metadata_ProtoOption_2eproto[1]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Single_Option_Message::_Internal {
|
|
public:
|
|
static const ::PROTOBUF_NAMESPACE_ID::DoubleValue& fcff(const Single_Option_Message* msg);
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::DoubleValue&
|
|
Single_Option_Message::_Internal::fcff(const Single_Option_Message* msg) {
|
|
return *msg->fcff_;
|
|
}
|
|
void Single_Option_Message::clear_fcff() {
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
}
|
|
Single_Option_Message::Single_Option_Message(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(arena_constructor:OPTIONTEST.Single_Option_Message)
|
|
}
|
|
Single_Option_Message::Single_Option_Message(const Single_Option_Message& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_sourceid().empty()) {
|
|
sourceid_.Set(from._internal_sourceid(),
|
|
GetArenaForAllocation());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
fcff_ = new ::PROTOBUF_NAMESPACE_ID::DoubleValue(*from.fcff_);
|
|
} else {
|
|
fcff_ = nullptr;
|
|
}
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
// @@protoc_insertion_point(copy_constructor:OPTIONTEST.Single_Option_Message)
|
|
}
|
|
|
|
inline void Single_Option_Message::SharedCtor() {
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
|
|
reinterpret_cast<char*>(&fcff_) - reinterpret_cast<char*>(this)),
|
|
0, static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&fcff_)) + sizeof(d_));
|
|
}
|
|
|
|
Single_Option_Message::~Single_Option_Message() {
|
|
// @@protoc_insertion_point(destructor:OPTIONTEST.Single_Option_Message)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Single_Option_Message::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
sourceid_.Destroy();
|
|
if (this != internal_default_instance()) delete fcff_;
|
|
}
|
|
|
|
void Single_Option_Message::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
|
|
void Single_Option_Message::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:OPTIONTEST.Single_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
sourceid_.ClearToEmpty();
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Single_Option_Message::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
|
id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// string sourceid = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
auto str = _internal_mutable_sourceid();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "OPTIONTEST.Single_Option_Message.sourceid"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// double d = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) {
|
|
d_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
|
|
ptr += sizeof(double);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bool b = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
b_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_fcff(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* Single_Option_Message::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:OPTIONTEST.Single_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_id() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
|
|
}
|
|
|
|
// string sourceid = 2;
|
|
if (!this->_internal_sourceid().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_sourceid().data(), static_cast<int>(this->_internal_sourceid().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"OPTIONTEST.Single_Option_Message.sourceid");
|
|
target = stream->WriteStringMaybeAliased(
|
|
2, this->_internal_sourceid(), target);
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_d(), target);
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_b(), target);
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
if (this->_internal_has_fcff()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(5, _Internal::fcff(this),
|
|
_Internal::fcff(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:OPTIONTEST.Single_Option_Message)
|
|
return target;
|
|
}
|
|
|
|
size_t Single_Option_Message::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:OPTIONTEST.Single_Option_Message)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string sourceid = 2;
|
|
if (!this->_internal_sourceid().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_sourceid());
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5;
|
|
if (this->_internal_has_fcff()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*fcff_);
|
|
}
|
|
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_id() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
|
}
|
|
|
|
// bool b = 4;
|
|
if (this->_internal_b() != 0) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// double d = 3;
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Single_Option_Message::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
Single_Option_Message::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Single_Option_Message::GetClassData() const { return &_class_data_; }
|
|
|
|
void Single_Option_Message::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
static_cast<Single_Option_Message *>(to)->MergeFrom(
|
|
static_cast<const Single_Option_Message &>(from));
|
|
}
|
|
|
|
|
|
void Single_Option_Message::MergeFrom(const Single_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:OPTIONTEST.Single_Option_Message)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_sourceid().empty()) {
|
|
_internal_set_sourceid(from._internal_sourceid());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
_internal_mutable_fcff()->::PROTOBUF_NAMESPACE_ID::DoubleValue::MergeFrom(from._internal_fcff());
|
|
}
|
|
if (from._internal_id() != 0) {
|
|
_internal_set_id(from._internal_id());
|
|
}
|
|
if (from._internal_b() != 0) {
|
|
_internal_set_b(from._internal_b());
|
|
}
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = from._internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
_internal_set_d(from._internal_d());
|
|
}
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Single_Option_Message::CopyFrom(const Single_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:OPTIONTEST.Single_Option_Message)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Single_Option_Message::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Single_Option_Message::InternalSwap(Single_Option_Message* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&sourceid_, lhs_arena,
|
|
&other->sourceid_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Single_Option_Message, d_)
|
|
+ sizeof(Single_Option_Message::d_)
|
|
- PROTOBUF_FIELD_OFFSET(Single_Option_Message, fcff_)>(
|
|
reinterpret_cast<char*>(&fcff_),
|
|
reinterpret_cast<char*>(&other->fcff_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Single_Option_Message::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_ProtoOption_2eproto_getter, &descriptor_table_ProtoOption_2eproto_once,
|
|
file_level_metadata_ProtoOption_2eproto[2]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Full_Option_Message::_Internal {
|
|
public:
|
|
static const ::PROTOBUF_NAMESPACE_ID::DoubleValue& fcff(const Full_Option_Message* msg);
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::DoubleValue&
|
|
Full_Option_Message::_Internal::fcff(const Full_Option_Message* msg) {
|
|
return *msg->fcff_;
|
|
}
|
|
void Full_Option_Message::clear_fcff() {
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
}
|
|
Full_Option_Message::Full_Option_Message(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(arena_constructor:OPTIONTEST.Full_Option_Message)
|
|
}
|
|
Full_Option_Message::Full_Option_Message(const Full_Option_Message& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_sourceid().empty()) {
|
|
sourceid_.Set(from._internal_sourceid(),
|
|
GetArenaForAllocation());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
fcff_ = new ::PROTOBUF_NAMESPACE_ID::DoubleValue(*from.fcff_);
|
|
} else {
|
|
fcff_ = nullptr;
|
|
}
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
// @@protoc_insertion_point(copy_constructor:OPTIONTEST.Full_Option_Message)
|
|
}
|
|
|
|
inline void Full_Option_Message::SharedCtor() {
|
|
sourceid_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
sourceid_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
|
|
reinterpret_cast<char*>(&fcff_) - reinterpret_cast<char*>(this)),
|
|
0, static_cast<size_t>(reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&fcff_)) + sizeof(d_));
|
|
}
|
|
|
|
Full_Option_Message::~Full_Option_Message() {
|
|
// @@protoc_insertion_point(destructor:OPTIONTEST.Full_Option_Message)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Full_Option_Message::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
sourceid_.Destroy();
|
|
if (this != internal_default_instance()) delete fcff_;
|
|
}
|
|
|
|
void Full_Option_Message::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
|
|
void Full_Option_Message::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:OPTIONTEST.Full_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
sourceid_.ClearToEmpty();
|
|
if (GetArenaForAllocation() == nullptr && fcff_ != nullptr) {
|
|
delete fcff_;
|
|
}
|
|
fcff_ = nullptr;
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&d_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(d_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Full_Option_Message::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
|
id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// string sourceid = 2 [(.OPTIONTEST.filedOptipn) = {
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
auto str = _internal_mutable_sourceid();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "OPTIONTEST.Full_Option_Message.sourceid"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// double d = 3 [(.OPTIONTEST.filedOptipn) = {
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) {
|
|
d_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
|
|
ptr += sizeof(double);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bool b = 4 [(.OPTIONTEST.filedOptipn) = {
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
b_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .google.protobuf.DoubleValue FCFF = 5 [(.OPTIONTEST.filedOptipn) = {
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_fcff(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* Full_Option_Message::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:OPTIONTEST.Full_Option_Message)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_id() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
|
|
}
|
|
|
|
// string sourceid = 2 [(.OPTIONTEST.filedOptipn) = {
|
|
if (!this->_internal_sourceid().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_sourceid().data(), static_cast<int>(this->_internal_sourceid().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"OPTIONTEST.Full_Option_Message.sourceid");
|
|
target = stream->WriteStringMaybeAliased(
|
|
2, this->_internal_sourceid(), target);
|
|
}
|
|
|
|
// double d = 3 [(.OPTIONTEST.filedOptipn) = {
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_d(), target);
|
|
}
|
|
|
|
// bool b = 4 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_b() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_b(), target);
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_has_fcff()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(5, _Internal::fcff(this),
|
|
_Internal::fcff(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:OPTIONTEST.Full_Option_Message)
|
|
return target;
|
|
}
|
|
|
|
size_t Full_Option_Message::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:OPTIONTEST.Full_Option_Message)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string sourceid = 2 [(.OPTIONTEST.filedOptipn) = {
|
|
if (!this->_internal_sourceid().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_sourceid());
|
|
}
|
|
|
|
// .google.protobuf.DoubleValue FCFF = 5 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_has_fcff()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*fcff_);
|
|
}
|
|
|
|
// int32 id = 1 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_id() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
|
}
|
|
|
|
// bool b = 4 [(.OPTIONTEST.filedOptipn) = {
|
|
if (this->_internal_b() != 0) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// double d = 3 [(.OPTIONTEST.filedOptipn) = {
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = this->_internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Full_Option_Message::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
Full_Option_Message::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Full_Option_Message::GetClassData() const { return &_class_data_; }
|
|
|
|
void Full_Option_Message::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
static_cast<Full_Option_Message *>(to)->MergeFrom(
|
|
static_cast<const Full_Option_Message &>(from));
|
|
}
|
|
|
|
|
|
void Full_Option_Message::MergeFrom(const Full_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:OPTIONTEST.Full_Option_Message)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_sourceid().empty()) {
|
|
_internal_set_sourceid(from._internal_sourceid());
|
|
}
|
|
if (from._internal_has_fcff()) {
|
|
_internal_mutable_fcff()->::PROTOBUF_NAMESPACE_ID::DoubleValue::MergeFrom(from._internal_fcff());
|
|
}
|
|
if (from._internal_id() != 0) {
|
|
_internal_set_id(from._internal_id());
|
|
}
|
|
if (from._internal_b() != 0) {
|
|
_internal_set_b(from._internal_b());
|
|
}
|
|
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
|
|
double tmp_d = from._internal_d();
|
|
uint64_t raw_d;
|
|
memcpy(&raw_d, &tmp_d, sizeof(tmp_d));
|
|
if (raw_d != 0) {
|
|
_internal_set_d(from._internal_d());
|
|
}
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Full_Option_Message::CopyFrom(const Full_Option_Message& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:OPTIONTEST.Full_Option_Message)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Full_Option_Message::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Full_Option_Message::InternalSwap(Full_Option_Message* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&sourceid_, lhs_arena,
|
|
&other->sourceid_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Full_Option_Message, d_)
|
|
+ sizeof(Full_Option_Message::d_)
|
|
- PROTOBUF_FIELD_OFFSET(Full_Option_Message, fcff_)>(
|
|
reinterpret_cast<char*>(&fcff_),
|
|
reinterpret_cast<char*>(&other->fcff_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Full_Option_Message::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_ProtoOption_2eproto_getter, &descriptor_table_ProtoOption_2eproto_once,
|
|
file_level_metadata_ProtoOption_2eproto[3]);
|
|
}
|
|
const std::string File_Option_default("");
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FileOptions,
|
|
::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false>
|
|
File_Option(kFileOptionFieldNumber, File_Option_default, nullptr);
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MessageOptions,
|
|
::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::OPTIONTEST::AdditionOption >, 11, false>
|
|
messageOption(kMessageOptionFieldNumber, ::OPTIONTEST::AdditionOption::default_instance(), nullptr);
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions,
|
|
::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::OPTIONTEST::AdditionOption >, 11, false>
|
|
filedOptipn(kFiledOptipnFieldNumber, ::OPTIONTEST::AdditionOption::default_instance(), nullptr);
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace OPTIONTEST
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::OPTIONTEST::AdditionOption*
|
|
Arena::CreateMaybeMessage< ::OPTIONTEST::AdditionOption >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::OPTIONTEST::AdditionOption >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::OPTIONTEST::Non_Option_Message*
|
|
Arena::CreateMaybeMessage< ::OPTIONTEST::Non_Option_Message >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::OPTIONTEST::Non_Option_Message >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::OPTIONTEST::Single_Option_Message*
|
|
Arena::CreateMaybeMessage< ::OPTIONTEST::Single_Option_Message >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::OPTIONTEST::Single_Option_Message >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::OPTIONTEST::Full_Option_Message*
|
|
Arena::CreateMaybeMessage< ::OPTIONTEST::Full_Option_Message >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::OPTIONTEST::Full_Option_Message >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|