simpletest.pb.h 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: simpletest.proto
  3. #ifndef PROTOBUF_INCLUDED_simpletest_2eproto
  4. #define PROTOBUF_INCLUDED_simpletest_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_simpletest_2eproto
  30. namespace protobuf_simpletest_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. void AddDescriptors();
  41. } // namespace protobuf_simpletest_2eproto
  42. namespace qtprotobufnamespace {
  43. namespace tests {
  44. class SimpleStringMessage;
  45. class SimpleStringMessageDefaultTypeInternal;
  46. extern SimpleStringMessageDefaultTypeInternal _SimpleStringMessage_default_instance_;
  47. } // namespace tests
  48. } // namespace qtprotobufnamespace
  49. namespace google {
  50. namespace protobuf {
  51. template<> ::qtprotobufnamespace::tests::SimpleStringMessage* Arena::CreateMaybeMessage<::qtprotobufnamespace::tests::SimpleStringMessage>(Arena*);
  52. } // namespace protobuf
  53. } // namespace google
  54. namespace qtprotobufnamespace {
  55. namespace tests {
  56. // ===================================================================
  57. class SimpleStringMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobufnamespace.tests.SimpleStringMessage) */ {
  58. public:
  59. SimpleStringMessage();
  60. virtual ~SimpleStringMessage();
  61. SimpleStringMessage(const SimpleStringMessage& from);
  62. inline SimpleStringMessage& operator=(const SimpleStringMessage& from) {
  63. CopyFrom(from);
  64. return *this;
  65. }
  66. #if LANG_CXX11
  67. SimpleStringMessage(SimpleStringMessage&& from) noexcept
  68. : SimpleStringMessage() {
  69. *this = ::std::move(from);
  70. }
  71. inline SimpleStringMessage& operator=(SimpleStringMessage&& from) noexcept {
  72. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  73. if (this != &from) InternalSwap(&from);
  74. } else {
  75. CopyFrom(from);
  76. }
  77. return *this;
  78. }
  79. #endif
  80. static const ::google::protobuf::Descriptor* descriptor();
  81. static const SimpleStringMessage& default_instance();
  82. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  83. static inline const SimpleStringMessage* internal_default_instance() {
  84. return reinterpret_cast<const SimpleStringMessage*>(
  85. &_SimpleStringMessage_default_instance_);
  86. }
  87. static constexpr int kIndexInFileMessages =
  88. 0;
  89. void Swap(SimpleStringMessage* other);
  90. friend void swap(SimpleStringMessage& a, SimpleStringMessage& b) {
  91. a.Swap(&b);
  92. }
  93. // implements Message ----------------------------------------------
  94. inline SimpleStringMessage* New() const final {
  95. return CreateMaybeMessage<SimpleStringMessage>(NULL);
  96. }
  97. SimpleStringMessage* New(::google::protobuf::Arena* arena) const final {
  98. return CreateMaybeMessage<SimpleStringMessage>(arena);
  99. }
  100. void CopyFrom(const ::google::protobuf::Message& from) final;
  101. void MergeFrom(const ::google::protobuf::Message& from) final;
  102. void CopyFrom(const SimpleStringMessage& from);
  103. void MergeFrom(const SimpleStringMessage& from);
  104. void Clear() final;
  105. bool IsInitialized() const final;
  106. size_t ByteSizeLong() const final;
  107. bool MergePartialFromCodedStream(
  108. ::google::protobuf::io::CodedInputStream* input) final;
  109. void SerializeWithCachedSizes(
  110. ::google::protobuf::io::CodedOutputStream* output) const final;
  111. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  112. bool deterministic, ::google::protobuf::uint8* target) const final;
  113. int GetCachedSize() const final { return _cached_size_.Get(); }
  114. private:
  115. void SharedCtor();
  116. void SharedDtor();
  117. void SetCachedSize(int size) const final;
  118. void InternalSwap(SimpleStringMessage* 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. ::google::protobuf::Metadata GetMetadata() const final;
  128. // nested types ----------------------------------------------------
  129. // accessors -------------------------------------------------------
  130. // string testFieldString = 6;
  131. void clear_testfieldstring();
  132. static const int kTestFieldStringFieldNumber = 6;
  133. const ::std::string& testfieldstring() const;
  134. void set_testfieldstring(const ::std::string& value);
  135. #if LANG_CXX11
  136. void set_testfieldstring(::std::string&& value);
  137. #endif
  138. void set_testfieldstring(const char* value);
  139. void set_testfieldstring(const char* value, size_t size);
  140. ::std::string* mutable_testfieldstring();
  141. ::std::string* release_testfieldstring();
  142. void set_allocated_testfieldstring(::std::string* testfieldstring);
  143. // @@protoc_insertion_point(class_scope:qtprotobufnamespace.tests.SimpleStringMessage)
  144. private:
  145. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  146. ::google::protobuf::internal::ArenaStringPtr testfieldstring_;
  147. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  148. friend struct ::protobuf_simpletest_2eproto::TableStruct;
  149. };
  150. // ===================================================================
  151. // ===================================================================
  152. #ifdef __GNUC__
  153. #pragma GCC diagnostic push
  154. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  155. #endif // __GNUC__
  156. // SimpleStringMessage
  157. // string testFieldString = 6;
  158. inline void SimpleStringMessage::clear_testfieldstring() {
  159. testfieldstring_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  160. }
  161. inline const ::std::string& SimpleStringMessage::testfieldstring() const {
  162. // @@protoc_insertion_point(field_get:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  163. return testfieldstring_.GetNoArena();
  164. }
  165. inline void SimpleStringMessage::set_testfieldstring(const ::std::string& value) {
  166. testfieldstring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  167. // @@protoc_insertion_point(field_set:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  168. }
  169. #if LANG_CXX11
  170. inline void SimpleStringMessage::set_testfieldstring(::std::string&& value) {
  171. testfieldstring_.SetNoArena(
  172. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  173. // @@protoc_insertion_point(field_set_rvalue:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  174. }
  175. #endif
  176. inline void SimpleStringMessage::set_testfieldstring(const char* value) {
  177. GOOGLE_DCHECK(value != NULL);
  178. testfieldstring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  179. // @@protoc_insertion_point(field_set_char:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  180. }
  181. inline void SimpleStringMessage::set_testfieldstring(const char* value, size_t size) {
  182. testfieldstring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  183. ::std::string(reinterpret_cast<const char*>(value), size));
  184. // @@protoc_insertion_point(field_set_pointer:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  185. }
  186. inline ::std::string* SimpleStringMessage::mutable_testfieldstring() {
  187. // @@protoc_insertion_point(field_mutable:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  188. return testfieldstring_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  189. }
  190. inline ::std::string* SimpleStringMessage::release_testfieldstring() {
  191. // @@protoc_insertion_point(field_release:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  192. return testfieldstring_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  193. }
  194. inline void SimpleStringMessage::set_allocated_testfieldstring(::std::string* testfieldstring) {
  195. if (testfieldstring != NULL) {
  196. } else {
  197. }
  198. testfieldstring_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), testfieldstring);
  199. // @@protoc_insertion_point(field_set_allocated:qtprotobufnamespace.tests.SimpleStringMessage.testFieldString)
  200. }
  201. #ifdef __GNUC__
  202. #pragma GCC diagnostic pop
  203. #endif // __GNUC__
  204. // @@protoc_insertion_point(namespace_scope)
  205. } // namespace tests
  206. } // namespace qtprotobufnamespace
  207. // @@protoc_insertion_point(global_scope)
  208. #endif // PROTOBUF_INCLUDED_simpletest_2eproto