any_test.pb.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/any_test.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fany_5ftest_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2fany_5ftest_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. #include <google/protobuf/any.pb.h>
  29. // @@protoc_insertion_point(includes)
  30. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_5ftest_2eproto
  31. namespace protobuf_google_2fprotobuf_2fany_5ftest_2eproto {
  32. // Internal implementation detail -- do not use these members.
  33. struct TableStruct {
  34. static const ::google::protobuf::internal::ParseTableField entries[];
  35. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  36. static const ::google::protobuf::internal::ParseTable schema[1];
  37. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  38. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  39. static const ::google::protobuf::uint32 offsets[];
  40. };
  41. void AddDescriptors();
  42. } // namespace protobuf_google_2fprotobuf_2fany_5ftest_2eproto
  43. namespace protobuf_unittest {
  44. class TestAny;
  45. class TestAnyDefaultTypeInternal;
  46. extern TestAnyDefaultTypeInternal _TestAny_default_instance_;
  47. } // namespace protobuf_unittest
  48. namespace google {
  49. namespace protobuf {
  50. template<> ::protobuf_unittest::TestAny* Arena::CreateMaybeMessage<::protobuf_unittest::TestAny>(Arena*);
  51. } // namespace protobuf
  52. } // namespace google
  53. namespace protobuf_unittest {
  54. // ===================================================================
  55. class TestAny : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest.TestAny) */ {
  56. public:
  57. TestAny();
  58. virtual ~TestAny();
  59. TestAny(const TestAny& from);
  60. inline TestAny& operator=(const TestAny& from) {
  61. CopyFrom(from);
  62. return *this;
  63. }
  64. #if LANG_CXX11
  65. TestAny(TestAny&& from) noexcept
  66. : TestAny() {
  67. *this = ::std::move(from);
  68. }
  69. inline TestAny& operator=(TestAny&& from) noexcept {
  70. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  71. if (this != &from) InternalSwap(&from);
  72. } else {
  73. CopyFrom(from);
  74. }
  75. return *this;
  76. }
  77. #endif
  78. static const ::google::protobuf::Descriptor* descriptor();
  79. static const TestAny& default_instance();
  80. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  81. static inline const TestAny* internal_default_instance() {
  82. return reinterpret_cast<const TestAny*>(
  83. &_TestAny_default_instance_);
  84. }
  85. static constexpr int kIndexInFileMessages =
  86. 0;
  87. void Swap(TestAny* other);
  88. friend void swap(TestAny& a, TestAny& b) {
  89. a.Swap(&b);
  90. }
  91. // implements Message ----------------------------------------------
  92. inline TestAny* New() const final {
  93. return CreateMaybeMessage<TestAny>(NULL);
  94. }
  95. TestAny* New(::google::protobuf::Arena* arena) const final {
  96. return CreateMaybeMessage<TestAny>(arena);
  97. }
  98. void CopyFrom(const ::google::protobuf::Message& from) final;
  99. void MergeFrom(const ::google::protobuf::Message& from) final;
  100. void CopyFrom(const TestAny& from);
  101. void MergeFrom(const TestAny& from);
  102. void Clear() final;
  103. bool IsInitialized() const final;
  104. size_t ByteSizeLong() const final;
  105. bool MergePartialFromCodedStream(
  106. ::google::protobuf::io::CodedInputStream* input) final;
  107. void SerializeWithCachedSizes(
  108. ::google::protobuf::io::CodedOutputStream* output) const final;
  109. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  110. bool deterministic, ::google::protobuf::uint8* target) const final;
  111. int GetCachedSize() const final { return _cached_size_.Get(); }
  112. private:
  113. void SharedCtor();
  114. void SharedDtor();
  115. void SetCachedSize(int size) const final;
  116. void InternalSwap(TestAny* other);
  117. private:
  118. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  119. return NULL;
  120. }
  121. inline void* MaybeArenaPtr() const {
  122. return NULL;
  123. }
  124. public:
  125. ::google::protobuf::Metadata GetMetadata() const final;
  126. // nested types ----------------------------------------------------
  127. // accessors -------------------------------------------------------
  128. // repeated .google.protobuf.Any repeated_any_value = 3;
  129. int repeated_any_value_size() const;
  130. void clear_repeated_any_value();
  131. static const int kRepeatedAnyValueFieldNumber = 3;
  132. ::google::protobuf::Any* mutable_repeated_any_value(int index);
  133. ::google::protobuf::RepeatedPtrField< ::google::protobuf::Any >*
  134. mutable_repeated_any_value();
  135. const ::google::protobuf::Any& repeated_any_value(int index) const;
  136. ::google::protobuf::Any* add_repeated_any_value();
  137. const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Any >&
  138. repeated_any_value() const;
  139. // .google.protobuf.Any any_value = 2;
  140. bool has_any_value() const;
  141. void clear_any_value();
  142. static const int kAnyValueFieldNumber = 2;
  143. private:
  144. const ::google::protobuf::Any& _internal_any_value() const;
  145. public:
  146. const ::google::protobuf::Any& any_value() const;
  147. ::google::protobuf::Any* release_any_value();
  148. ::google::protobuf::Any* mutable_any_value();
  149. void set_allocated_any_value(::google::protobuf::Any* any_value);
  150. // int32 int32_value = 1;
  151. void clear_int32_value();
  152. static const int kInt32ValueFieldNumber = 1;
  153. ::google::protobuf::int32 int32_value() const;
  154. void set_int32_value(::google::protobuf::int32 value);
  155. // @@protoc_insertion_point(class_scope:protobuf_unittest.TestAny)
  156. private:
  157. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  158. ::google::protobuf::RepeatedPtrField< ::google::protobuf::Any > repeated_any_value_;
  159. ::google::protobuf::Any* any_value_;
  160. ::google::protobuf::int32 int32_value_;
  161. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  162. friend struct ::protobuf_google_2fprotobuf_2fany_5ftest_2eproto::TableStruct;
  163. };
  164. // ===================================================================
  165. // ===================================================================
  166. #ifdef __GNUC__
  167. #pragma GCC diagnostic push
  168. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  169. #endif // __GNUC__
  170. // TestAny
  171. // int32 int32_value = 1;
  172. inline void TestAny::clear_int32_value() {
  173. int32_value_ = 0;
  174. }
  175. inline ::google::protobuf::int32 TestAny::int32_value() const {
  176. // @@protoc_insertion_point(field_get:protobuf_unittest.TestAny.int32_value)
  177. return int32_value_;
  178. }
  179. inline void TestAny::set_int32_value(::google::protobuf::int32 value) {
  180. int32_value_ = value;
  181. // @@protoc_insertion_point(field_set:protobuf_unittest.TestAny.int32_value)
  182. }
  183. // .google.protobuf.Any any_value = 2;
  184. inline bool TestAny::has_any_value() const {
  185. return this != internal_default_instance() && any_value_ != NULL;
  186. }
  187. inline const ::google::protobuf::Any& TestAny::_internal_any_value() const {
  188. return *any_value_;
  189. }
  190. inline const ::google::protobuf::Any& TestAny::any_value() const {
  191. const ::google::protobuf::Any* p = any_value_;
  192. // @@protoc_insertion_point(field_get:protobuf_unittest.TestAny.any_value)
  193. return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Any*>(
  194. &::google::protobuf::_Any_default_instance_);
  195. }
  196. inline ::google::protobuf::Any* TestAny::release_any_value() {
  197. // @@protoc_insertion_point(field_release:protobuf_unittest.TestAny.any_value)
  198. ::google::protobuf::Any* temp = any_value_;
  199. any_value_ = NULL;
  200. return temp;
  201. }
  202. inline ::google::protobuf::Any* TestAny::mutable_any_value() {
  203. if (any_value_ == NULL) {
  204. auto* p = CreateMaybeMessage<::google::protobuf::Any>(GetArenaNoVirtual());
  205. any_value_ = p;
  206. }
  207. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestAny.any_value)
  208. return any_value_;
  209. }
  210. inline void TestAny::set_allocated_any_value(::google::protobuf::Any* any_value) {
  211. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  212. if (message_arena == NULL) {
  213. delete reinterpret_cast< ::google::protobuf::MessageLite*>(any_value_);
  214. }
  215. if (any_value) {
  216. ::google::protobuf::Arena* submessage_arena = NULL;
  217. if (message_arena != submessage_arena) {
  218. any_value = ::google::protobuf::internal::GetOwnedMessage(
  219. message_arena, any_value, submessage_arena);
  220. }
  221. } else {
  222. }
  223. any_value_ = any_value;
  224. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestAny.any_value)
  225. }
  226. // repeated .google.protobuf.Any repeated_any_value = 3;
  227. inline int TestAny::repeated_any_value_size() const {
  228. return repeated_any_value_.size();
  229. }
  230. inline ::google::protobuf::Any* TestAny::mutable_repeated_any_value(int index) {
  231. // @@protoc_insertion_point(field_mutable:protobuf_unittest.TestAny.repeated_any_value)
  232. return repeated_any_value_.Mutable(index);
  233. }
  234. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Any >*
  235. TestAny::mutable_repeated_any_value() {
  236. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest.TestAny.repeated_any_value)
  237. return &repeated_any_value_;
  238. }
  239. inline const ::google::protobuf::Any& TestAny::repeated_any_value(int index) const {
  240. // @@protoc_insertion_point(field_get:protobuf_unittest.TestAny.repeated_any_value)
  241. return repeated_any_value_.Get(index);
  242. }
  243. inline ::google::protobuf::Any* TestAny::add_repeated_any_value() {
  244. // @@protoc_insertion_point(field_add:protobuf_unittest.TestAny.repeated_any_value)
  245. return repeated_any_value_.Add();
  246. }
  247. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Any >&
  248. TestAny::repeated_any_value() const {
  249. // @@protoc_insertion_point(field_list:protobuf_unittest.TestAny.repeated_any_value)
  250. return repeated_any_value_;
  251. }
  252. #ifdef __GNUC__
  253. #pragma GCC diagnostic pop
  254. #endif // __GNUC__
  255. // @@protoc_insertion_point(namespace_scope)
  256. } // namespace protobuf_unittest
  257. // @@protoc_insertion_point(global_scope)
  258. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fany_5ftest_2eproto