You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

source_context.pb.h 10 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/source_context.proto
  3. #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto
  4. #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto
  5. #include <limits>
  6. #include <string>
  7. #include <google/protobuf/port_def.inc>
  8. #if PROTOBUF_VERSION < 3021000
  9. #error This file was generated by a newer version of protoc which is
  10. #error incompatible with your Protocol Buffer headers. Please update
  11. #error your headers.
  12. #endif
  13. #if 3021006 < PROTOBUF_MIN_PROTOC_VERSION
  14. #error This file was generated by an older version of protoc which is
  15. #error incompatible with your Protocol Buffer headers. Please
  16. #error regenerate this file with a newer version of protoc.
  17. #endif
  18. #include <google/protobuf/port_undef.inc>
  19. #include <google/protobuf/io/coded_stream.h>
  20. #include <google/protobuf/arena.h>
  21. #include <google/protobuf/arenastring.h>
  22. #include <google/protobuf/generated_message_util.h>
  23. #include <google/protobuf/metadata_lite.h>
  24. #include <google/protobuf/generated_message_reflection.h>
  25. #include <google/protobuf/message.h>
  26. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  27. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  28. #include <google/protobuf/unknown_field_set.h>
  29. // @@protoc_insertion_point(includes)
  30. #include <google/protobuf/port_def.inc>
  31. #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto PROTOBUF_EXPORT
  32. PROTOBUF_NAMESPACE_OPEN
  33. namespace internal {
  34. class AnyMetadata;
  35. } // namespace internal
  36. PROTOBUF_NAMESPACE_CLOSE
  37. // Internal implementation detail -- do not use these members.
  38. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto {
  39. static const uint32_t offsets[];
  40. };
  41. PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto;
  42. PROTOBUF_NAMESPACE_OPEN
  43. class SourceContext;
  44. struct SourceContextDefaultTypeInternal;
  45. PROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_;
  46. PROTOBUF_NAMESPACE_CLOSE
  47. PROTOBUF_NAMESPACE_OPEN
  48. template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::SourceContext>(Arena*);
  49. PROTOBUF_NAMESPACE_CLOSE
  50. PROTOBUF_NAMESPACE_OPEN
  51. // ===================================================================
  52. class PROTOBUF_EXPORT SourceContext final :
  53. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ {
  54. public:
  55. inline SourceContext() : SourceContext(nullptr) {}
  56. ~SourceContext() override;
  57. explicit PROTOBUF_CONSTEXPR SourceContext(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  58. SourceContext(const SourceContext& from);
  59. SourceContext(SourceContext&& from) noexcept
  60. : SourceContext() {
  61. *this = ::std::move(from);
  62. }
  63. inline SourceContext& operator=(const SourceContext& from) {
  64. CopyFrom(from);
  65. return *this;
  66. }
  67. inline SourceContext& operator=(SourceContext&& from) noexcept {
  68. if (this == &from) return *this;
  69. if (GetOwningArena() == from.GetOwningArena()
  70. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  71. && GetOwningArena() != nullptr
  72. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  73. ) {
  74. InternalSwap(&from);
  75. } else {
  76. CopyFrom(from);
  77. }
  78. return *this;
  79. }
  80. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
  81. return GetDescriptor();
  82. }
  83. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
  84. return default_instance().GetMetadata().descriptor;
  85. }
  86. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  87. return default_instance().GetMetadata().reflection;
  88. }
  89. static const SourceContext& default_instance() {
  90. return *internal_default_instance();
  91. }
  92. static inline const SourceContext* internal_default_instance() {
  93. return reinterpret_cast<const SourceContext*>(
  94. &_SourceContext_default_instance_);
  95. }
  96. static constexpr int kIndexInFileMessages =
  97. 0;
  98. friend void swap(SourceContext& a, SourceContext& b) {
  99. a.Swap(&b);
  100. }
  101. inline void Swap(SourceContext* other) {
  102. if (other == this) return;
  103. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  104. if (GetOwningArena() != nullptr &&
  105. GetOwningArena() == other->GetOwningArena()) {
  106. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  107. if (GetOwningArena() == other->GetOwningArena()) {
  108. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  109. InternalSwap(other);
  110. } else {
  111. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  112. }
  113. }
  114. void UnsafeArenaSwap(SourceContext* other) {
  115. if (other == this) return;
  116. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  117. InternalSwap(other);
  118. }
  119. // implements Message ----------------------------------------------
  120. SourceContext* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
  121. return CreateMaybeMessage<SourceContext>(arena);
  122. }
  123. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  124. void CopyFrom(const SourceContext& from);
  125. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  126. void MergeFrom( const SourceContext& from) {
  127. SourceContext::MergeImpl(*this, from);
  128. }
  129. private:
  130. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  131. public:
  132. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  133. bool IsInitialized() const final;
  134. size_t ByteSizeLong() const final;
  135. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  136. uint8_t* _InternalSerialize(
  137. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  138. int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
  139. private:
  140. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  141. void SharedDtor();
  142. void SetCachedSize(int size) const final;
  143. void InternalSwap(SourceContext* other);
  144. private:
  145. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  146. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  147. return "google.protobuf.SourceContext";
  148. }
  149. protected:
  150. explicit SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  151. bool is_message_owned = false);
  152. public:
  153. static const ClassData _class_data_;
  154. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
  155. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  156. // nested types ----------------------------------------------------
  157. // accessors -------------------------------------------------------
  158. enum : int {
  159. kFileNameFieldNumber = 1,
  160. };
  161. // string file_name = 1;
  162. void clear_file_name();
  163. const std::string& file_name() const;
  164. template <typename ArgT0 = const std::string&, typename... ArgT>
  165. void set_file_name(ArgT0&& arg0, ArgT... args);
  166. std::string* mutable_file_name();
  167. PROTOBUF_NODISCARD std::string* release_file_name();
  168. void set_allocated_file_name(std::string* file_name);
  169. private:
  170. const std::string& _internal_file_name() const;
  171. inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_name(const std::string& value);
  172. std::string* _internal_mutable_file_name();
  173. public:
  174. // @@protoc_insertion_point(class_scope:google.protobuf.SourceContext)
  175. private:
  176. class _Internal;
  177. template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  178. typedef void InternalArenaConstructable_;
  179. typedef void DestructorSkippable_;
  180. struct Impl_ {
  181. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_name_;
  182. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  183. };
  184. union { Impl_ _impl_; };
  185. friend struct ::TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto;
  186. };
  187. // ===================================================================
  188. // ===================================================================
  189. #ifdef __GNUC__
  190. #pragma GCC diagnostic push
  191. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  192. #endif // __GNUC__
  193. // SourceContext
  194. // string file_name = 1;
  195. inline void SourceContext::clear_file_name() {
  196. _impl_.file_name_.ClearToEmpty();
  197. }
  198. inline const std::string& SourceContext::file_name() const {
  199. // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name)
  200. return _internal_file_name();
  201. }
  202. template <typename ArgT0, typename... ArgT>
  203. inline PROTOBUF_ALWAYS_INLINE
  204. void SourceContext::set_file_name(ArgT0&& arg0, ArgT... args) {
  205. _impl_.file_name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
  206. // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
  207. }
  208. inline std::string* SourceContext::mutable_file_name() {
  209. std::string* _s = _internal_mutable_file_name();
  210. // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_name)
  211. return _s;
  212. }
  213. inline const std::string& SourceContext::_internal_file_name() const {
  214. return _impl_.file_name_.Get();
  215. }
  216. inline void SourceContext::_internal_set_file_name(const std::string& value) {
  217. _impl_.file_name_.Set(value, GetArenaForAllocation());
  218. }
  219. inline std::string* SourceContext::_internal_mutable_file_name() {
  220. return _impl_.file_name_.Mutable(GetArenaForAllocation());
  221. }
  222. inline std::string* SourceContext::release_file_name() {
  223. // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name)
  224. return _impl_.file_name_.Release();
  225. }
  226. inline void SourceContext::set_allocated_file_name(std::string* file_name) {
  227. if (file_name != nullptr) {
  228. } else {
  229. }
  230. _impl_.file_name_.SetAllocated(file_name, GetArenaForAllocation());
  231. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  232. if (_impl_.file_name_.IsDefault()) {
  233. _impl_.file_name_.Set("", GetArenaForAllocation());
  234. }
  235. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  236. // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
  237. }
  238. #ifdef __GNUC__
  239. #pragma GCC diagnostic pop
  240. #endif // __GNUC__
  241. // @@protoc_insertion_point(namespace_scope)
  242. PROTOBUF_NAMESPACE_CLOSE
  243. // @@protoc_insertion_point(global_scope)
  244. #include <google/protobuf/port_undef.inc>
  245. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto