// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/unittest_lite_imports_nonlite.proto #include #include #include #include #include #include #include // This is a temporary google only hack #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) namespace protobuf_google_2fprotobuf_2funittest_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequired; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes; } // namespace protobuf_google_2fprotobuf_2funittest_2eproto namespace protobuf_unittest { class TestLiteImportsNonliteDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _TestLiteImportsNonlite_default_instance_; } // namespace protobuf_unittest namespace protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto { static void InitDefaultsTestLiteImportsNonlite() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::protobuf_unittest::_TestLiteImportsNonlite_default_instance_; new (ptr) ::protobuf_unittest::TestLiteImportsNonlite(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::protobuf_unittest::TestLiteImportsNonlite::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<2> scc_info_TestLiteImportsNonlite = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestLiteImportsNonlite}, { &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base, &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}}; void InitDefaults() { ::google::protobuf::internal::InitSCC(&scc_info_TestLiteImportsNonlite.base); } } // namespace protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto namespace protobuf_unittest { // =================================================================== void TestLiteImportsNonlite::InitAsDefaultInstance() { ::protobuf_unittest::_TestLiteImportsNonlite_default_instance_._instance.get_mutable()->message_ = const_cast< ::protobuf_unittest::TestAllTypes*>( ::protobuf_unittest::TestAllTypes::internal_default_instance()); ::protobuf_unittest::_TestLiteImportsNonlite_default_instance_._instance.get_mutable()->message_with_required_ = const_cast< ::protobuf_unittest::TestRequired*>( ::protobuf_unittest::TestRequired::internal_default_instance()); } void TestLiteImportsNonlite::clear_message() { if (message_ != NULL) message_->Clear(); clear_has_message(); } void TestLiteImportsNonlite::clear_message_with_required() { if (message_with_required_ != NULL) message_with_required_->Clear(); clear_has_message_with_required(); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int TestLiteImportsNonlite::kMessageFieldNumber; const int TestLiteImportsNonlite::kMessageWithRequiredFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 TestLiteImportsNonlite::TestLiteImportsNonlite() : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto::scc_info_TestLiteImportsNonlite.base); SharedCtor(); // @@protoc_insertion_point(constructor:protobuf_unittest.TestLiteImportsNonlite) } TestLiteImportsNonlite::TestLiteImportsNonlite(const TestLiteImportsNonlite& from) : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_message()) { message_ = new ::protobuf_unittest::TestAllTypes(*from.message_); } else { message_ = NULL; } if (from.has_message_with_required()) { message_with_required_ = new ::protobuf_unittest::TestRequired(*from.message_with_required_); } else { message_with_required_ = NULL; } // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestLiteImportsNonlite) } void TestLiteImportsNonlite::SharedCtor() { ::memset(&message_, 0, static_cast( reinterpret_cast(&message_with_required_) - reinterpret_cast(&message_)) + sizeof(message_with_required_)); } TestLiteImportsNonlite::~TestLiteImportsNonlite() { // @@protoc_insertion_point(destructor:protobuf_unittest.TestLiteImportsNonlite) SharedDtor(); } void TestLiteImportsNonlite::SharedDtor() { if (this != internal_default_instance()) delete message_; if (this != internal_default_instance()) delete message_with_required_; } void TestLiteImportsNonlite::SetCachedSize(int size) const { _cached_size_.Set(size); } const TestLiteImportsNonlite& TestLiteImportsNonlite::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto::scc_info_TestLiteImportsNonlite.base); return *internal_default_instance(); } void TestLiteImportsNonlite::Clear() { // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestLiteImportsNonlite) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; cached_has_bits = _has_bits_[0]; if (cached_has_bits & 3u) { if (cached_has_bits & 0x00000001u) { GOOGLE_DCHECK(message_ != NULL); message_->Clear(); } if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(message_with_required_ != NULL); message_with_required_->Clear(); } } _has_bits_.Clear(); _internal_metadata_.Clear(); } bool TestLiteImportsNonlite::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( &_internal_metadata_); ::google::protobuf::io::StringOutputStream unknown_fields_output( unknown_fields_setter.buffer()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_output, false); // @@protoc_insertion_point(parse_start:protobuf_unittest.TestLiteImportsNonlite) 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 .protobuf_unittest.TestAllTypes message = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_message())); } else { goto handle_unusual; } break; } // optional .protobuf_unittest.TestRequired message_with_required = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_message_with_required())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField( input, tag, &unknown_fields_stream)); break; } } } success: // @@protoc_insertion_point(parse_success:protobuf_unittest.TestLiteImportsNonlite) return true; failure: // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestLiteImportsNonlite) return false; #undef DO_ } void TestLiteImportsNonlite::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestLiteImportsNonlite) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional .protobuf_unittest.TestAllTypes message = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->_internal_message(), output); } // optional .protobuf_unittest.TestRequired message_with_required = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_message_with_required(), output); } output->WriteRaw(_internal_metadata_.unknown_fields().data(), static_cast(_internal_metadata_.unknown_fields().size())); // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestLiteImportsNonlite) } size_t TestLiteImportsNonlite::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestLiteImportsNonlite) size_t total_size = 0; total_size += _internal_metadata_.unknown_fields().size(); if (_has_bits_[0 / 32] & 3u) { // optional .protobuf_unittest.TestAllTypes message = 1; if (has_message()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *message_); } // optional .protobuf_unittest.TestRequired message_with_required = 2; if (has_message_with_required()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *message_with_required_); } } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void TestLiteImportsNonlite::CheckTypeAndMergeFrom( const ::google::protobuf::MessageLite& from) { MergeFrom(*::google::protobuf::down_cast(&from)); } void TestLiteImportsNonlite::MergeFrom(const TestLiteImportsNonlite& from) { // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestLiteImportsNonlite) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 3u) { if (cached_has_bits & 0x00000001u) { mutable_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.message()); } if (cached_has_bits & 0x00000002u) { mutable_message_with_required()->::protobuf_unittest::TestRequired::MergeFrom(from.message_with_required()); } } } void TestLiteImportsNonlite::CopyFrom(const TestLiteImportsNonlite& from) { // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestLiteImportsNonlite) if (&from == this) return; Clear(); MergeFrom(from); } bool TestLiteImportsNonlite::IsInitialized() const { if (has_message_with_required()) { if (!this->message_with_required_->IsInitialized()) return false; } return true; } void TestLiteImportsNonlite::Swap(TestLiteImportsNonlite* other) { if (other == this) return; InternalSwap(other); } void TestLiteImportsNonlite::InternalSwap(TestLiteImportsNonlite* other) { using std::swap; swap(message_, other->message_); swap(message_with_required_, other->message_with_required_); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); } ::std::string TestLiteImportsNonlite::GetTypeName() const { return "protobuf_unittest.TestLiteImportsNonlite"; } // @@protoc_insertion_point(namespace_scope) } // namespace protobuf_unittest namespace google { namespace protobuf { template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestLiteImportsNonlite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestLiteImportsNonlite >(Arena* arena) { return Arena::CreateInternal< ::protobuf_unittest::TestLiteImportsNonlite >(arena); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope)