unittest_import.pb.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_import.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fimport_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fimport_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. #include <google/protobuf/unittest_import_public.pb.h> // IWYU pragma: export
  30. // @@protoc_insertion_point(includes)
  31. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
  32. namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto {
  33. // Internal implementation detail -- do not use these members.
  34. struct TableStruct {
  35. static const ::google::protobuf::internal::ParseTableField entries[];
  36. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  37. static const ::google::protobuf::internal::ParseTable schema[1];
  38. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  39. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  40. static const ::google::protobuf::uint32 offsets[];
  41. };
  42. void AddDescriptors();
  43. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
  44. namespace protobuf_unittest_import {
  45. class ImportMessage;
  46. class ImportMessageDefaultTypeInternal;
  47. extern ImportMessageDefaultTypeInternal _ImportMessage_default_instance_;
  48. } // namespace protobuf_unittest_import
  49. namespace google {
  50. namespace protobuf {
  51. template<> ::protobuf_unittest_import::ImportMessage* Arena::CreateMaybeMessage<::protobuf_unittest_import::ImportMessage>(Arena*);
  52. } // namespace protobuf
  53. } // namespace google
  54. namespace protobuf_unittest_import {
  55. enum ImportEnum {
  56. IMPORT_FOO = 7,
  57. IMPORT_BAR = 8,
  58. IMPORT_BAZ = 9
  59. };
  60. bool ImportEnum_IsValid(int value);
  61. const ImportEnum ImportEnum_MIN = IMPORT_FOO;
  62. const ImportEnum ImportEnum_MAX = IMPORT_BAZ;
  63. const int ImportEnum_ARRAYSIZE = ImportEnum_MAX + 1;
  64. const ::google::protobuf::EnumDescriptor* ImportEnum_descriptor();
  65. inline const ::std::string& ImportEnum_Name(ImportEnum value) {
  66. return ::google::protobuf::internal::NameOfEnum(
  67. ImportEnum_descriptor(), value);
  68. }
  69. inline bool ImportEnum_Parse(
  70. const ::std::string& name, ImportEnum* value) {
  71. return ::google::protobuf::internal::ParseNamedEnum<ImportEnum>(
  72. ImportEnum_descriptor(), name, value);
  73. }
  74. enum ImportEnumForMap {
  75. UNKNOWN = 0,
  76. FOO = 1,
  77. BAR = 2
  78. };
  79. bool ImportEnumForMap_IsValid(int value);
  80. const ImportEnumForMap ImportEnumForMap_MIN = UNKNOWN;
  81. const ImportEnumForMap ImportEnumForMap_MAX = BAR;
  82. const int ImportEnumForMap_ARRAYSIZE = ImportEnumForMap_MAX + 1;
  83. const ::google::protobuf::EnumDescriptor* ImportEnumForMap_descriptor();
  84. inline const ::std::string& ImportEnumForMap_Name(ImportEnumForMap value) {
  85. return ::google::protobuf::internal::NameOfEnum(
  86. ImportEnumForMap_descriptor(), value);
  87. }
  88. inline bool ImportEnumForMap_Parse(
  89. const ::std::string& name, ImportEnumForMap* value) {
  90. return ::google::protobuf::internal::ParseNamedEnum<ImportEnumForMap>(
  91. ImportEnumForMap_descriptor(), name, value);
  92. }
  93. // ===================================================================
  94. class ImportMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_import.ImportMessage) */ {
  95. public:
  96. ImportMessage();
  97. virtual ~ImportMessage();
  98. ImportMessage(const ImportMessage& from);
  99. inline ImportMessage& operator=(const ImportMessage& from) {
  100. CopyFrom(from);
  101. return *this;
  102. }
  103. #if LANG_CXX11
  104. ImportMessage(ImportMessage&& from) noexcept
  105. : ImportMessage() {
  106. *this = ::std::move(from);
  107. }
  108. inline ImportMessage& operator=(ImportMessage&& from) noexcept {
  109. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  110. if (this != &from) InternalSwap(&from);
  111. } else {
  112. CopyFrom(from);
  113. }
  114. return *this;
  115. }
  116. #endif
  117. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  118. return _internal_metadata_.unknown_fields();
  119. }
  120. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  121. return _internal_metadata_.mutable_unknown_fields();
  122. }
  123. inline ::google::protobuf::Arena* GetArena() const final {
  124. return GetArenaNoVirtual();
  125. }
  126. inline void* GetMaybeArenaPointer() const final {
  127. return MaybeArenaPtr();
  128. }
  129. static const ::google::protobuf::Descriptor* descriptor();
  130. static const ImportMessage& default_instance();
  131. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  132. static inline const ImportMessage* internal_default_instance() {
  133. return reinterpret_cast<const ImportMessage*>(
  134. &_ImportMessage_default_instance_);
  135. }
  136. static constexpr int kIndexInFileMessages =
  137. 0;
  138. void UnsafeArenaSwap(ImportMessage* other);
  139. void Swap(ImportMessage* other);
  140. friend void swap(ImportMessage& a, ImportMessage& b) {
  141. a.Swap(&b);
  142. }
  143. // implements Message ----------------------------------------------
  144. inline ImportMessage* New() const final {
  145. return CreateMaybeMessage<ImportMessage>(NULL);
  146. }
  147. ImportMessage* New(::google::protobuf::Arena* arena) const final {
  148. return CreateMaybeMessage<ImportMessage>(arena);
  149. }
  150. void CopyFrom(const ::google::protobuf::Message& from) final;
  151. void MergeFrom(const ::google::protobuf::Message& from) final;
  152. void CopyFrom(const ImportMessage& from);
  153. void MergeFrom(const ImportMessage& from);
  154. void Clear() final;
  155. bool IsInitialized() const final;
  156. size_t ByteSizeLong() const final;
  157. bool MergePartialFromCodedStream(
  158. ::google::protobuf::io::CodedInputStream* input) final;
  159. void SerializeWithCachedSizes(
  160. ::google::protobuf::io::CodedOutputStream* output) const final;
  161. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  162. bool deterministic, ::google::protobuf::uint8* target) const final;
  163. int GetCachedSize() const final { return _cached_size_.Get(); }
  164. private:
  165. void SharedCtor();
  166. void SharedDtor();
  167. void SetCachedSize(int size) const final;
  168. void InternalSwap(ImportMessage* other);
  169. protected:
  170. explicit ImportMessage(::google::protobuf::Arena* arena);
  171. private:
  172. static void ArenaDtor(void* object);
  173. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  174. private:
  175. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  176. return _internal_metadata_.arena();
  177. }
  178. inline void* MaybeArenaPtr() const {
  179. return _internal_metadata_.raw_arena_ptr();
  180. }
  181. public:
  182. ::google::protobuf::Metadata GetMetadata() const final;
  183. // nested types ----------------------------------------------------
  184. // accessors -------------------------------------------------------
  185. // optional int32 d = 1;
  186. bool has_d() const;
  187. void clear_d();
  188. static const int kDFieldNumber = 1;
  189. ::google::protobuf::int32 d() const;
  190. void set_d(::google::protobuf::int32 value);
  191. // @@protoc_insertion_point(class_scope:protobuf_unittest_import.ImportMessage)
  192. private:
  193. void set_has_d();
  194. void clear_has_d();
  195. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  196. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  197. typedef void InternalArenaConstructable_;
  198. typedef void DestructorSkippable_;
  199. ::google::protobuf::internal::HasBits<1> _has_bits_;
  200. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  201. ::google::protobuf::int32 d_;
  202. friend struct ::protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::TableStruct;
  203. };
  204. // ===================================================================
  205. // ===================================================================
  206. #ifdef __GNUC__
  207. #pragma GCC diagnostic push
  208. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  209. #endif // __GNUC__
  210. // ImportMessage
  211. // optional int32 d = 1;
  212. inline bool ImportMessage::has_d() const {
  213. return (_has_bits_[0] & 0x00000001u) != 0;
  214. }
  215. inline void ImportMessage::set_has_d() {
  216. _has_bits_[0] |= 0x00000001u;
  217. }
  218. inline void ImportMessage::clear_has_d() {
  219. _has_bits_[0] &= ~0x00000001u;
  220. }
  221. inline void ImportMessage::clear_d() {
  222. d_ = 0;
  223. clear_has_d();
  224. }
  225. inline ::google::protobuf::int32 ImportMessage::d() const {
  226. // @@protoc_insertion_point(field_get:protobuf_unittest_import.ImportMessage.d)
  227. return d_;
  228. }
  229. inline void ImportMessage::set_d(::google::protobuf::int32 value) {
  230. set_has_d();
  231. d_ = value;
  232. // @@protoc_insertion_point(field_set:protobuf_unittest_import.ImportMessage.d)
  233. }
  234. #ifdef __GNUC__
  235. #pragma GCC diagnostic pop
  236. #endif // __GNUC__
  237. // @@protoc_insertion_point(namespace_scope)
  238. } // namespace protobuf_unittest_import
  239. namespace google {
  240. namespace protobuf {
  241. template <> struct is_proto_enum< ::protobuf_unittest_import::ImportEnum> : ::std::true_type {};
  242. template <>
  243. inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest_import::ImportEnum>() {
  244. return ::protobuf_unittest_import::ImportEnum_descriptor();
  245. }
  246. template <> struct is_proto_enum< ::protobuf_unittest_import::ImportEnumForMap> : ::std::true_type {};
  247. template <>
  248. inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest_import::ImportEnumForMap>() {
  249. return ::protobuf_unittest_import::ImportEnumForMap_descriptor();
  250. }
  251. } // namespace protobuf
  252. } // namespace google
  253. // @@protoc_insertion_point(global_scope)
  254. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fimport_2eproto