source_context.pb.cc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/source_context.proto
  3. #include <google/protobuf/source_context.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace google {
  19. namespace protobuf {
  20. class SourceContextDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<SourceContext>
  23. _instance;
  24. } _SourceContext_default_instance_;
  25. } // namespace protobuf
  26. } // namespace google
  27. namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto {
  28. static void InitDefaultsSourceContext() {
  29. GOOGLE_PROTOBUF_VERIFY_VERSION;
  30. {
  31. void* ptr = &::google::protobuf::_SourceContext_default_instance_;
  32. new (ptr) ::google::protobuf::SourceContext();
  33. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  34. }
  35. ::google::protobuf::SourceContext::InitAsDefaultInstance();
  36. }
  37. LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext =
  38. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSourceContext}, {}};
  39. void InitDefaults() {
  40. ::google::protobuf::internal::InitSCC(&scc_info_SourceContext.base);
  41. }
  42. ::google::protobuf::Metadata file_level_metadata[1];
  43. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  44. ~0u, // no _has_bits_
  45. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::SourceContext, _internal_metadata_),
  46. ~0u, // no _extensions_
  47. ~0u, // no _oneof_case_
  48. ~0u, // no _weak_field_map_
  49. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::SourceContext, file_name_),
  50. };
  51. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  52. { 0, -1, sizeof(::google::protobuf::SourceContext)},
  53. };
  54. static ::google::protobuf::Message const * const file_default_instances[] = {
  55. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_SourceContext_default_instance_),
  56. };
  57. void protobuf_AssignDescriptors() {
  58. AddDescriptors();
  59. AssignDescriptors(
  60. "google/protobuf/source_context.proto", schemas, file_default_instances, TableStruct::offsets,
  61. file_level_metadata, NULL, NULL);
  62. }
  63. void protobuf_AssignDescriptorsOnce() {
  64. static ::google::protobuf::internal::once_flag once;
  65. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  66. }
  67. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  68. void protobuf_RegisterTypes(const ::std::string&) {
  69. protobuf_AssignDescriptorsOnce();
  70. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
  71. }
  72. void AddDescriptorsImpl() {
  73. InitDefaults();
  74. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  75. "\n$google/protobuf/source_context.proto\022\017"
  76. "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
  77. "_name\030\001 \001(\tB\225\001\n\023com.google.protobufB\022Sou"
  78. "rceContextProtoP\001ZAgoogle.golang.org/gen"
  79. "proto/protobuf/source_context;source_con"
  80. "text\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTy"
  81. "pesb\006proto3"
  82. };
  83. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  84. descriptor, 251);
  85. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  86. "google/protobuf/source_context.proto", &protobuf_RegisterTypes);
  87. }
  88. void AddDescriptors() {
  89. static ::google::protobuf::internal::once_flag once;
  90. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  91. }
  92. // Force AddDescriptors() to be called at dynamic initialization time.
  93. struct StaticDescriptorInitializer {
  94. StaticDescriptorInitializer() {
  95. AddDescriptors();
  96. }
  97. } static_descriptor_initializer;
  98. } // namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto
  99. namespace google {
  100. namespace protobuf {
  101. // ===================================================================
  102. void SourceContext::InitAsDefaultInstance() {
  103. }
  104. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  105. const int SourceContext::kFileNameFieldNumber;
  106. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  107. SourceContext::SourceContext()
  108. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  109. ::google::protobuf::internal::InitSCC(
  110. &protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::scc_info_SourceContext.base);
  111. SharedCtor();
  112. // @@protoc_insertion_point(constructor:google.protobuf.SourceContext)
  113. }
  114. SourceContext::SourceContext(const SourceContext& from)
  115. : ::google::protobuf::Message(),
  116. _internal_metadata_(NULL) {
  117. _internal_metadata_.MergeFrom(from._internal_metadata_);
  118. file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  119. if (from.file_name().size() > 0) {
  120. file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_);
  121. }
  122. // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
  123. }
  124. void SourceContext::SharedCtor() {
  125. file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  126. }
  127. SourceContext::~SourceContext() {
  128. // @@protoc_insertion_point(destructor:google.protobuf.SourceContext)
  129. SharedDtor();
  130. }
  131. void SourceContext::SharedDtor() {
  132. file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  133. }
  134. void SourceContext::SetCachedSize(int size) const {
  135. _cached_size_.Set(size);
  136. }
  137. const ::google::protobuf::Descriptor* SourceContext::descriptor() {
  138. ::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::protobuf_AssignDescriptorsOnce();
  139. return ::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  140. }
  141. const SourceContext& SourceContext::default_instance() {
  142. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::scc_info_SourceContext.base);
  143. return *internal_default_instance();
  144. }
  145. void SourceContext::Clear() {
  146. // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
  147. ::google::protobuf::uint32 cached_has_bits = 0;
  148. // Prevent compiler warnings about cached_has_bits being unused
  149. (void) cached_has_bits;
  150. file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  151. _internal_metadata_.Clear();
  152. }
  153. bool SourceContext::MergePartialFromCodedStream(
  154. ::google::protobuf::io::CodedInputStream* input) {
  155. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  156. ::google::protobuf::uint32 tag;
  157. // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext)
  158. for (;;) {
  159. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  160. tag = p.first;
  161. if (!p.second) goto handle_unusual;
  162. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  163. // string file_name = 1;
  164. case 1: {
  165. if (static_cast< ::google::protobuf::uint8>(tag) ==
  166. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  167. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  168. input, this->mutable_file_name()));
  169. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  170. this->file_name().data(), static_cast<int>(this->file_name().length()),
  171. ::google::protobuf::internal::WireFormatLite::PARSE,
  172. "google.protobuf.SourceContext.file_name"));
  173. } else {
  174. goto handle_unusual;
  175. }
  176. break;
  177. }
  178. default: {
  179. handle_unusual:
  180. if (tag == 0) {
  181. goto success;
  182. }
  183. DO_(::google::protobuf::internal::WireFormat::SkipField(
  184. input, tag, _internal_metadata_.mutable_unknown_fields()));
  185. break;
  186. }
  187. }
  188. }
  189. success:
  190. // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext)
  191. return true;
  192. failure:
  193. // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext)
  194. return false;
  195. #undef DO_
  196. }
  197. void SourceContext::SerializeWithCachedSizes(
  198. ::google::protobuf::io::CodedOutputStream* output) const {
  199. // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext)
  200. ::google::protobuf::uint32 cached_has_bits = 0;
  201. (void) cached_has_bits;
  202. // string file_name = 1;
  203. if (this->file_name().size() > 0) {
  204. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  205. this->file_name().data(), static_cast<int>(this->file_name().length()),
  206. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  207. "google.protobuf.SourceContext.file_name");
  208. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  209. 1, this->file_name(), output);
  210. }
  211. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  212. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  213. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  214. }
  215. // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext)
  216. }
  217. ::google::protobuf::uint8* SourceContext::InternalSerializeWithCachedSizesToArray(
  218. bool deterministic, ::google::protobuf::uint8* target) const {
  219. (void)deterministic; // Unused
  220. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
  221. ::google::protobuf::uint32 cached_has_bits = 0;
  222. (void) cached_has_bits;
  223. // string file_name = 1;
  224. if (this->file_name().size() > 0) {
  225. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  226. this->file_name().data(), static_cast<int>(this->file_name().length()),
  227. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  228. "google.protobuf.SourceContext.file_name");
  229. target =
  230. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  231. 1, this->file_name(), target);
  232. }
  233. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  234. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  235. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  236. }
  237. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
  238. return target;
  239. }
  240. size_t SourceContext::ByteSizeLong() const {
  241. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
  242. size_t total_size = 0;
  243. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  244. total_size +=
  245. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  246. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  247. }
  248. // string file_name = 1;
  249. if (this->file_name().size() > 0) {
  250. total_size += 1 +
  251. ::google::protobuf::internal::WireFormatLite::StringSize(
  252. this->file_name());
  253. }
  254. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  255. SetCachedSize(cached_size);
  256. return total_size;
  257. }
  258. void SourceContext::MergeFrom(const ::google::protobuf::Message& from) {
  259. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext)
  260. GOOGLE_DCHECK_NE(&from, this);
  261. const SourceContext* source =
  262. ::google::protobuf::internal::DynamicCastToGenerated<const SourceContext>(
  263. &from);
  264. if (source == NULL) {
  265. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
  266. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  267. } else {
  268. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext)
  269. MergeFrom(*source);
  270. }
  271. }
  272. void SourceContext::MergeFrom(const SourceContext& from) {
  273. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
  274. GOOGLE_DCHECK_NE(&from, this);
  275. _internal_metadata_.MergeFrom(from._internal_metadata_);
  276. ::google::protobuf::uint32 cached_has_bits = 0;
  277. (void) cached_has_bits;
  278. if (from.file_name().size() > 0) {
  279. file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_);
  280. }
  281. }
  282. void SourceContext::CopyFrom(const ::google::protobuf::Message& from) {
  283. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext)
  284. if (&from == this) return;
  285. Clear();
  286. MergeFrom(from);
  287. }
  288. void SourceContext::CopyFrom(const SourceContext& from) {
  289. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
  290. if (&from == this) return;
  291. Clear();
  292. MergeFrom(from);
  293. }
  294. bool SourceContext::IsInitialized() const {
  295. return true;
  296. }
  297. void SourceContext::Swap(SourceContext* other) {
  298. if (other == this) return;
  299. InternalSwap(other);
  300. }
  301. void SourceContext::InternalSwap(SourceContext* other) {
  302. using std::swap;
  303. file_name_.Swap(&other->file_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  304. GetArenaNoVirtual());
  305. _internal_metadata_.Swap(&other->_internal_metadata_);
  306. }
  307. ::google::protobuf::Metadata SourceContext::GetMetadata() const {
  308. protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::protobuf_AssignDescriptorsOnce();
  309. return ::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::file_level_metadata[kIndexInFileMessages];
  310. }
  311. // @@protoc_insertion_point(namespace_scope)
  312. } // namespace protobuf
  313. } // namespace google
  314. namespace google {
  315. namespace protobuf {
  316. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::SourceContext* Arena::CreateMaybeMessage< ::google::protobuf::SourceContext >(Arena* arena) {
  317. return Arena::CreateInternal< ::google::protobuf::SourceContext >(arena);
  318. }
  319. } // namespace protobuf
  320. } // namespace google
  321. // @@protoc_insertion_point(global_scope)