message_differencer_unittest.pb.h 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/message_differencer_unittest.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_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_2futil_2fmessage_5fdifferencer_5funittest_2eproto
  30. namespace protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_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[3];
  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_2futil_2fmessage_5fdifferencer_5funittest_2eproto
  42. namespace protobuf_unittest {
  43. class TestDiffMessage;
  44. class TestDiffMessageDefaultTypeInternal;
  45. extern TestDiffMessageDefaultTypeInternal _TestDiffMessage_default_instance_;
  46. class TestDiffMessage_Item;
  47. class TestDiffMessage_ItemDefaultTypeInternal;
  48. extern TestDiffMessage_ItemDefaultTypeInternal _TestDiffMessage_Item_default_instance_;
  49. class TestField;
  50. class TestFieldDefaultTypeInternal;
  51. extern TestFieldDefaultTypeInternal _TestField_default_instance_;
  52. } // namespace protobuf_unittest
  53. namespace google {
  54. namespace protobuf {
  55. template<> ::protobuf_unittest::TestDiffMessage* Arena::CreateMaybeMessage<::protobuf_unittest::TestDiffMessage>(Arena*);
  56. template<> ::protobuf_unittest::TestDiffMessage_Item* Arena::CreateMaybeMessage<::protobuf_unittest::TestDiffMessage_Item>(Arena*);
  57. template<> ::protobuf_unittest::TestField* Arena::CreateMaybeMessage<::protobuf_unittest::TestField>(Arena*);
  58. } // namespace protobuf
  59. } // namespace google
  60. namespace protobuf_unittest {
  61. // ===================================================================
  62. class TestField : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestField) */ {
  63. public:
  64. TestField();
  65. virtual ~TestField();
  66. TestField(const TestField& from);
  67. inline TestField& operator=(const TestField& from) {
  68. CopyFrom(from);
  69. return *this;
  70. }
  71. #if LANG_CXX11
  72. TestField(TestField&& from) noexcept
  73. : TestField() {
  74. *this = ::std::move(from);
  75. }
  76. inline TestField& operator=(TestField&& from) noexcept {
  77. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  78. if (this != &from) InternalSwap(&from);
  79. } else {
  80. CopyFrom(from);
  81. }
  82. return *this;
  83. }
  84. #endif
  85. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  86. return _internal_metadata_.unknown_fields();
  87. }
  88. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  89. return _internal_metadata_.mutable_unknown_fields();
  90. }
  91. static const ::google::protobuf::Descriptor* descriptor();
  92. static const TestField& default_instance();
  93. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  94. static inline const TestField* internal_default_instance() {
  95. return reinterpret_cast<const TestField*>(
  96. &_TestField_default_instance_);
  97. }
  98. static constexpr int kIndexInFileMessages =
  99. 0;
  100. void Swap(TestField* other);
  101. friend void swap(TestField& a, TestField& b) {
  102. a.Swap(&b);
  103. }
  104. // implements Message ----------------------------------------------
  105. inline TestField* New() const final {
  106. return CreateMaybeMessage<TestField>(NULL);
  107. }
  108. TestField* New(::google::protobuf::Arena* arena) const final {
  109. return CreateMaybeMessage<TestField>(arena);
  110. }
  111. void CopyFrom(const ::google::protobuf::Message& from) final;
  112. void MergeFrom(const ::google::protobuf::Message& from) final;
  113. void CopyFrom(const TestField& from);
  114. void MergeFrom(const TestField& from);
  115. void Clear() final;
  116. bool IsInitialized() const final;
  117. size_t ByteSizeLong() const final;
  118. bool MergePartialFromCodedStream(
  119. ::google::protobuf::io::CodedInputStream* input) final;
  120. void SerializeWithCachedSizes(
  121. ::google::protobuf::io::CodedOutputStream* output) const final;
  122. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  123. bool deterministic, ::google::protobuf::uint8* target) const final;
  124. int GetCachedSize() const final { return _cached_size_.Get(); }
  125. private:
  126. void SharedCtor();
  127. void SharedDtor();
  128. void SetCachedSize(int size) const final;
  129. void InternalSwap(TestField* other);
  130. private:
  131. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  132. return NULL;
  133. }
  134. inline void* MaybeArenaPtr() const {
  135. return NULL;
  136. }
  137. public:
  138. ::google::protobuf::Metadata GetMetadata() const final;
  139. // nested types ----------------------------------------------------
  140. // accessors -------------------------------------------------------
  141. // repeated int32 rc = 2;
  142. int rc_size() const;
  143. void clear_rc();
  144. static const int kRcFieldNumber = 2;
  145. ::google::protobuf::int32 rc(int index) const;
  146. void set_rc(int index, ::google::protobuf::int32 value);
  147. void add_rc(::google::protobuf::int32 value);
  148. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  149. rc() const;
  150. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  151. mutable_rc();
  152. // optional .protobuf_unittest.TestField m = 5;
  153. bool has_m() const;
  154. void clear_m();
  155. static const int kMFieldNumber = 5;
  156. private:
  157. const ::protobuf_unittest::TestField& _internal_m() const;
  158. public:
  159. const ::protobuf_unittest::TestField& m() const;
  160. ::protobuf_unittest::TestField* release_m();
  161. ::protobuf_unittest::TestField* mutable_m();
  162. void set_allocated_m(::protobuf_unittest::TestField* m);
  163. // optional int32 c = 1;
  164. bool has_c() const;
  165. void clear_c();
  166. static const int kCFieldNumber = 1;
  167. ::google::protobuf::int32 c() const;
  168. void set_c(::google::protobuf::int32 value);
  169. // optional int32 a = 3;
  170. bool has_a() const;
  171. void clear_a();
  172. static const int kAFieldNumber = 3;
  173. ::google::protobuf::int32 a() const;
  174. void set_a(::google::protobuf::int32 value);
  175. // optional int32 b = 4;
  176. bool has_b() const;
  177. void clear_b();
  178. static const int kBFieldNumber = 4;
  179. ::google::protobuf::int32 b() const;
  180. void set_b(::google::protobuf::int32 value);
  181. static const int kTfFieldNumber = 100;
  182. static ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestDiffMessage,
  183. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestField >, 11, false >
  184. tf;
  185. // @@protoc_insertion_point(class_scope:protobuf_unittest.TestField)
  186. private:
  187. void set_has_a();
  188. void clear_has_a();
  189. void set_has_b();
  190. void clear_has_b();
  191. void set_has_c();
  192. void clear_has_c();
  193. void set_has_m();
  194. void clear_has_m();
  195. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  196. ::google::protobuf::internal::HasBits<1> _has_bits_;
  197. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  198. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > rc_;
  199. ::protobuf_unittest::TestField* m_;
  200. ::google::protobuf::int32 c_;
  201. ::google::protobuf::int32 a_;
  202. ::google::protobuf::int32 b_;
  203. friend struct ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::TableStruct;
  204. };
  205. // -------------------------------------------------------------------
  206. class TestDiffMessage_Item : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestDiffMessage.Item) */ {
  207. public:
  208. TestDiffMessage_Item();
  209. virtual ~TestDiffMessage_Item();
  210. TestDiffMessage_Item(const TestDiffMessage_Item& from);
  211. inline TestDiffMessage_Item& operator=(const TestDiffMessage_Item& from) {
  212. CopyFrom(from);
  213. return *this;
  214. }
  215. #if LANG_CXX11
  216. TestDiffMessage_Item(TestDiffMessage_Item&& from) noexcept
  217. : TestDiffMessage_Item() {
  218. *this = ::std::move(from);
  219. }
  220. inline TestDiffMessage_Item& operator=(TestDiffMessage_Item&& from) noexcept {
  221. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  222. if (this != &from) InternalSwap(&from);
  223. } else {
  224. CopyFrom(from);
  225. }
  226. return *this;
  227. }
  228. #endif
  229. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  230. return _internal_metadata_.unknown_fields();
  231. }
  232. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  233. return _internal_metadata_.mutable_unknown_fields();
  234. }
  235. static const ::google::protobuf::Descriptor* descriptor();
  236. static const TestDiffMessage_Item& default_instance();
  237. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  238. static inline const TestDiffMessage_Item* internal_default_instance() {
  239. return reinterpret_cast<const TestDiffMessage_Item*>(
  240. &_TestDiffMessage_Item_default_instance_);
  241. }
  242. static constexpr int kIndexInFileMessages =
  243. 1;
  244. void Swap(TestDiffMessage_Item* other);
  245. friend void swap(TestDiffMessage_Item& a, TestDiffMessage_Item& b) {
  246. a.Swap(&b);
  247. }
  248. // implements Message ----------------------------------------------
  249. inline TestDiffMessage_Item* New() const final {
  250. return CreateMaybeMessage<TestDiffMessage_Item>(NULL);
  251. }
  252. TestDiffMessage_Item* New(::google::protobuf::Arena* arena) const final {
  253. return CreateMaybeMessage<TestDiffMessage_Item>(arena);
  254. }
  255. void CopyFrom(const ::google::protobuf::Message& from) final;
  256. void MergeFrom(const ::google::protobuf::Message& from) final;
  257. void CopyFrom(const TestDiffMessage_Item& from);
  258. void MergeFrom(const TestDiffMessage_Item& from);
  259. void Clear() final;
  260. bool IsInitialized() const final;
  261. size_t ByteSizeLong() const final;
  262. bool MergePartialFromCodedStream(
  263. ::google::protobuf::io::CodedInputStream* input) final;
  264. void SerializeWithCachedSizes(
  265. ::google::protobuf::io::CodedOutputStream* output) const final;
  266. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  267. bool deterministic, ::google::protobuf::uint8* target) const final;
  268. int GetCachedSize() const final { return _cached_size_.Get(); }
  269. private:
  270. void SharedCtor();
  271. void SharedDtor();
  272. void SetCachedSize(int size) const final;
  273. void InternalSwap(TestDiffMessage_Item* other);
  274. private:
  275. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  276. return NULL;
  277. }
  278. inline void* MaybeArenaPtr() const {
  279. return NULL;
  280. }
  281. public:
  282. ::google::protobuf::Metadata GetMetadata() const final;
  283. // nested types ----------------------------------------------------
  284. // accessors -------------------------------------------------------
  285. // repeated int32 ra = 3;
  286. int ra_size() const;
  287. void clear_ra();
  288. static const int kRaFieldNumber = 3;
  289. ::google::protobuf::int32 ra(int index) const;
  290. void set_ra(int index, ::google::protobuf::int32 value);
  291. void add_ra(::google::protobuf::int32 value);
  292. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  293. ra() const;
  294. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  295. mutable_ra();
  296. // repeated string rb = 5;
  297. int rb_size() const;
  298. void clear_rb();
  299. static const int kRbFieldNumber = 5;
  300. const ::std::string& rb(int index) const;
  301. ::std::string* mutable_rb(int index);
  302. void set_rb(int index, const ::std::string& value);
  303. #if LANG_CXX11
  304. void set_rb(int index, ::std::string&& value);
  305. #endif
  306. void set_rb(int index, const char* value);
  307. void set_rb(int index, const char* value, size_t size);
  308. ::std::string* add_rb();
  309. void add_rb(const ::std::string& value);
  310. #if LANG_CXX11
  311. void add_rb(::std::string&& value);
  312. #endif
  313. void add_rb(const char* value);
  314. void add_rb(const char* value, size_t size);
  315. const ::google::protobuf::RepeatedPtrField< ::std::string>& rb() const;
  316. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_rb();
  317. // repeated .protobuf_unittest.TestField rm = 7;
  318. int rm_size() const;
  319. void clear_rm();
  320. static const int kRmFieldNumber = 7;
  321. ::protobuf_unittest::TestField* mutable_rm(int index);
  322. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >*
  323. mutable_rm();
  324. const ::protobuf_unittest::TestField& rm(int index) const;
  325. ::protobuf_unittest::TestField* add_rm();
  326. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >&
  327. rm() const;
  328. // optional string b = 4;
  329. bool has_b() const;
  330. void clear_b();
  331. static const int kBFieldNumber = 4;
  332. const ::std::string& b() const;
  333. void set_b(const ::std::string& value);
  334. #if LANG_CXX11
  335. void set_b(::std::string&& value);
  336. #endif
  337. void set_b(const char* value);
  338. void set_b(const char* value, size_t size);
  339. ::std::string* mutable_b();
  340. ::std::string* release_b();
  341. void set_allocated_b(::std::string* b);
  342. // optional .protobuf_unittest.TestField m = 6;
  343. bool has_m() const;
  344. void clear_m();
  345. static const int kMFieldNumber = 6;
  346. private:
  347. const ::protobuf_unittest::TestField& _internal_m() const;
  348. public:
  349. const ::protobuf_unittest::TestField& m() const;
  350. ::protobuf_unittest::TestField* release_m();
  351. ::protobuf_unittest::TestField* mutable_m();
  352. void set_allocated_m(::protobuf_unittest::TestField* m);
  353. // optional int32 a = 2;
  354. bool has_a() const;
  355. void clear_a();
  356. static const int kAFieldNumber = 2;
  357. ::google::protobuf::int32 a() const;
  358. void set_a(::google::protobuf::int32 value);
  359. // @@protoc_insertion_point(class_scope:protobuf_unittest.TestDiffMessage.Item)
  360. private:
  361. void set_has_a();
  362. void clear_has_a();
  363. void set_has_b();
  364. void clear_has_b();
  365. void set_has_m();
  366. void clear_has_m();
  367. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  368. ::google::protobuf::internal::HasBits<1> _has_bits_;
  369. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  370. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > ra_;
  371. ::google::protobuf::RepeatedPtrField< ::std::string> rb_;
  372. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField > rm_;
  373. ::google::protobuf::internal::ArenaStringPtr b_;
  374. ::protobuf_unittest::TestField* m_;
  375. ::google::protobuf::int32 a_;
  376. friend struct ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::TableStruct;
  377. };
  378. // -------------------------------------------------------------------
  379. class TestDiffMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestDiffMessage) */ {
  380. public:
  381. TestDiffMessage();
  382. virtual ~TestDiffMessage();
  383. TestDiffMessage(const TestDiffMessage& from);
  384. inline TestDiffMessage& operator=(const TestDiffMessage& from) {
  385. CopyFrom(from);
  386. return *this;
  387. }
  388. #if LANG_CXX11
  389. TestDiffMessage(TestDiffMessage&& from) noexcept
  390. : TestDiffMessage() {
  391. *this = ::std::move(from);
  392. }
  393. inline TestDiffMessage& operator=(TestDiffMessage&& from) noexcept {
  394. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  395. if (this != &from) InternalSwap(&from);
  396. } else {
  397. CopyFrom(from);
  398. }
  399. return *this;
  400. }
  401. #endif
  402. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  403. return _internal_metadata_.unknown_fields();
  404. }
  405. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  406. return _internal_metadata_.mutable_unknown_fields();
  407. }
  408. static const ::google::protobuf::Descriptor* descriptor();
  409. static const TestDiffMessage& default_instance();
  410. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  411. static inline const TestDiffMessage* internal_default_instance() {
  412. return reinterpret_cast<const TestDiffMessage*>(
  413. &_TestDiffMessage_default_instance_);
  414. }
  415. static constexpr int kIndexInFileMessages =
  416. 2;
  417. void Swap(TestDiffMessage* other);
  418. friend void swap(TestDiffMessage& a, TestDiffMessage& b) {
  419. a.Swap(&b);
  420. }
  421. // implements Message ----------------------------------------------
  422. inline TestDiffMessage* New() const final {
  423. return CreateMaybeMessage<TestDiffMessage>(NULL);
  424. }
  425. TestDiffMessage* New(::google::protobuf::Arena* arena) const final {
  426. return CreateMaybeMessage<TestDiffMessage>(arena);
  427. }
  428. void CopyFrom(const ::google::protobuf::Message& from) final;
  429. void MergeFrom(const ::google::protobuf::Message& from) final;
  430. void CopyFrom(const TestDiffMessage& from);
  431. void MergeFrom(const TestDiffMessage& from);
  432. void Clear() final;
  433. bool IsInitialized() const final;
  434. size_t ByteSizeLong() const final;
  435. bool MergePartialFromCodedStream(
  436. ::google::protobuf::io::CodedInputStream* input) final;
  437. void SerializeWithCachedSizes(
  438. ::google::protobuf::io::CodedOutputStream* output) const final;
  439. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  440. bool deterministic, ::google::protobuf::uint8* target) const final;
  441. int GetCachedSize() const final { return _cached_size_.Get(); }
  442. private:
  443. void SharedCtor();
  444. void SharedDtor();
  445. void SetCachedSize(int size) const final;
  446. void InternalSwap(TestDiffMessage* other);
  447. private:
  448. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  449. return NULL;
  450. }
  451. inline void* MaybeArenaPtr() const {
  452. return NULL;
  453. }
  454. public:
  455. ::google::protobuf::Metadata GetMetadata() const final;
  456. // nested types ----------------------------------------------------
  457. typedef TestDiffMessage_Item Item;
  458. // accessors -------------------------------------------------------
  459. // repeated group Item = 1 { ... };
  460. int item_size() const;
  461. void clear_item();
  462. static const int kItemFieldNumber = 1;
  463. ::protobuf_unittest::TestDiffMessage_Item* mutable_item(int index);
  464. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestDiffMessage_Item >*
  465. mutable_item();
  466. const ::protobuf_unittest::TestDiffMessage_Item& item(int index) const;
  467. ::protobuf_unittest::TestDiffMessage_Item* add_item();
  468. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestDiffMessage_Item >&
  469. item() const;
  470. // repeated string rw = 10;
  471. int rw_size() const;
  472. void clear_rw();
  473. static const int kRwFieldNumber = 10;
  474. const ::std::string& rw(int index) const;
  475. ::std::string* mutable_rw(int index);
  476. void set_rw(int index, const ::std::string& value);
  477. #if LANG_CXX11
  478. void set_rw(int index, ::std::string&& value);
  479. #endif
  480. void set_rw(int index, const char* value);
  481. void set_rw(int index, const char* value, size_t size);
  482. ::std::string* add_rw();
  483. void add_rw(const ::std::string& value);
  484. #if LANG_CXX11
  485. void add_rw(::std::string&& value);
  486. #endif
  487. void add_rw(const char* value);
  488. void add_rw(const char* value, size_t size);
  489. const ::google::protobuf::RepeatedPtrField< ::std::string>& rw() const;
  490. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_rw();
  491. // repeated int32 rv = 11;
  492. int rv_size() const;
  493. void clear_rv();
  494. static const int kRvFieldNumber = 11;
  495. ::google::protobuf::int32 rv(int index) const;
  496. void set_rv(int index, ::google::protobuf::int32 value);
  497. void add_rv(::google::protobuf::int32 value);
  498. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  499. rv() const;
  500. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  501. mutable_rv();
  502. // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
  503. GOOGLE_PROTOBUF_DEPRECATED_ATTR int rm_size() const;
  504. GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_rm();
  505. GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kRmFieldNumber = 12;
  506. GOOGLE_PROTOBUF_DEPRECATED_ATTR ::protobuf_unittest::TestField* mutable_rm(int index);
  507. GOOGLE_PROTOBUF_DEPRECATED_ATTR ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >*
  508. mutable_rm();
  509. GOOGLE_PROTOBUF_DEPRECATED_ATTR const ::protobuf_unittest::TestField& rm(int index) const;
  510. GOOGLE_PROTOBUF_DEPRECATED_ATTR ::protobuf_unittest::TestField* add_rm();
  511. GOOGLE_PROTOBUF_DEPRECATED_ATTR const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >&
  512. rm() const;
  513. // optional string w = 14;
  514. bool has_w() const;
  515. void clear_w();
  516. static const int kWFieldNumber = 14;
  517. const ::std::string& w() const;
  518. void set_w(const ::std::string& value);
  519. #if LANG_CXX11
  520. void set_w(::std::string&& value);
  521. #endif
  522. void set_w(const char* value);
  523. void set_w(const char* value, size_t size);
  524. ::std::string* mutable_w();
  525. ::std::string* release_w();
  526. void set_allocated_w(::std::string* w);
  527. // optional .protobuf_unittest.TestField m = 15;
  528. bool has_m() const;
  529. void clear_m();
  530. static const int kMFieldNumber = 15;
  531. private:
  532. const ::protobuf_unittest::TestField& _internal_m() const;
  533. public:
  534. const ::protobuf_unittest::TestField& m() const;
  535. ::protobuf_unittest::TestField* release_m();
  536. ::protobuf_unittest::TestField* mutable_m();
  537. void set_allocated_m(::protobuf_unittest::TestField* m);
  538. // optional int32 v = 13 [deprecated = true];
  539. GOOGLE_PROTOBUF_DEPRECATED_ATTR bool has_v() const;
  540. GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_v();
  541. GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kVFieldNumber = 13;
  542. GOOGLE_PROTOBUF_DEPRECATED_ATTR ::google::protobuf::int32 v() const;
  543. GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_v(::google::protobuf::int32 value);
  544. GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(TestDiffMessage)
  545. // @@protoc_insertion_point(class_scope:protobuf_unittest.TestDiffMessage)
  546. private:
  547. void set_has_v();
  548. void clear_has_v();
  549. void set_has_w();
  550. void clear_has_w();
  551. void set_has_m();
  552. void clear_has_m();
  553. ::google::protobuf::internal::ExtensionSet _extensions_;
  554. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  555. ::google::protobuf::internal::HasBits<1> _has_bits_;
  556. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  557. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestDiffMessage_Item > item_;
  558. ::google::protobuf::RepeatedPtrField< ::std::string> rw_;
  559. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > rv_;
  560. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField > rm_;
  561. ::google::protobuf::internal::ArenaStringPtr w_;
  562. ::protobuf_unittest::TestField* m_;
  563. ::google::protobuf::int32 v_;
  564. friend struct ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::TableStruct;
  565. };
  566. // ===================================================================
  567. // ===================================================================
  568. #ifdef __GNUC__
  569. #pragma GCC diagnostic push
  570. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  571. #endif // __GNUC__
  572. // TestField
  573. // optional int32 a = 3;
  574. inline bool TestField::has_a() const {
  575. return (_has_bits_[0] & 0x00000004u) != 0;
  576. }
  577. inline void TestField::set_has_a() {
  578. _has_bits_[0] |= 0x00000004u;
  579. }
  580. inline void TestField::clear_has_a() {
  581. _has_bits_[0] &= ~0x00000004u;
  582. }
  583. inline void TestField::clear_a() {
  584. a_ = 0;
  585. clear_has_a();
  586. }
  587. inline ::google::protobuf::int32 TestField::a() const {
  588. // @@protoc_insertion_point(field_get:protobuf_unittest.TestField.a)
  589. return a_;
  590. }
  591. inline void TestField::set_a(::google::protobuf::int32 value) {
  592. set_has_a();
  593. a_ = value;
  594. // @@protoc_insertion_point(field_set:protobuf_unittest.TestField.a)
  595. }
  596. // optional int32 b = 4;
  597. inline bool TestField::has_b() const {
  598. return (_has_bits_[0] & 0x00000008u) != 0;
  599. }
  600. inline void TestField::set_has_b() {
  601. _has_bits_[0] |= 0x00000008u;
  602. }
  603. inline void TestField::clear_has_b() {
  604. _has_bits_[0] &= ~0x00000008u;
  605. }
  606. inline void TestField::clear_b() {
  607. b_ = 0;
  608. clear_has_b();
  609. }
  610. inline ::google::protobuf::int32 TestField::b() const {
  611. // @@protoc_insertion_point(field_get:protobuf_unittest.TestField.b)
  612. return b_;
  613. }
  614. inline void TestField::set_b(::google::protobuf::int32 value) {
  615. set_has_b();
  616. b_ = value;
  617. // @@protoc_insertion_point(field_set:protobuf_unittest.TestField.b)
  618. }
  619. // optional int32 c = 1;
  620. inline bool TestField::has_c() const {
  621. return (_has_bits_[0] & 0x00000002u) != 0;
  622. }
  623. inline void TestField::set_has_c() {
  624. _has_bits_[0] |= 0x00000002u;
  625. }
  626. inline void TestField::clear_has_c() {
  627. _has_bits_[0] &= ~0x00000002u;
  628. }
  629. inline void TestField::clear_c() {
  630. c_ = 0;
  631. clear_has_c();
  632. }
  633. inline ::google::protobuf::int32 TestField::c() const {
  634. // @@protoc_insertion_point(field_get:protobuf_unittest.TestField.c)
  635. return c_;
  636. }
  637. inline void TestField::set_c(::google::protobuf::int32 value) {
  638. set_has_c();
  639. c_ = value;
  640. // @@protoc_insertion_point(field_set:protobuf_unittest.TestField.c)
  641. }
  642. // repeated int32 rc = 2;
  643. inline int TestField::rc_size() const {
  644. return rc_.size();
  645. }
  646. inline void TestField::clear_rc() {
  647. rc_.Clear();
  648. }
  649. inline ::google::protobuf::int32 TestField::rc(int index) const {
  650. // @@protoc_insertion_point(field_get:protobuf_unittest.TestField.rc)
  651. return rc_.Get(index);
  652. }
  653. inline void TestField::set_rc(int index, ::google::protobuf::int32 value) {
  654. rc_.Set(index, value);
  655. // @@protoc_insertion_point(field_set:protobuf_unittest.TestField.rc)
  656. }
  657. inline void TestField::add_rc(::google::protobuf::int32 value) {
  658. rc_.Add(value);
  659. // @@protoc_insertion_point(field_add:protobuf_unittest.TestField.rc)
  660. }
  661. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  662. TestField::rc() const {
  663. // @@protoc_insertion_point(field_list:protobuf_unittest.TestField.rc)
  664. return rc_;
  665. }
  666. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  667. TestField::mutable_rc() {
  668. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestField.rc)
  669. return &rc_;
  670. }
  671. // optional .protobuf_unittest.TestField m = 5;
  672. inline bool TestField::has_m() const {
  673. return (_has_bits_[0] & 0x00000001u) != 0;
  674. }
  675. inline void TestField::set_has_m() {
  676. _has_bits_[0] |= 0x00000001u;
  677. }
  678. inline void TestField::clear_has_m() {
  679. _has_bits_[0] &= ~0x00000001u;
  680. }
  681. inline void TestField::clear_m() {
  682. if (m_ != NULL) m_->Clear();
  683. clear_has_m();
  684. }
  685. inline const ::protobuf_unittest::TestField& TestField::_internal_m() const {
  686. return *m_;
  687. }
  688. inline const ::protobuf_unittest::TestField& TestField::m() const {
  689. const ::protobuf_unittest::TestField* p = m_;
  690. // @@protoc_insertion_point(field_get:protobuf_unittest.TestField.m)
  691. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::TestField*>(
  692. &::protobuf_unittest::_TestField_default_instance_);
  693. }
  694. inline ::protobuf_unittest::TestField* TestField::release_m() {
  695. // @@protoc_insertion_point(field_release:protobuf_unittest.TestField.m)
  696. clear_has_m();
  697. ::protobuf_unittest::TestField* temp = m_;
  698. m_ = NULL;
  699. return temp;
  700. }
  701. inline ::protobuf_unittest::TestField* TestField::mutable_m() {
  702. set_has_m();
  703. if (m_ == NULL) {
  704. auto* p = CreateMaybeMessage<::protobuf_unittest::TestField>(GetArenaNoVirtual());
  705. m_ = p;
  706. }
  707. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestField.m)
  708. return m_;
  709. }
  710. inline void TestField::set_allocated_m(::protobuf_unittest::TestField* m) {
  711. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  712. if (message_arena == NULL) {
  713. delete m_;
  714. }
  715. if (m) {
  716. ::google::protobuf::Arena* submessage_arena = NULL;
  717. if (message_arena != submessage_arena) {
  718. m = ::google::protobuf::internal::GetOwnedMessage(
  719. message_arena, m, submessage_arena);
  720. }
  721. set_has_m();
  722. } else {
  723. clear_has_m();
  724. }
  725. m_ = m;
  726. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestField.m)
  727. }
  728. // -------------------------------------------------------------------
  729. // TestDiffMessage_Item
  730. // optional int32 a = 2;
  731. inline bool TestDiffMessage_Item::has_a() const {
  732. return (_has_bits_[0] & 0x00000004u) != 0;
  733. }
  734. inline void TestDiffMessage_Item::set_has_a() {
  735. _has_bits_[0] |= 0x00000004u;
  736. }
  737. inline void TestDiffMessage_Item::clear_has_a() {
  738. _has_bits_[0] &= ~0x00000004u;
  739. }
  740. inline void TestDiffMessage_Item::clear_a() {
  741. a_ = 0;
  742. clear_has_a();
  743. }
  744. inline ::google::protobuf::int32 TestDiffMessage_Item::a() const {
  745. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.a)
  746. return a_;
  747. }
  748. inline void TestDiffMessage_Item::set_a(::google::protobuf::int32 value) {
  749. set_has_a();
  750. a_ = value;
  751. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.Item.a)
  752. }
  753. // optional string b = 4;
  754. inline bool TestDiffMessage_Item::has_b() const {
  755. return (_has_bits_[0] & 0x00000001u) != 0;
  756. }
  757. inline void TestDiffMessage_Item::set_has_b() {
  758. _has_bits_[0] |= 0x00000001u;
  759. }
  760. inline void TestDiffMessage_Item::clear_has_b() {
  761. _has_bits_[0] &= ~0x00000001u;
  762. }
  763. inline void TestDiffMessage_Item::clear_b() {
  764. b_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  765. clear_has_b();
  766. }
  767. inline const ::std::string& TestDiffMessage_Item::b() const {
  768. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.b)
  769. return b_.GetNoArena();
  770. }
  771. inline void TestDiffMessage_Item::set_b(const ::std::string& value) {
  772. set_has_b();
  773. b_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  774. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.Item.b)
  775. }
  776. #if LANG_CXX11
  777. inline void TestDiffMessage_Item::set_b(::std::string&& value) {
  778. set_has_b();
  779. b_.SetNoArena(
  780. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  781. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.TestDiffMessage.Item.b)
  782. }
  783. #endif
  784. inline void TestDiffMessage_Item::set_b(const char* value) {
  785. GOOGLE_DCHECK(value != NULL);
  786. set_has_b();
  787. b_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  788. // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestDiffMessage.Item.b)
  789. }
  790. inline void TestDiffMessage_Item::set_b(const char* value, size_t size) {
  791. set_has_b();
  792. b_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  793. ::std::string(reinterpret_cast<const char*>(value), size));
  794. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestDiffMessage.Item.b)
  795. }
  796. inline ::std::string* TestDiffMessage_Item::mutable_b() {
  797. set_has_b();
  798. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.Item.b)
  799. return b_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  800. }
  801. inline ::std::string* TestDiffMessage_Item::release_b() {
  802. // @@protoc_insertion_point(field_release:protobuf_unittest.TestDiffMessage.Item.b)
  803. if (!has_b()) {
  804. return NULL;
  805. }
  806. clear_has_b();
  807. return b_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  808. }
  809. inline void TestDiffMessage_Item::set_allocated_b(::std::string* b) {
  810. if (b != NULL) {
  811. set_has_b();
  812. } else {
  813. clear_has_b();
  814. }
  815. b_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), b);
  816. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestDiffMessage.Item.b)
  817. }
  818. // repeated int32 ra = 3;
  819. inline int TestDiffMessage_Item::ra_size() const {
  820. return ra_.size();
  821. }
  822. inline void TestDiffMessage_Item::clear_ra() {
  823. ra_.Clear();
  824. }
  825. inline ::google::protobuf::int32 TestDiffMessage_Item::ra(int index) const {
  826. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.ra)
  827. return ra_.Get(index);
  828. }
  829. inline void TestDiffMessage_Item::set_ra(int index, ::google::protobuf::int32 value) {
  830. ra_.Set(index, value);
  831. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.Item.ra)
  832. }
  833. inline void TestDiffMessage_Item::add_ra(::google::protobuf::int32 value) {
  834. ra_.Add(value);
  835. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.Item.ra)
  836. }
  837. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  838. TestDiffMessage_Item::ra() const {
  839. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.Item.ra)
  840. return ra_;
  841. }
  842. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  843. TestDiffMessage_Item::mutable_ra() {
  844. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.Item.ra)
  845. return &ra_;
  846. }
  847. // repeated string rb = 5;
  848. inline int TestDiffMessage_Item::rb_size() const {
  849. return rb_.size();
  850. }
  851. inline void TestDiffMessage_Item::clear_rb() {
  852. rb_.Clear();
  853. }
  854. inline const ::std::string& TestDiffMessage_Item::rb(int index) const {
  855. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.rb)
  856. return rb_.Get(index);
  857. }
  858. inline ::std::string* TestDiffMessage_Item::mutable_rb(int index) {
  859. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.Item.rb)
  860. return rb_.Mutable(index);
  861. }
  862. inline void TestDiffMessage_Item::set_rb(int index, const ::std::string& value) {
  863. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.Item.rb)
  864. rb_.Mutable(index)->assign(value);
  865. }
  866. #if LANG_CXX11
  867. inline void TestDiffMessage_Item::set_rb(int index, ::std::string&& value) {
  868. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.Item.rb)
  869. rb_.Mutable(index)->assign(std::move(value));
  870. }
  871. #endif
  872. inline void TestDiffMessage_Item::set_rb(int index, const char* value) {
  873. GOOGLE_DCHECK(value != NULL);
  874. rb_.Mutable(index)->assign(value);
  875. // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestDiffMessage.Item.rb)
  876. }
  877. inline void TestDiffMessage_Item::set_rb(int index, const char* value, size_t size) {
  878. rb_.Mutable(index)->assign(
  879. reinterpret_cast<const char*>(value), size);
  880. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestDiffMessage.Item.rb)
  881. }
  882. inline ::std::string* TestDiffMessage_Item::add_rb() {
  883. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest.TestDiffMessage.Item.rb)
  884. return rb_.Add();
  885. }
  886. inline void TestDiffMessage_Item::add_rb(const ::std::string& value) {
  887. rb_.Add()->assign(value);
  888. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.Item.rb)
  889. }
  890. #if LANG_CXX11
  891. inline void TestDiffMessage_Item::add_rb(::std::string&& value) {
  892. rb_.Add(std::move(value));
  893. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.Item.rb)
  894. }
  895. #endif
  896. inline void TestDiffMessage_Item::add_rb(const char* value) {
  897. GOOGLE_DCHECK(value != NULL);
  898. rb_.Add()->assign(value);
  899. // @@protoc_insertion_point(field_add_char:protobuf_unittest.TestDiffMessage.Item.rb)
  900. }
  901. inline void TestDiffMessage_Item::add_rb(const char* value, size_t size) {
  902. rb_.Add()->assign(reinterpret_cast<const char*>(value), size);
  903. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest.TestDiffMessage.Item.rb)
  904. }
  905. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  906. TestDiffMessage_Item::rb() const {
  907. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.Item.rb)
  908. return rb_;
  909. }
  910. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  911. TestDiffMessage_Item::mutable_rb() {
  912. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.Item.rb)
  913. return &rb_;
  914. }
  915. // optional .protobuf_unittest.TestField m = 6;
  916. inline bool TestDiffMessage_Item::has_m() const {
  917. return (_has_bits_[0] & 0x00000002u) != 0;
  918. }
  919. inline void TestDiffMessage_Item::set_has_m() {
  920. _has_bits_[0] |= 0x00000002u;
  921. }
  922. inline void TestDiffMessage_Item::clear_has_m() {
  923. _has_bits_[0] &= ~0x00000002u;
  924. }
  925. inline void TestDiffMessage_Item::clear_m() {
  926. if (m_ != NULL) m_->Clear();
  927. clear_has_m();
  928. }
  929. inline const ::protobuf_unittest::TestField& TestDiffMessage_Item::_internal_m() const {
  930. return *m_;
  931. }
  932. inline const ::protobuf_unittest::TestField& TestDiffMessage_Item::m() const {
  933. const ::protobuf_unittest::TestField* p = m_;
  934. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.m)
  935. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::TestField*>(
  936. &::protobuf_unittest::_TestField_default_instance_);
  937. }
  938. inline ::protobuf_unittest::TestField* TestDiffMessage_Item::release_m() {
  939. // @@protoc_insertion_point(field_release:protobuf_unittest.TestDiffMessage.Item.m)
  940. clear_has_m();
  941. ::protobuf_unittest::TestField* temp = m_;
  942. m_ = NULL;
  943. return temp;
  944. }
  945. inline ::protobuf_unittest::TestField* TestDiffMessage_Item::mutable_m() {
  946. set_has_m();
  947. if (m_ == NULL) {
  948. auto* p = CreateMaybeMessage<::protobuf_unittest::TestField>(GetArenaNoVirtual());
  949. m_ = p;
  950. }
  951. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.Item.m)
  952. return m_;
  953. }
  954. inline void TestDiffMessage_Item::set_allocated_m(::protobuf_unittest::TestField* m) {
  955. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  956. if (message_arena == NULL) {
  957. delete m_;
  958. }
  959. if (m) {
  960. ::google::protobuf::Arena* submessage_arena = NULL;
  961. if (message_arena != submessage_arena) {
  962. m = ::google::protobuf::internal::GetOwnedMessage(
  963. message_arena, m, submessage_arena);
  964. }
  965. set_has_m();
  966. } else {
  967. clear_has_m();
  968. }
  969. m_ = m;
  970. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestDiffMessage.Item.m)
  971. }
  972. // repeated .protobuf_unittest.TestField rm = 7;
  973. inline int TestDiffMessage_Item::rm_size() const {
  974. return rm_.size();
  975. }
  976. inline void TestDiffMessage_Item::clear_rm() {
  977. rm_.Clear();
  978. }
  979. inline ::protobuf_unittest::TestField* TestDiffMessage_Item::mutable_rm(int index) {
  980. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.Item.rm)
  981. return rm_.Mutable(index);
  982. }
  983. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >*
  984. TestDiffMessage_Item::mutable_rm() {
  985. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.Item.rm)
  986. return &rm_;
  987. }
  988. inline const ::protobuf_unittest::TestField& TestDiffMessage_Item::rm(int index) const {
  989. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.Item.rm)
  990. return rm_.Get(index);
  991. }
  992. inline ::protobuf_unittest::TestField* TestDiffMessage_Item::add_rm() {
  993. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.Item.rm)
  994. return rm_.Add();
  995. }
  996. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >&
  997. TestDiffMessage_Item::rm() const {
  998. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.Item.rm)
  999. return rm_;
  1000. }
  1001. // -------------------------------------------------------------------
  1002. // TestDiffMessage
  1003. // repeated group Item = 1 { ... };
  1004. inline int TestDiffMessage::item_size() const {
  1005. return item_.size();
  1006. }
  1007. inline void TestDiffMessage::clear_item() {
  1008. item_.Clear();
  1009. }
  1010. inline ::protobuf_unittest::TestDiffMessage_Item* TestDiffMessage::mutable_item(int index) {
  1011. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.item)
  1012. return item_.Mutable(index);
  1013. }
  1014. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestDiffMessage_Item >*
  1015. TestDiffMessage::mutable_item() {
  1016. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.item)
  1017. return &item_;
  1018. }
  1019. inline const ::protobuf_unittest::TestDiffMessage_Item& TestDiffMessage::item(int index) const {
  1020. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.item)
  1021. return item_.Get(index);
  1022. }
  1023. inline ::protobuf_unittest::TestDiffMessage_Item* TestDiffMessage::add_item() {
  1024. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.item)
  1025. return item_.Add();
  1026. }
  1027. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestDiffMessage_Item >&
  1028. TestDiffMessage::item() const {
  1029. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.item)
  1030. return item_;
  1031. }
  1032. // optional int32 v = 13 [deprecated = true];
  1033. inline bool TestDiffMessage::has_v() const {
  1034. return (_has_bits_[0] & 0x00000004u) != 0;
  1035. }
  1036. inline void TestDiffMessage::set_has_v() {
  1037. _has_bits_[0] |= 0x00000004u;
  1038. }
  1039. inline void TestDiffMessage::clear_has_v() {
  1040. _has_bits_[0] &= ~0x00000004u;
  1041. }
  1042. inline void TestDiffMessage::clear_v() {
  1043. v_ = 0;
  1044. clear_has_v();
  1045. }
  1046. inline ::google::protobuf::int32 TestDiffMessage::v() const {
  1047. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.v)
  1048. return v_;
  1049. }
  1050. inline void TestDiffMessage::set_v(::google::protobuf::int32 value) {
  1051. set_has_v();
  1052. v_ = value;
  1053. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.v)
  1054. }
  1055. // optional string w = 14;
  1056. inline bool TestDiffMessage::has_w() const {
  1057. return (_has_bits_[0] & 0x00000001u) != 0;
  1058. }
  1059. inline void TestDiffMessage::set_has_w() {
  1060. _has_bits_[0] |= 0x00000001u;
  1061. }
  1062. inline void TestDiffMessage::clear_has_w() {
  1063. _has_bits_[0] &= ~0x00000001u;
  1064. }
  1065. inline void TestDiffMessage::clear_w() {
  1066. w_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1067. clear_has_w();
  1068. }
  1069. inline const ::std::string& TestDiffMessage::w() const {
  1070. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.w)
  1071. return w_.GetNoArena();
  1072. }
  1073. inline void TestDiffMessage::set_w(const ::std::string& value) {
  1074. set_has_w();
  1075. w_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  1076. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.w)
  1077. }
  1078. #if LANG_CXX11
  1079. inline void TestDiffMessage::set_w(::std::string&& value) {
  1080. set_has_w();
  1081. w_.SetNoArena(
  1082. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  1083. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest.TestDiffMessage.w)
  1084. }
  1085. #endif
  1086. inline void TestDiffMessage::set_w(const char* value) {
  1087. GOOGLE_DCHECK(value != NULL);
  1088. set_has_w();
  1089. w_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  1090. // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestDiffMessage.w)
  1091. }
  1092. inline void TestDiffMessage::set_w(const char* value, size_t size) {
  1093. set_has_w();
  1094. w_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1095. ::std::string(reinterpret_cast<const char*>(value), size));
  1096. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestDiffMessage.w)
  1097. }
  1098. inline ::std::string* TestDiffMessage::mutable_w() {
  1099. set_has_w();
  1100. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.w)
  1101. return w_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1102. }
  1103. inline ::std::string* TestDiffMessage::release_w() {
  1104. // @@protoc_insertion_point(field_release:protobuf_unittest.TestDiffMessage.w)
  1105. if (!has_w()) {
  1106. return NULL;
  1107. }
  1108. clear_has_w();
  1109. return w_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1110. }
  1111. inline void TestDiffMessage::set_allocated_w(::std::string* w) {
  1112. if (w != NULL) {
  1113. set_has_w();
  1114. } else {
  1115. clear_has_w();
  1116. }
  1117. w_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), w);
  1118. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestDiffMessage.w)
  1119. }
  1120. // optional .protobuf_unittest.TestField m = 15;
  1121. inline bool TestDiffMessage::has_m() const {
  1122. return (_has_bits_[0] & 0x00000002u) != 0;
  1123. }
  1124. inline void TestDiffMessage::set_has_m() {
  1125. _has_bits_[0] |= 0x00000002u;
  1126. }
  1127. inline void TestDiffMessage::clear_has_m() {
  1128. _has_bits_[0] &= ~0x00000002u;
  1129. }
  1130. inline void TestDiffMessage::clear_m() {
  1131. if (m_ != NULL) m_->Clear();
  1132. clear_has_m();
  1133. }
  1134. inline const ::protobuf_unittest::TestField& TestDiffMessage::_internal_m() const {
  1135. return *m_;
  1136. }
  1137. inline const ::protobuf_unittest::TestField& TestDiffMessage::m() const {
  1138. const ::protobuf_unittest::TestField* p = m_;
  1139. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.m)
  1140. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest::TestField*>(
  1141. &::protobuf_unittest::_TestField_default_instance_);
  1142. }
  1143. inline ::protobuf_unittest::TestField* TestDiffMessage::release_m() {
  1144. // @@protoc_insertion_point(field_release:protobuf_unittest.TestDiffMessage.m)
  1145. clear_has_m();
  1146. ::protobuf_unittest::TestField* temp = m_;
  1147. m_ = NULL;
  1148. return temp;
  1149. }
  1150. inline ::protobuf_unittest::TestField* TestDiffMessage::mutable_m() {
  1151. set_has_m();
  1152. if (m_ == NULL) {
  1153. auto* p = CreateMaybeMessage<::protobuf_unittest::TestField>(GetArenaNoVirtual());
  1154. m_ = p;
  1155. }
  1156. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.m)
  1157. return m_;
  1158. }
  1159. inline void TestDiffMessage::set_allocated_m(::protobuf_unittest::TestField* m) {
  1160. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1161. if (message_arena == NULL) {
  1162. delete m_;
  1163. }
  1164. if (m) {
  1165. ::google::protobuf::Arena* submessage_arena = NULL;
  1166. if (message_arena != submessage_arena) {
  1167. m = ::google::protobuf::internal::GetOwnedMessage(
  1168. message_arena, m, submessage_arena);
  1169. }
  1170. set_has_m();
  1171. } else {
  1172. clear_has_m();
  1173. }
  1174. m_ = m;
  1175. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestDiffMessage.m)
  1176. }
  1177. // repeated int32 rv = 11;
  1178. inline int TestDiffMessage::rv_size() const {
  1179. return rv_.size();
  1180. }
  1181. inline void TestDiffMessage::clear_rv() {
  1182. rv_.Clear();
  1183. }
  1184. inline ::google::protobuf::int32 TestDiffMessage::rv(int index) const {
  1185. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.rv)
  1186. return rv_.Get(index);
  1187. }
  1188. inline void TestDiffMessage::set_rv(int index, ::google::protobuf::int32 value) {
  1189. rv_.Set(index, value);
  1190. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.rv)
  1191. }
  1192. inline void TestDiffMessage::add_rv(::google::protobuf::int32 value) {
  1193. rv_.Add(value);
  1194. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.rv)
  1195. }
  1196. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  1197. TestDiffMessage::rv() const {
  1198. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.rv)
  1199. return rv_;
  1200. }
  1201. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  1202. TestDiffMessage::mutable_rv() {
  1203. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.rv)
  1204. return &rv_;
  1205. }
  1206. // repeated string rw = 10;
  1207. inline int TestDiffMessage::rw_size() const {
  1208. return rw_.size();
  1209. }
  1210. inline void TestDiffMessage::clear_rw() {
  1211. rw_.Clear();
  1212. }
  1213. inline const ::std::string& TestDiffMessage::rw(int index) const {
  1214. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.rw)
  1215. return rw_.Get(index);
  1216. }
  1217. inline ::std::string* TestDiffMessage::mutable_rw(int index) {
  1218. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.rw)
  1219. return rw_.Mutable(index);
  1220. }
  1221. inline void TestDiffMessage::set_rw(int index, const ::std::string& value) {
  1222. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.rw)
  1223. rw_.Mutable(index)->assign(value);
  1224. }
  1225. #if LANG_CXX11
  1226. inline void TestDiffMessage::set_rw(int index, ::std::string&& value) {
  1227. // @@protoc_insertion_point(field_set:protobuf_unittest.TestDiffMessage.rw)
  1228. rw_.Mutable(index)->assign(std::move(value));
  1229. }
  1230. #endif
  1231. inline void TestDiffMessage::set_rw(int index, const char* value) {
  1232. GOOGLE_DCHECK(value != NULL);
  1233. rw_.Mutable(index)->assign(value);
  1234. // @@protoc_insertion_point(field_set_char:protobuf_unittest.TestDiffMessage.rw)
  1235. }
  1236. inline void TestDiffMessage::set_rw(int index, const char* value, size_t size) {
  1237. rw_.Mutable(index)->assign(
  1238. reinterpret_cast<const char*>(value), size);
  1239. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest.TestDiffMessage.rw)
  1240. }
  1241. inline ::std::string* TestDiffMessage::add_rw() {
  1242. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest.TestDiffMessage.rw)
  1243. return rw_.Add();
  1244. }
  1245. inline void TestDiffMessage::add_rw(const ::std::string& value) {
  1246. rw_.Add()->assign(value);
  1247. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.rw)
  1248. }
  1249. #if LANG_CXX11
  1250. inline void TestDiffMessage::add_rw(::std::string&& value) {
  1251. rw_.Add(std::move(value));
  1252. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.rw)
  1253. }
  1254. #endif
  1255. inline void TestDiffMessage::add_rw(const char* value) {
  1256. GOOGLE_DCHECK(value != NULL);
  1257. rw_.Add()->assign(value);
  1258. // @@protoc_insertion_point(field_add_char:protobuf_unittest.TestDiffMessage.rw)
  1259. }
  1260. inline void TestDiffMessage::add_rw(const char* value, size_t size) {
  1261. rw_.Add()->assign(reinterpret_cast<const char*>(value), size);
  1262. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest.TestDiffMessage.rw)
  1263. }
  1264. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  1265. TestDiffMessage::rw() const {
  1266. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.rw)
  1267. return rw_;
  1268. }
  1269. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  1270. TestDiffMessage::mutable_rw() {
  1271. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.rw)
  1272. return &rw_;
  1273. }
  1274. // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
  1275. inline int TestDiffMessage::rm_size() const {
  1276. return rm_.size();
  1277. }
  1278. inline void TestDiffMessage::clear_rm() {
  1279. rm_.Clear();
  1280. }
  1281. inline ::protobuf_unittest::TestField* TestDiffMessage::mutable_rm(int index) {
  1282. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestDiffMessage.rm)
  1283. return rm_.Mutable(index);
  1284. }
  1285. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >*
  1286. TestDiffMessage::mutable_rm() {
  1287. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestDiffMessage.rm)
  1288. return &rm_;
  1289. }
  1290. inline const ::protobuf_unittest::TestField& TestDiffMessage::rm(int index) const {
  1291. // @@protoc_insertion_point(field_get:protobuf_unittest.TestDiffMessage.rm)
  1292. return rm_.Get(index);
  1293. }
  1294. inline ::protobuf_unittest::TestField* TestDiffMessage::add_rm() {
  1295. // @@protoc_insertion_point(field_add:protobuf_unittest.TestDiffMessage.rm)
  1296. return rm_.Add();
  1297. }
  1298. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest::TestField >&
  1299. TestDiffMessage::rm() const {
  1300. // @@protoc_insertion_point(field_list:protobuf_unittest.TestDiffMessage.rm)
  1301. return rm_;
  1302. }
  1303. #ifdef __GNUC__
  1304. #pragma GCC diagnostic pop
  1305. #endif // __GNUC__
  1306. // -------------------------------------------------------------------
  1307. // -------------------------------------------------------------------
  1308. // @@protoc_insertion_point(namespace_scope)
  1309. } // namespace protobuf_unittest
  1310. // @@protoc_insertion_point(global_scope)
  1311. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto