123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_no_arena_import.proto
- #include <google/protobuf/unittest_no_arena_import.pb.h>
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.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>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace proto2_arena_unittest {
- class ImportNoArenaNestedMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<ImportNoArenaNestedMessage>
- _instance;
- } _ImportNoArenaNestedMessage_default_instance_;
- } // namespace proto2_arena_unittest
- namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto {
- static void InitDefaultsImportNoArenaNestedMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto2_arena_unittest::_ImportNoArenaNestedMessage_default_instance_;
- new (ptr) ::proto2_arena_unittest::ImportNoArenaNestedMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto2_arena_unittest::ImportNoArenaNestedMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_ImportNoArenaNestedMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsImportNoArenaNestedMessage}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_ImportNoArenaNestedMessage.base);
- }
- ::google::protobuf::Metadata file_level_metadata[1];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_arena_unittest::ImportNoArenaNestedMessage, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_arena_unittest::ImportNoArenaNestedMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_arena_unittest::ImportNoArenaNestedMessage, d_),
- 0,
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 6, sizeof(::proto2_arena_unittest::ImportNoArenaNestedMessage)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::proto2_arena_unittest::_ImportNoArenaNestedMessage_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/unittest_no_arena_import.proto", schemas, file_default_instances, TableStruct::offsets,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n.google/protobuf/unittest_no_arena_impo"
- "rt.proto\022\025proto2_arena_unittest\"\'\n\032Impor"
- "tNoArenaNestedMessage\022\t\n\001d\030\001 \001(\005"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 112);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/unittest_no_arena_import.proto", &protobuf_RegisterTypes);
- }
- void AddDescriptors() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto
- namespace proto2_arena_unittest {
- // ===================================================================
- void ImportNoArenaNestedMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int ImportNoArenaNestedMessage::kDFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- ImportNoArenaNestedMessage::ImportNoArenaNestedMessage()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::scc_info_ImportNoArenaNestedMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto2_arena_unittest.ImportNoArenaNestedMessage)
- }
- ImportNoArenaNestedMessage::ImportNoArenaNestedMessage(const ImportNoArenaNestedMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- d_ = from.d_;
- // @@protoc_insertion_point(copy_constructor:proto2_arena_unittest.ImportNoArenaNestedMessage)
- }
- void ImportNoArenaNestedMessage::SharedCtor() {
- d_ = 0;
- }
- ImportNoArenaNestedMessage::~ImportNoArenaNestedMessage() {
- // @@protoc_insertion_point(destructor:proto2_arena_unittest.ImportNoArenaNestedMessage)
- SharedDtor();
- }
- void ImportNoArenaNestedMessage::SharedDtor() {
- }
- void ImportNoArenaNestedMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* ImportNoArenaNestedMessage::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const ImportNoArenaNestedMessage& ImportNoArenaNestedMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::scc_info_ImportNoArenaNestedMessage.base);
- return *internal_default_instance();
- }
- void ImportNoArenaNestedMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- d_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool ImportNoArenaNestedMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional int32 d = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- set_has_d();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &d_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto2_arena_unittest.ImportNoArenaNestedMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto2_arena_unittest.ImportNoArenaNestedMessage)
- return false;
- #undef DO_
- }
- void ImportNoArenaNestedMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 d = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->d(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:proto2_arena_unittest.ImportNoArenaNestedMessage)
- }
- ::google::protobuf::uint8* ImportNoArenaNestedMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 d = 1;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->d(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:proto2_arena_unittest.ImportNoArenaNestedMessage)
- return target;
- }
- size_t ImportNoArenaNestedMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional int32 d = 1;
- if (has_d()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->d());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void ImportNoArenaNestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- GOOGLE_DCHECK_NE(&from, this);
- const ImportNoArenaNestedMessage* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ImportNoArenaNestedMessage>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:proto2_arena_unittest.ImportNoArenaNestedMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:proto2_arena_unittest.ImportNoArenaNestedMessage)
- MergeFrom(*source);
- }
- }
- void ImportNoArenaNestedMessage::MergeFrom(const ImportNoArenaNestedMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_d()) {
- set_d(from.d());
- }
- }
- void ImportNoArenaNestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void ImportNoArenaNestedMessage::CopyFrom(const ImportNoArenaNestedMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto2_arena_unittest.ImportNoArenaNestedMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool ImportNoArenaNestedMessage::IsInitialized() const {
- return true;
- }
- void ImportNoArenaNestedMessage::Swap(ImportNoArenaNestedMessage* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void ImportNoArenaNestedMessage::InternalSwap(ImportNoArenaNestedMessage* other) {
- using std::swap;
- swap(d_, other->d_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata ImportNoArenaNestedMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_5fimport_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace proto2_arena_unittest
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto2_arena_unittest::ImportNoArenaNestedMessage* Arena::CreateMaybeMessage< ::proto2_arena_unittest::ImportNoArenaNestedMessage >(Arena* arena) {
- return Arena::CreateInternal< ::proto2_arena_unittest::ImportNoArenaNestedMessage >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|