unittest_mset_wire_format.pb.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_mset_wire_format.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_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.h>
  24. #include <google/protobuf/message.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/unknown_field_set.h>
  28. // @@protoc_insertion_point(includes)
  29. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto
  30. namespace protobuf_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_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[2];
  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. void AddDescriptors();
  41. } // namespace protobuf_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto
  42. namespace proto2_wireformat_unittest {
  43. class TestMessageSet;
  44. class TestMessageSetDefaultTypeInternal;
  45. extern TestMessageSetDefaultTypeInternal _TestMessageSet_default_instance_;
  46. class TestMessageSetWireFormatContainer;
  47. class TestMessageSetWireFormatContainerDefaultTypeInternal;
  48. extern TestMessageSetWireFormatContainerDefaultTypeInternal _TestMessageSetWireFormatContainer_default_instance_;
  49. } // namespace proto2_wireformat_unittest
  50. namespace google {
  51. namespace protobuf {
  52. template<> ::proto2_wireformat_unittest::TestMessageSet* Arena::CreateMaybeMessage<::proto2_wireformat_unittest::TestMessageSet>(Arena*);
  53. template<> ::proto2_wireformat_unittest::TestMessageSetWireFormatContainer* Arena::CreateMaybeMessage<::proto2_wireformat_unittest::TestMessageSetWireFormatContainer>(Arena*);
  54. } // namespace protobuf
  55. } // namespace google
  56. namespace proto2_wireformat_unittest {
  57. // ===================================================================
  58. class TestMessageSet : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:proto2_wireformat_unittest.TestMessageSet) */ {
  59. public:
  60. TestMessageSet();
  61. virtual ~TestMessageSet();
  62. TestMessageSet(const TestMessageSet& from);
  63. inline TestMessageSet& operator=(const TestMessageSet& from) {
  64. CopyFrom(from);
  65. return *this;
  66. }
  67. #if LANG_CXX11
  68. TestMessageSet(TestMessageSet&& from) noexcept
  69. : TestMessageSet() {
  70. *this = ::std::move(from);
  71. }
  72. inline TestMessageSet& operator=(TestMessageSet&& from) noexcept {
  73. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  74. if (this != &from) InternalSwap(&from);
  75. } else {
  76. CopyFrom(from);
  77. }
  78. return *this;
  79. }
  80. #endif
  81. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  82. return _internal_metadata_.unknown_fields();
  83. }
  84. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  85. return _internal_metadata_.mutable_unknown_fields();
  86. }
  87. inline ::google::protobuf::Arena* GetArena() const final {
  88. return GetArenaNoVirtual();
  89. }
  90. inline void* GetMaybeArenaPointer() const final {
  91. return MaybeArenaPtr();
  92. }
  93. static const ::google::protobuf::Descriptor* descriptor();
  94. static const TestMessageSet& default_instance();
  95. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  96. static inline const TestMessageSet* internal_default_instance() {
  97. return reinterpret_cast<const TestMessageSet*>(
  98. &_TestMessageSet_default_instance_);
  99. }
  100. static constexpr int kIndexInFileMessages =
  101. 0;
  102. void UnsafeArenaSwap(TestMessageSet* other);
  103. void Swap(TestMessageSet* other);
  104. friend void swap(TestMessageSet& a, TestMessageSet& b) {
  105. a.Swap(&b);
  106. }
  107. // implements Message ----------------------------------------------
  108. inline TestMessageSet* New() const final {
  109. return CreateMaybeMessage<TestMessageSet>(NULL);
  110. }
  111. TestMessageSet* New(::google::protobuf::Arena* arena) const final {
  112. return CreateMaybeMessage<TestMessageSet>(arena);
  113. }
  114. void CopyFrom(const ::google::protobuf::Message& from) final;
  115. void MergeFrom(const ::google::protobuf::Message& from) final;
  116. void CopyFrom(const TestMessageSet& from);
  117. void MergeFrom(const TestMessageSet& from);
  118. void Clear() final;
  119. bool IsInitialized() const final;
  120. size_t ByteSizeLong() const final;
  121. bool MergePartialFromCodedStream(
  122. ::google::protobuf::io::CodedInputStream* input) final;
  123. void SerializeWithCachedSizes(
  124. ::google::protobuf::io::CodedOutputStream* output) const final;
  125. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  126. bool deterministic, ::google::protobuf::uint8* target) const final;
  127. int GetCachedSize() const final { return _cached_size_.Get(); }
  128. private:
  129. void SharedCtor();
  130. void SharedDtor();
  131. void SetCachedSize(int size) const final;
  132. void InternalSwap(TestMessageSet* other);
  133. protected:
  134. explicit TestMessageSet(::google::protobuf::Arena* arena);
  135. private:
  136. static void ArenaDtor(void* object);
  137. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  138. private:
  139. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  140. return _internal_metadata_.arena();
  141. }
  142. inline void* MaybeArenaPtr() const {
  143. return _internal_metadata_.raw_arena_ptr();
  144. }
  145. public:
  146. ::google::protobuf::Metadata GetMetadata() const final;
  147. // nested types ----------------------------------------------------
  148. // accessors -------------------------------------------------------
  149. GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(TestMessageSet)
  150. // @@protoc_insertion_point(class_scope:proto2_wireformat_unittest.TestMessageSet)
  151. private:
  152. ::google::protobuf::internal::ExtensionSet _extensions_;
  153. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  154. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  155. typedef void InternalArenaConstructable_;
  156. typedef void DestructorSkippable_;
  157. ::google::protobuf::internal::HasBits<1> _has_bits_;
  158. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  159. friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto::TableStruct;
  160. };
  161. // -------------------------------------------------------------------
  162. class TestMessageSetWireFormatContainer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:proto2_wireformat_unittest.TestMessageSetWireFormatContainer) */ {
  163. public:
  164. TestMessageSetWireFormatContainer();
  165. virtual ~TestMessageSetWireFormatContainer();
  166. TestMessageSetWireFormatContainer(const TestMessageSetWireFormatContainer& from);
  167. inline TestMessageSetWireFormatContainer& operator=(const TestMessageSetWireFormatContainer& from) {
  168. CopyFrom(from);
  169. return *this;
  170. }
  171. #if LANG_CXX11
  172. TestMessageSetWireFormatContainer(TestMessageSetWireFormatContainer&& from) noexcept
  173. : TestMessageSetWireFormatContainer() {
  174. *this = ::std::move(from);
  175. }
  176. inline TestMessageSetWireFormatContainer& operator=(TestMessageSetWireFormatContainer&& from) noexcept {
  177. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  178. if (this != &from) InternalSwap(&from);
  179. } else {
  180. CopyFrom(from);
  181. }
  182. return *this;
  183. }
  184. #endif
  185. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  186. return _internal_metadata_.unknown_fields();
  187. }
  188. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  189. return _internal_metadata_.mutable_unknown_fields();
  190. }
  191. inline ::google::protobuf::Arena* GetArena() const final {
  192. return GetArenaNoVirtual();
  193. }
  194. inline void* GetMaybeArenaPointer() const final {
  195. return MaybeArenaPtr();
  196. }
  197. static const ::google::protobuf::Descriptor* descriptor();
  198. static const TestMessageSetWireFormatContainer& default_instance();
  199. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  200. static inline const TestMessageSetWireFormatContainer* internal_default_instance() {
  201. return reinterpret_cast<const TestMessageSetWireFormatContainer*>(
  202. &_TestMessageSetWireFormatContainer_default_instance_);
  203. }
  204. static constexpr int kIndexInFileMessages =
  205. 1;
  206. void UnsafeArenaSwap(TestMessageSetWireFormatContainer* other);
  207. void Swap(TestMessageSetWireFormatContainer* other);
  208. friend void swap(TestMessageSetWireFormatContainer& a, TestMessageSetWireFormatContainer& b) {
  209. a.Swap(&b);
  210. }
  211. // implements Message ----------------------------------------------
  212. inline TestMessageSetWireFormatContainer* New() const final {
  213. return CreateMaybeMessage<TestMessageSetWireFormatContainer>(NULL);
  214. }
  215. TestMessageSetWireFormatContainer* New(::google::protobuf::Arena* arena) const final {
  216. return CreateMaybeMessage<TestMessageSetWireFormatContainer>(arena);
  217. }
  218. void CopyFrom(const ::google::protobuf::Message& from) final;
  219. void MergeFrom(const ::google::protobuf::Message& from) final;
  220. void CopyFrom(const TestMessageSetWireFormatContainer& from);
  221. void MergeFrom(const TestMessageSetWireFormatContainer& from);
  222. void Clear() final;
  223. bool IsInitialized() const final;
  224. size_t ByteSizeLong() const final;
  225. bool MergePartialFromCodedStream(
  226. ::google::protobuf::io::CodedInputStream* input) final;
  227. void SerializeWithCachedSizes(
  228. ::google::protobuf::io::CodedOutputStream* output) const final;
  229. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  230. bool deterministic, ::google::protobuf::uint8* target) const final;
  231. int GetCachedSize() const final { return _cached_size_.Get(); }
  232. private:
  233. void SharedCtor();
  234. void SharedDtor();
  235. void SetCachedSize(int size) const final;
  236. void InternalSwap(TestMessageSetWireFormatContainer* other);
  237. protected:
  238. explicit TestMessageSetWireFormatContainer(::google::protobuf::Arena* arena);
  239. private:
  240. static void ArenaDtor(void* object);
  241. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  242. private:
  243. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  244. return _internal_metadata_.arena();
  245. }
  246. inline void* MaybeArenaPtr() const {
  247. return _internal_metadata_.raw_arena_ptr();
  248. }
  249. public:
  250. ::google::protobuf::Metadata GetMetadata() const final;
  251. // nested types ----------------------------------------------------
  252. // accessors -------------------------------------------------------
  253. // optional .proto2_wireformat_unittest.TestMessageSet message_set = 1;
  254. bool has_message_set() const;
  255. void clear_message_set();
  256. static const int kMessageSetFieldNumber = 1;
  257. private:
  258. const ::proto2_wireformat_unittest::TestMessageSet& _internal_message_set() const;
  259. public:
  260. const ::proto2_wireformat_unittest::TestMessageSet& message_set() const;
  261. ::proto2_wireformat_unittest::TestMessageSet* release_message_set();
  262. ::proto2_wireformat_unittest::TestMessageSet* mutable_message_set();
  263. void set_allocated_message_set(::proto2_wireformat_unittest::TestMessageSet* message_set);
  264. void unsafe_arena_set_allocated_message_set(
  265. ::proto2_wireformat_unittest::TestMessageSet* message_set);
  266. ::proto2_wireformat_unittest::TestMessageSet* unsafe_arena_release_message_set();
  267. // @@protoc_insertion_point(class_scope:proto2_wireformat_unittest.TestMessageSetWireFormatContainer)
  268. private:
  269. void set_has_message_set();
  270. void clear_has_message_set();
  271. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  272. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  273. typedef void InternalArenaConstructable_;
  274. typedef void DestructorSkippable_;
  275. ::google::protobuf::internal::HasBits<1> _has_bits_;
  276. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  277. ::proto2_wireformat_unittest::TestMessageSet* message_set_;
  278. friend struct ::protobuf_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto::TableStruct;
  279. };
  280. // ===================================================================
  281. // ===================================================================
  282. #ifdef __GNUC__
  283. #pragma GCC diagnostic push
  284. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  285. #endif // __GNUC__
  286. // TestMessageSet
  287. // -------------------------------------------------------------------
  288. // TestMessageSetWireFormatContainer
  289. // optional .proto2_wireformat_unittest.TestMessageSet message_set = 1;
  290. inline bool TestMessageSetWireFormatContainer::has_message_set() const {
  291. return (_has_bits_[0] & 0x00000001u) != 0;
  292. }
  293. inline void TestMessageSetWireFormatContainer::set_has_message_set() {
  294. _has_bits_[0] |= 0x00000001u;
  295. }
  296. inline void TestMessageSetWireFormatContainer::clear_has_message_set() {
  297. _has_bits_[0] &= ~0x00000001u;
  298. }
  299. inline void TestMessageSetWireFormatContainer::clear_message_set() {
  300. if (message_set_ != NULL) message_set_->Clear();
  301. clear_has_message_set();
  302. }
  303. inline const ::proto2_wireformat_unittest::TestMessageSet& TestMessageSetWireFormatContainer::_internal_message_set() const {
  304. return *message_set_;
  305. }
  306. inline const ::proto2_wireformat_unittest::TestMessageSet& TestMessageSetWireFormatContainer::message_set() const {
  307. const ::proto2_wireformat_unittest::TestMessageSet* p = message_set_;
  308. // @@protoc_insertion_point(field_get:proto2_wireformat_unittest.TestMessageSetWireFormatContainer.message_set)
  309. return p != NULL ? *p : *reinterpret_cast<const ::proto2_wireformat_unittest::TestMessageSet*>(
  310. &::proto2_wireformat_unittest::_TestMessageSet_default_instance_);
  311. }
  312. inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetWireFormatContainer::release_message_set() {
  313. // @@protoc_insertion_point(field_release:proto2_wireformat_unittest.TestMessageSetWireFormatContainer.message_set)
  314. clear_has_message_set();
  315. ::proto2_wireformat_unittest::TestMessageSet* temp = message_set_;
  316. if (GetArenaNoVirtual() != NULL) {
  317. temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
  318. }
  319. message_set_ = NULL;
  320. return temp;
  321. }
  322. inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetWireFormatContainer::unsafe_arena_release_message_set() {
  323. // @@protoc_insertion_point(field_unsafe_arena_release:proto2_wireformat_unittest.TestMessageSetWireFormatContainer.message_set)
  324. clear_has_message_set();
  325. ::proto2_wireformat_unittest::TestMessageSet* temp = message_set_;
  326. message_set_ = NULL;
  327. return temp;
  328. }
  329. inline ::proto2_wireformat_unittest::TestMessageSet* TestMessageSetWireFormatContainer::mutable_message_set() {
  330. set_has_message_set();
  331. if (message_set_ == NULL) {
  332. auto* p = CreateMaybeMessage<::proto2_wireformat_unittest::TestMessageSet>(GetArenaNoVirtual());
  333. message_set_ = p;
  334. }
  335. // @@protoc_insertion_point(field_mutable:proto2_wireformat_unittest.TestMessageSetWireFormatContainer.message_set)
  336. return message_set_;
  337. }
  338. inline void TestMessageSetWireFormatContainer::set_allocated_message_set(::proto2_wireformat_unittest::TestMessageSet* message_set) {
  339. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  340. if (message_arena == NULL) {
  341. delete message_set_;
  342. }
  343. if (message_set) {
  344. ::google::protobuf::Arena* submessage_arena =
  345. ::google::protobuf::Arena::GetArena(message_set);
  346. if (message_arena != submessage_arena) {
  347. message_set = ::google::protobuf::internal::GetOwnedMessage(
  348. message_arena, message_set, submessage_arena);
  349. }
  350. set_has_message_set();
  351. } else {
  352. clear_has_message_set();
  353. }
  354. message_set_ = message_set;
  355. // @@protoc_insertion_point(field_set_allocated:proto2_wireformat_unittest.TestMessageSetWireFormatContainer.message_set)
  356. }
  357. #ifdef __GNUC__
  358. #pragma GCC diagnostic pop
  359. #endif // __GNUC__
  360. // -------------------------------------------------------------------
  361. // @@protoc_insertion_point(namespace_scope)
  362. } // namespace proto2_wireformat_unittest
  363. // @@protoc_insertion_point(global_scope)
  364. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fmset_5fwire_5fformat_2eproto