unittest_import_public_lite.pb.cc 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_import_public_lite.proto
  3. #include <google/protobuf/unittest_import_public_lite.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
  10. // This is a temporary google only hack
  11. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  12. #include "third_party/protobuf/version.h"
  13. #endif
  14. // @@protoc_insertion_point(includes)
  15. namespace protobuf_unittest_import {
  16. class PublicImportMessageLiteDefaultTypeInternal {
  17. public:
  18. ::google::protobuf::internal::ExplicitlyConstructed<PublicImportMessageLite>
  19. _instance;
  20. } _PublicImportMessageLite_default_instance_;
  21. } // namespace protobuf_unittest_import
  22. namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto {
  23. static void InitDefaultsPublicImportMessageLite() {
  24. GOOGLE_PROTOBUF_VERIFY_VERSION;
  25. {
  26. void* ptr = &::protobuf_unittest_import::_PublicImportMessageLite_default_instance_;
  27. new (ptr) ::protobuf_unittest_import::PublicImportMessageLite();
  28. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  29. }
  30. ::protobuf_unittest_import::PublicImportMessageLite::InitAsDefaultInstance();
  31. }
  32. ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessageLite =
  33. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPublicImportMessageLite}, {}};
  34. void InitDefaults() {
  35. ::google::protobuf::internal::InitSCC(&scc_info_PublicImportMessageLite.base);
  36. }
  37. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto
  38. namespace protobuf_unittest_import {
  39. // ===================================================================
  40. void PublicImportMessageLite::InitAsDefaultInstance() {
  41. }
  42. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  43. const int PublicImportMessageLite::kEFieldNumber;
  44. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  45. PublicImportMessageLite::PublicImportMessageLite()
  46. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  47. ::google::protobuf::internal::InitSCC(
  48. &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto::scc_info_PublicImportMessageLite.base);
  49. SharedCtor();
  50. // @@protoc_insertion_point(constructor:protobuf_unittest_import.PublicImportMessageLite)
  51. }
  52. PublicImportMessageLite::PublicImportMessageLite(const PublicImportMessageLite& from)
  53. : ::google::protobuf::MessageLite(),
  54. _internal_metadata_(NULL),
  55. _has_bits_(from._has_bits_) {
  56. _internal_metadata_.MergeFrom(from._internal_metadata_);
  57. e_ = from.e_;
  58. // @@protoc_insertion_point(copy_constructor:protobuf_unittest_import.PublicImportMessageLite)
  59. }
  60. void PublicImportMessageLite::SharedCtor() {
  61. e_ = 0;
  62. }
  63. PublicImportMessageLite::~PublicImportMessageLite() {
  64. // @@protoc_insertion_point(destructor:protobuf_unittest_import.PublicImportMessageLite)
  65. SharedDtor();
  66. }
  67. void PublicImportMessageLite::SharedDtor() {
  68. }
  69. void PublicImportMessageLite::SetCachedSize(int size) const {
  70. _cached_size_.Set(size);
  71. }
  72. const PublicImportMessageLite& PublicImportMessageLite::default_instance() {
  73. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto::scc_info_PublicImportMessageLite.base);
  74. return *internal_default_instance();
  75. }
  76. void PublicImportMessageLite::Clear() {
  77. // @@protoc_insertion_point(message_clear_start:protobuf_unittest_import.PublicImportMessageLite)
  78. ::google::protobuf::uint32 cached_has_bits = 0;
  79. // Prevent compiler warnings about cached_has_bits being unused
  80. (void) cached_has_bits;
  81. e_ = 0;
  82. _has_bits_.Clear();
  83. _internal_metadata_.Clear();
  84. }
  85. bool PublicImportMessageLite::MergePartialFromCodedStream(
  86. ::google::protobuf::io::CodedInputStream* input) {
  87. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  88. ::google::protobuf::uint32 tag;
  89. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  90. &_internal_metadata_);
  91. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  92. unknown_fields_setter.buffer());
  93. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  94. &unknown_fields_output, false);
  95. // @@protoc_insertion_point(parse_start:protobuf_unittest_import.PublicImportMessageLite)
  96. for (;;) {
  97. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  98. tag = p.first;
  99. if (!p.second) goto handle_unusual;
  100. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  101. // optional int32 e = 1;
  102. case 1: {
  103. if (static_cast< ::google::protobuf::uint8>(tag) ==
  104. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  105. set_has_e();
  106. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  107. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  108. input, &e_)));
  109. } else {
  110. goto handle_unusual;
  111. }
  112. break;
  113. }
  114. default: {
  115. handle_unusual:
  116. if (tag == 0) {
  117. goto success;
  118. }
  119. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  120. input, tag, &unknown_fields_stream));
  121. break;
  122. }
  123. }
  124. }
  125. success:
  126. // @@protoc_insertion_point(parse_success:protobuf_unittest_import.PublicImportMessageLite)
  127. return true;
  128. failure:
  129. // @@protoc_insertion_point(parse_failure:protobuf_unittest_import.PublicImportMessageLite)
  130. return false;
  131. #undef DO_
  132. }
  133. void PublicImportMessageLite::SerializeWithCachedSizes(
  134. ::google::protobuf::io::CodedOutputStream* output) const {
  135. // @@protoc_insertion_point(serialize_start:protobuf_unittest_import.PublicImportMessageLite)
  136. ::google::protobuf::uint32 cached_has_bits = 0;
  137. (void) cached_has_bits;
  138. cached_has_bits = _has_bits_[0];
  139. // optional int32 e = 1;
  140. if (cached_has_bits & 0x00000001u) {
  141. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->e(), output);
  142. }
  143. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  144. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  145. // @@protoc_insertion_point(serialize_end:protobuf_unittest_import.PublicImportMessageLite)
  146. }
  147. size_t PublicImportMessageLite::ByteSizeLong() const {
  148. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_import.PublicImportMessageLite)
  149. size_t total_size = 0;
  150. total_size += _internal_metadata_.unknown_fields().size();
  151. // optional int32 e = 1;
  152. if (has_e()) {
  153. total_size += 1 +
  154. ::google::protobuf::internal::WireFormatLite::Int32Size(
  155. this->e());
  156. }
  157. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  158. SetCachedSize(cached_size);
  159. return total_size;
  160. }
  161. void PublicImportMessageLite::CheckTypeAndMergeFrom(
  162. const ::google::protobuf::MessageLite& from) {
  163. MergeFrom(*::google::protobuf::down_cast<const PublicImportMessageLite*>(&from));
  164. }
  165. void PublicImportMessageLite::MergeFrom(const PublicImportMessageLite& from) {
  166. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_import.PublicImportMessageLite)
  167. GOOGLE_DCHECK_NE(&from, this);
  168. _internal_metadata_.MergeFrom(from._internal_metadata_);
  169. ::google::protobuf::uint32 cached_has_bits = 0;
  170. (void) cached_has_bits;
  171. if (from.has_e()) {
  172. set_e(from.e());
  173. }
  174. }
  175. void PublicImportMessageLite::CopyFrom(const PublicImportMessageLite& from) {
  176. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_import.PublicImportMessageLite)
  177. if (&from == this) return;
  178. Clear();
  179. MergeFrom(from);
  180. }
  181. bool PublicImportMessageLite::IsInitialized() const {
  182. return true;
  183. }
  184. void PublicImportMessageLite::Swap(PublicImportMessageLite* other) {
  185. if (other == this) return;
  186. InternalSwap(other);
  187. }
  188. void PublicImportMessageLite::InternalSwap(PublicImportMessageLite* other) {
  189. using std::swap;
  190. swap(e_, other->e_);
  191. swap(_has_bits_[0], other->_has_bits_[0]);
  192. _internal_metadata_.Swap(&other->_internal_metadata_);
  193. }
  194. ::std::string PublicImportMessageLite::GetTypeName() const {
  195. return "protobuf_unittest_import.PublicImportMessageLite";
  196. }
  197. // @@protoc_insertion_point(namespace_scope)
  198. } // namespace protobuf_unittest_import
  199. namespace google {
  200. namespace protobuf {
  201. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_import::PublicImportMessageLite* Arena::CreateMaybeMessage< ::protobuf_unittest_import::PublicImportMessageLite >(Arena* arena) {
  202. return Arena::CreateInternal< ::protobuf_unittest_import::PublicImportMessageLite >(arena);
  203. }
  204. } // namespace protobuf
  205. } // namespace google
  206. // @@protoc_insertion_point(global_scope)