unittest_lite_imports_nonlite.pb.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_lite_imports_nonlite.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 3006001
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/io/coded_stream.h>
  18. #include <google/protobuf/arena.h>
  19. #include <google/protobuf/arenastring.h>
  20. #include <google/protobuf/generated_message_table_driven.h>
  21. #include <google/protobuf/generated_message_util.h>
  22. #include <google/protobuf/inlined_string_field.h>
  23. #include <google/protobuf/metadata_lite.h>
  24. #include <google/protobuf/message_lite.h>
  25. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  26. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  27. #include <google/protobuf/unittest.pb.h>
  28. // @@protoc_insertion_point(includes)
  29. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto
  30. namespace protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto {
  31. // Internal implementation detail -- do not use these members.
  32. struct TableStruct {
  33. static const ::google::protobuf::internal::ParseTableField entries[];
  34. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  35. static const ::google::protobuf::internal::ParseTable schema[1];
  36. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  37. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  38. static const ::google::protobuf::uint32 offsets[];
  39. };
  40. } // namespace protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto
  41. namespace protobuf_unittest {
  42. class TestLiteImportsNonlite;
  43. class TestLiteImportsNonliteDefaultTypeInternal;
  44. extern TestLiteImportsNonliteDefaultTypeInternal _TestLiteImportsNonlite_default_instance_;
  45. } // namespace protobuf_unittest
  46. namespace google {
  47. namespace protobuf {
  48. template<> ::protobuf_unittest::TestLiteImportsNonlite* Arena::CreateMaybeMessage<::protobuf_unittest::TestLiteImportsNonlite>(Arena*);
  49. } // namespace protobuf
  50. } // namespace google
  51. namespace protobuf_unittest {
  52. // ===================================================================
  53. class TestLiteImportsNonlite : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestLiteImportsNonlite) */ {
  54. public:
  55. TestLiteImportsNonlite();
  56. virtual ~TestLiteImportsNonlite();
  57. TestLiteImportsNonlite(const TestLiteImportsNonlite& from);
  58. inline TestLiteImportsNonlite& operator=(const TestLiteImportsNonlite& from) {
  59. CopyFrom(from);
  60. return *this;
  61. }
  62. #if LANG_CXX11
  63. TestLiteImportsNonlite(TestLiteImportsNonlite&& from) noexcept
  64. : TestLiteImportsNonlite() {
  65. *this = ::std::move(from);
  66. }
  67. inline TestLiteImportsNonlite& operator=(TestLiteImportsNonlite&& from) noexcept {
  68. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  69. if (this != &from) InternalSwap(&from);
  70. } else {
  71. CopyFrom(from);
  72. }
  73. return *this;
  74. }
  75. #endif
  76. inline const ::std::string& unknown_fields() const {
  77. return _internal_metadata_.unknown_fields();
  78. }
  79. inline ::std::string* mutable_unknown_fields() {
  80. return _internal_metadata_.mutable_unknown_fields();
  81. }
  82. static const TestLiteImportsNonlite& default_instance();
  83. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  84. static inline const TestLiteImportsNonlite* internal_default_instance() {
  85. return reinterpret_cast<const TestLiteImportsNonlite*>(
  86. &_TestLiteImportsNonlite_default_instance_);
  87. }
  88. static constexpr int kIndexInFileMessages =
  89. 0;
  90. void Swap(TestLiteImportsNonlite* other);
  91. friend void swap(TestLiteImportsNonlite& a, TestLiteImportsNonlite& b) {
  92. a.Swap(&b);
  93. }
  94. // implements Message ----------------------------------------------
  95. inline TestLiteImportsNonlite* New() const final {
  96. return CreateMaybeMessage<TestLiteImportsNonlite>(NULL);
  97. }
  98. TestLiteImportsNonlite* New(::google::protobuf::Arena* arena) const final {
  99. return CreateMaybeMessage<TestLiteImportsNonlite>(arena);
  100. }
  101. void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from)
  102. final;
  103. void CopyFrom(const TestLiteImportsNonlite& from);
  104. void MergeFrom(const TestLiteImportsNonlite& from);
  105. void Clear() final;
  106. bool IsInitialized() const final;
  107. size_t ByteSizeLong() const final;
  108. bool MergePartialFromCodedStream(
  109. ::google::protobuf::io::CodedInputStream* input) final;
  110. void SerializeWithCachedSizes(
  111. ::google::protobuf::io::CodedOutputStream* output) const final;
  112. void DiscardUnknownFields();
  113. int GetCachedSize() const final { return _cached_size_.Get(); }
  114. private:
  115. void SharedCtor();
  116. void SharedDtor();
  117. void SetCachedSize(int size) const;
  118. void InternalSwap(TestLiteImportsNonlite* other);
  119. private:
  120. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  121. return NULL;
  122. }
  123. inline void* MaybeArenaPtr() const {
  124. return NULL;
  125. }
  126. public:
  127. ::std::string GetTypeName() const final;
  128. // nested types ----------------------------------------------------
  129. // accessors -------------------------------------------------------
  130. // optional .protobuf_unittest.TestAllTypes message = 1;
  131. bool has_message() const;
  132. void clear_message();
  133. static const int kMessageFieldNumber = 1;
  134. private:
  135. const ::protobuf_unittest::TestAllTypes& _internal_message() const;
  136. public:
  137. const ::protobuf_unittest::TestAllTypes& message() const;
  138. ::protobuf_unittest::TestAllTypes* release_message();
  139. ::protobuf_unittest::TestAllTypes* mutable_message();
  140. void set_allocated_message(::protobuf_unittest::TestAllTypes* message);
  141. // optional .protobuf_unittest.TestRequired message_with_required = 2;
  142. bool has_message_with_required() const;
  143. void clear_message_with_required();
  144. static const int kMessageWithRequiredFieldNumber = 2;
  145. private:
  146. const ::protobuf_unittest::TestRequired& _internal_message_with_required() const;
  147. public:
  148. const ::protobuf_unittest::TestRequired& message_with_required() const;
  149. ::protobuf_unittest::TestRequired* release_message_with_required();
  150. ::protobuf_unittest::TestRequired* mutable_message_with_required();
  151. void set_allocated_message_with_required(::protobuf_unittest::TestRequired* message_with_required);
  152. // @@protoc_insertion_point(class_scope:protobuf_unittest.TestLiteImportsNonlite)
  153. private:
  154. void set_has_message();
  155. void clear_has_message();
  156. void set_has_message_with_required();
  157. void clear_has_message_with_required();
  158. ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_;
  159. ::google::protobuf::internal::HasBits<1> _has_bits_;
  160. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  161. ::protobuf_unittest::TestAllTypes* message_;
  162. ::protobuf_unittest::TestRequired* message_with_required_;
  163. friend struct ::protobuf_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto::TableStruct;
  164. };
  165. // ===================================================================
  166. // ===================================================================
  167. #ifdef __GNUC__
  168. #pragma GCC diagnostic push
  169. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  170. #endif // __GNUC__
  171. // TestLiteImportsNonlite
  172. // optional .protobuf_unittest.TestAllTypes message = 1;
  173. inline bool TestLiteImportsNonlite::has_message() const {
  174. return (_has_bits_[0] & 0x00000001u) != 0;
  175. }
  176. inline void TestLiteImportsNonlite::set_has_message() {
  177. _has_bits_[0] |= 0x00000001u;
  178. }
  179. inline void TestLiteImportsNonlite::clear_has_message() {
  180. _has_bits_[0] &= ~0x00000001u;
  181. }
  182. inline const ::protobuf_unittest::TestAllTypes& TestLiteImportsNonlite::_internal_message() const {
  183. return *message_;
  184. }
  185. inline const ::protobuf_unittest::TestAllTypes& TestLiteImportsNonlite::message() const {
  186. const ::protobuf_unittest::TestAllTypes* p = message_;
  187. // @@protoc_insertion_point(field_get:protobuf_unittest.TestLiteImportsNonlite.message)
  188. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::TestAllTypes*>(
  189. &::protobuf_unittest::_TestAllTypes_default_instance_);
  190. }
  191. inline ::protobuf_unittest::TestAllTypes* TestLiteImportsNonlite::release_message() {
  192. // @@protoc_insertion_point(field_release:protobuf_unittest.TestLiteImportsNonlite.message)
  193. clear_has_message();
  194. ::protobuf_unittest::TestAllTypes* temp = message_;
  195. message_ = NULL;
  196. return temp;
  197. }
  198. inline ::protobuf_unittest::TestAllTypes* TestLiteImportsNonlite::mutable_message() {
  199. set_has_message();
  200. if (message_ == NULL) {
  201. auto* p = CreateMaybeMessage<::protobuf_unittest::TestAllTypes>(GetArenaNoVirtual());
  202. message_ = p;
  203. }
  204. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestLiteImportsNonlite.message)
  205. return message_;
  206. }
  207. inline void TestLiteImportsNonlite::set_allocated_message(::protobuf_unittest::TestAllTypes* message) {
  208. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  209. if (message_arena == NULL) {
  210. delete reinterpret_cast< ::google::protobuf::MessageLite*>(message_);
  211. }
  212. if (message) {
  213. ::google::protobuf::Arena* submessage_arena =
  214. reinterpret_cast<::google::protobuf::MessageLite*>(message)->GetArena();
  215. if (message_arena != submessage_arena) {
  216. message = ::google::protobuf::internal::GetOwnedMessage(
  217. message_arena, message, submessage_arena);
  218. }
  219. set_has_message();
  220. } else {
  221. clear_has_message();
  222. }
  223. message_ = message;
  224. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestLiteImportsNonlite.message)
  225. }
  226. // optional .protobuf_unittest.TestRequired message_with_required = 2;
  227. inline bool TestLiteImportsNonlite::has_message_with_required() const {
  228. return (_has_bits_[0] & 0x00000002u) != 0;
  229. }
  230. inline void TestLiteImportsNonlite::set_has_message_with_required() {
  231. _has_bits_[0] |= 0x00000002u;
  232. }
  233. inline void TestLiteImportsNonlite::clear_has_message_with_required() {
  234. _has_bits_[0] &= ~0x00000002u;
  235. }
  236. inline const ::protobuf_unittest::TestRequired& TestLiteImportsNonlite::_internal_message_with_required() const {
  237. return *message_with_required_;
  238. }
  239. inline const ::protobuf_unittest::TestRequired& TestLiteImportsNonlite::message_with_required() const {
  240. const ::protobuf_unittest::TestRequired* p = message_with_required_;
  241. // @@protoc_insertion_point(field_get:protobuf_unittest.TestLiteImportsNonlite.message_with_required)
  242. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::TestRequired*>(
  243. &::protobuf_unittest::_TestRequired_default_instance_);
  244. }
  245. inline ::protobuf_unittest::TestRequired* TestLiteImportsNonlite::release_message_with_required() {
  246. // @@protoc_insertion_point(field_release:protobuf_unittest.TestLiteImportsNonlite.message_with_required)
  247. clear_has_message_with_required();
  248. ::protobuf_unittest::TestRequired* temp = message_with_required_;
  249. message_with_required_ = NULL;
  250. return temp;
  251. }
  252. inline ::protobuf_unittest::TestRequired* TestLiteImportsNonlite::mutable_message_with_required() {
  253. set_has_message_with_required();
  254. if (message_with_required_ == NULL) {
  255. auto* p = CreateMaybeMessage<::protobuf_unittest::TestRequired>(GetArenaNoVirtual());
  256. message_with_required_ = p;
  257. }
  258. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestLiteImportsNonlite.message_with_required)
  259. return message_with_required_;
  260. }
  261. inline void TestLiteImportsNonlite::set_allocated_message_with_required(::protobuf_unittest::TestRequired* message_with_required) {
  262. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  263. if (message_arena == NULL) {
  264. delete reinterpret_cast< ::google::protobuf::MessageLite*>(message_with_required_);
  265. }
  266. if (message_with_required) {
  267. ::google::protobuf::Arena* submessage_arena =
  268. reinterpret_cast<::google::protobuf::MessageLite*>(message_with_required)->GetArena();
  269. if (message_arena != submessage_arena) {
  270. message_with_required = ::google::protobuf::internal::GetOwnedMessage(
  271. message_arena, message_with_required, submessage_arena);
  272. }
  273. set_has_message_with_required();
  274. } else {
  275. clear_has_message_with_required();
  276. }
  277. message_with_required_ = message_with_required;
  278. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestLiteImportsNonlite.message_with_required)
  279. }
  280. #ifdef __GNUC__
  281. #pragma GCC diagnostic pop
  282. #endif // __GNUC__
  283. // @@protoc_insertion_point(namespace_scope)
  284. } // namespace protobuf_unittest
  285. // @@protoc_insertion_point(global_scope)
  286. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5flite_5fimports_5fnonlite_2eproto