proto3.pb.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/proto3.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_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/generated_enum_reflection.h>
  28. #include <google/protobuf/unknown_field_set.h>
  29. // @@protoc_insertion_point(includes)
  30. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_2eproto
  31. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_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_2futil_2finternal_2ftestdata_2fproto3_2eproto
  43. namespace google {
  44. namespace protobuf {
  45. namespace testing {
  46. class Proto3Message;
  47. class Proto3MessageDefaultTypeInternal;
  48. extern Proto3MessageDefaultTypeInternal _Proto3Message_default_instance_;
  49. } // namespace testing
  50. } // namespace protobuf
  51. } // namespace google
  52. namespace google {
  53. namespace protobuf {
  54. template<> ::google::protobuf::testing::Proto3Message* Arena::CreateMaybeMessage<::google::protobuf::testing::Proto3Message>(Arena*);
  55. } // namespace protobuf
  56. } // namespace google
  57. namespace google {
  58. namespace protobuf {
  59. namespace testing {
  60. enum Proto3Message_NestedEnum {
  61. Proto3Message_NestedEnum_FOO = 0,
  62. Proto3Message_NestedEnum_BAR = 1,
  63. Proto3Message_NestedEnum_BAZ = 2,
  64. Proto3Message_NestedEnum_Proto3Message_NestedEnum_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
  65. Proto3Message_NestedEnum_Proto3Message_NestedEnum_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
  66. };
  67. bool Proto3Message_NestedEnum_IsValid(int value);
  68. const Proto3Message_NestedEnum Proto3Message_NestedEnum_NestedEnum_MIN = Proto3Message_NestedEnum_FOO;
  69. const Proto3Message_NestedEnum Proto3Message_NestedEnum_NestedEnum_MAX = Proto3Message_NestedEnum_BAZ;
  70. const int Proto3Message_NestedEnum_NestedEnum_ARRAYSIZE = Proto3Message_NestedEnum_NestedEnum_MAX + 1;
  71. const ::google::protobuf::EnumDescriptor* Proto3Message_NestedEnum_descriptor();
  72. inline const ::std::string& Proto3Message_NestedEnum_Name(Proto3Message_NestedEnum value) {
  73. return ::google::protobuf::internal::NameOfEnum(
  74. Proto3Message_NestedEnum_descriptor(), value);
  75. }
  76. inline bool Proto3Message_NestedEnum_Parse(
  77. const ::std::string& name, Proto3Message_NestedEnum* value) {
  78. return ::google::protobuf::internal::ParseNamedEnum<Proto3Message_NestedEnum>(
  79. Proto3Message_NestedEnum_descriptor(), name, value);
  80. }
  81. // ===================================================================
  82. class Proto3Message : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.Proto3Message) */ {
  83. public:
  84. Proto3Message();
  85. virtual ~Proto3Message();
  86. Proto3Message(const Proto3Message& from);
  87. inline Proto3Message& operator=(const Proto3Message& from) {
  88. CopyFrom(from);
  89. return *this;
  90. }
  91. #if LANG_CXX11
  92. Proto3Message(Proto3Message&& from) noexcept
  93. : Proto3Message() {
  94. *this = ::std::move(from);
  95. }
  96. inline Proto3Message& operator=(Proto3Message&& from) noexcept {
  97. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  98. if (this != &from) InternalSwap(&from);
  99. } else {
  100. CopyFrom(from);
  101. }
  102. return *this;
  103. }
  104. #endif
  105. static const ::google::protobuf::Descriptor* descriptor();
  106. static const Proto3Message& default_instance();
  107. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  108. static inline const Proto3Message* internal_default_instance() {
  109. return reinterpret_cast<const Proto3Message*>(
  110. &_Proto3Message_default_instance_);
  111. }
  112. static constexpr int kIndexInFileMessages =
  113. 0;
  114. void Swap(Proto3Message* other);
  115. friend void swap(Proto3Message& a, Proto3Message& b) {
  116. a.Swap(&b);
  117. }
  118. // implements Message ----------------------------------------------
  119. inline Proto3Message* New() const final {
  120. return CreateMaybeMessage<Proto3Message>(NULL);
  121. }
  122. Proto3Message* New(::google::protobuf::Arena* arena) const final {
  123. return CreateMaybeMessage<Proto3Message>(arena);
  124. }
  125. void CopyFrom(const ::google::protobuf::Message& from) final;
  126. void MergeFrom(const ::google::protobuf::Message& from) final;
  127. void CopyFrom(const Proto3Message& from);
  128. void MergeFrom(const Proto3Message& from);
  129. void Clear() final;
  130. bool IsInitialized() const final;
  131. size_t ByteSizeLong() const final;
  132. bool MergePartialFromCodedStream(
  133. ::google::protobuf::io::CodedInputStream* input) final;
  134. void SerializeWithCachedSizes(
  135. ::google::protobuf::io::CodedOutputStream* output) const final;
  136. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  137. bool deterministic, ::google::protobuf::uint8* target) const final;
  138. int GetCachedSize() const final { return _cached_size_.Get(); }
  139. private:
  140. void SharedCtor();
  141. void SharedDtor();
  142. void SetCachedSize(int size) const final;
  143. void InternalSwap(Proto3Message* other);
  144. private:
  145. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  146. return NULL;
  147. }
  148. inline void* MaybeArenaPtr() const {
  149. return NULL;
  150. }
  151. public:
  152. ::google::protobuf::Metadata GetMetadata() const final;
  153. // nested types ----------------------------------------------------
  154. typedef Proto3Message_NestedEnum NestedEnum;
  155. static const NestedEnum FOO =
  156. Proto3Message_NestedEnum_FOO;
  157. static const NestedEnum BAR =
  158. Proto3Message_NestedEnum_BAR;
  159. static const NestedEnum BAZ =
  160. Proto3Message_NestedEnum_BAZ;
  161. static inline bool NestedEnum_IsValid(int value) {
  162. return Proto3Message_NestedEnum_IsValid(value);
  163. }
  164. static const NestedEnum NestedEnum_MIN =
  165. Proto3Message_NestedEnum_NestedEnum_MIN;
  166. static const NestedEnum NestedEnum_MAX =
  167. Proto3Message_NestedEnum_NestedEnum_MAX;
  168. static const int NestedEnum_ARRAYSIZE =
  169. Proto3Message_NestedEnum_NestedEnum_ARRAYSIZE;
  170. static inline const ::google::protobuf::EnumDescriptor*
  171. NestedEnum_descriptor() {
  172. return Proto3Message_NestedEnum_descriptor();
  173. }
  174. static inline const ::std::string& NestedEnum_Name(NestedEnum value) {
  175. return Proto3Message_NestedEnum_Name(value);
  176. }
  177. static inline bool NestedEnum_Parse(const ::std::string& name,
  178. NestedEnum* value) {
  179. return Proto3Message_NestedEnum_Parse(name, value);
  180. }
  181. // accessors -------------------------------------------------------
  182. // .google.protobuf.testing.Proto3Message.NestedEnum enum_value = 1;
  183. void clear_enum_value();
  184. static const int kEnumValueFieldNumber = 1;
  185. ::google::protobuf::testing::Proto3Message_NestedEnum enum_value() const;
  186. void set_enum_value(::google::protobuf::testing::Proto3Message_NestedEnum value);
  187. // @@protoc_insertion_point(class_scope:google.protobuf.testing.Proto3Message)
  188. private:
  189. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  190. int enum_value_;
  191. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  192. friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_2eproto::TableStruct;
  193. };
  194. // ===================================================================
  195. // ===================================================================
  196. #ifdef __GNUC__
  197. #pragma GCC diagnostic push
  198. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  199. #endif // __GNUC__
  200. // Proto3Message
  201. // .google.protobuf.testing.Proto3Message.NestedEnum enum_value = 1;
  202. inline void Proto3Message::clear_enum_value() {
  203. enum_value_ = 0;
  204. }
  205. inline ::google::protobuf::testing::Proto3Message_NestedEnum Proto3Message::enum_value() const {
  206. // @@protoc_insertion_point(field_get:google.protobuf.testing.Proto3Message.enum_value)
  207. return static_cast< ::google::protobuf::testing::Proto3Message_NestedEnum >(enum_value_);
  208. }
  209. inline void Proto3Message::set_enum_value(::google::protobuf::testing::Proto3Message_NestedEnum value) {
  210. enum_value_ = value;
  211. // @@protoc_insertion_point(field_set:google.protobuf.testing.Proto3Message.enum_value)
  212. }
  213. #ifdef __GNUC__
  214. #pragma GCC diagnostic pop
  215. #endif // __GNUC__
  216. // @@protoc_insertion_point(namespace_scope)
  217. } // namespace testing
  218. } // namespace protobuf
  219. } // namespace google
  220. namespace google {
  221. namespace protobuf {
  222. template <> struct is_proto_enum< ::google::protobuf::testing::Proto3Message_NestedEnum> : ::std::true_type {};
  223. template <>
  224. inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::testing::Proto3Message_NestedEnum>() {
  225. return ::google::protobuf::testing::Proto3Message_NestedEnum_descriptor();
  226. }
  227. } // namespace protobuf
  228. } // namespace google
  229. // @@protoc_insertion_point(global_scope)
  230. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2fproto3_2eproto