123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_lite_imports_nonlite.proto
- #include <google/protobuf/unittest_lite_imports_nonlite.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/io/zero_copy_stream_impl_lite.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 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<TestLiteImportsNonlite>
- _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<size_t>(
- reinterpret_cast<char*>(&message_with_required_) -
- reinterpret_cast<char*>(&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<int>(_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<const TestLiteImportsNonlite*>(&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)
|