field_mask.pb.cc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/field_mask.proto
  3. #include <google/protobuf/field_mask.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 FieldMaskDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<FieldMask>
  23. _instance;
  24. } _FieldMask_default_instance_;
  25. } // namespace protobuf
  26. } // namespace google
  27. namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto {
  28. static void InitDefaultsFieldMask() {
  29. GOOGLE_PROTOBUF_VERIFY_VERSION;
  30. {
  31. void* ptr = &::google::protobuf::_FieldMask_default_instance_;
  32. new (ptr) ::google::protobuf::FieldMask();
  33. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  34. }
  35. ::google::protobuf::FieldMask::InitAsDefaultInstance();
  36. }
  37. LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_FieldMask =
  38. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFieldMask}, {}};
  39. void InitDefaults() {
  40. ::google::protobuf::internal::InitSCC(&scc_info_FieldMask.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::FieldMask, _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::FieldMask, paths_),
  50. };
  51. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  52. { 0, -1, sizeof(::google::protobuf::FieldMask)},
  53. };
  54. static ::google::protobuf::Message const * const file_default_instances[] = {
  55. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_FieldMask_default_instance_),
  56. };
  57. void protobuf_AssignDescriptors() {
  58. AddDescriptors();
  59. AssignDescriptors(
  60. "google/protobuf/field_mask.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/field_mask.proto\022\017goog"
  76. "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
  77. "\211\001\n\023com.google.protobufB\016FieldMaskProtoP"
  78. "\001Z9google.golang.org/genproto/protobuf/f"
  79. "ield_mask;field_mask\242\002\003GPB\252\002\036Google.Prot"
  80. "obuf.WellKnownTypesb\006proto3"
  81. };
  82. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  83. descriptor, 227);
  84. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  85. "google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
  86. }
  87. void AddDescriptors() {
  88. static ::google::protobuf::internal::once_flag once;
  89. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  90. }
  91. // Force AddDescriptors() to be called at dynamic initialization time.
  92. struct StaticDescriptorInitializer {
  93. StaticDescriptorInitializer() {
  94. AddDescriptors();
  95. }
  96. } static_descriptor_initializer;
  97. } // namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto
  98. namespace google {
  99. namespace protobuf {
  100. // ===================================================================
  101. void FieldMask::InitAsDefaultInstance() {
  102. }
  103. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  104. const int FieldMask::kPathsFieldNumber;
  105. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  106. FieldMask::FieldMask()
  107. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  108. ::google::protobuf::internal::InitSCC(
  109. &protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::scc_info_FieldMask.base);
  110. SharedCtor();
  111. // @@protoc_insertion_point(constructor:google.protobuf.FieldMask)
  112. }
  113. FieldMask::FieldMask(const FieldMask& from)
  114. : ::google::protobuf::Message(),
  115. _internal_metadata_(NULL),
  116. paths_(from.paths_) {
  117. _internal_metadata_.MergeFrom(from._internal_metadata_);
  118. // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
  119. }
  120. void FieldMask::SharedCtor() {
  121. }
  122. FieldMask::~FieldMask() {
  123. // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
  124. SharedDtor();
  125. }
  126. void FieldMask::SharedDtor() {
  127. }
  128. void FieldMask::SetCachedSize(int size) const {
  129. _cached_size_.Set(size);
  130. }
  131. const ::google::protobuf::Descriptor* FieldMask::descriptor() {
  132. ::protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
  133. return ::protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  134. }
  135. const FieldMask& FieldMask::default_instance() {
  136. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::scc_info_FieldMask.base);
  137. return *internal_default_instance();
  138. }
  139. void FieldMask::Clear() {
  140. // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
  141. ::google::protobuf::uint32 cached_has_bits = 0;
  142. // Prevent compiler warnings about cached_has_bits being unused
  143. (void) cached_has_bits;
  144. paths_.Clear();
  145. _internal_metadata_.Clear();
  146. }
  147. bool FieldMask::MergePartialFromCodedStream(
  148. ::google::protobuf::io::CodedInputStream* input) {
  149. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  150. ::google::protobuf::uint32 tag;
  151. // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask)
  152. for (;;) {
  153. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  154. tag = p.first;
  155. if (!p.second) goto handle_unusual;
  156. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  157. // repeated string paths = 1;
  158. case 1: {
  159. if (static_cast< ::google::protobuf::uint8>(tag) ==
  160. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  161. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  162. input, this->add_paths()));
  163. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  164. this->paths(this->paths_size() - 1).data(),
  165. static_cast<int>(this->paths(this->paths_size() - 1).length()),
  166. ::google::protobuf::internal::WireFormatLite::PARSE,
  167. "google.protobuf.FieldMask.paths"));
  168. } else {
  169. goto handle_unusual;
  170. }
  171. break;
  172. }
  173. default: {
  174. handle_unusual:
  175. if (tag == 0) {
  176. goto success;
  177. }
  178. DO_(::google::protobuf::internal::WireFormat::SkipField(
  179. input, tag, _internal_metadata_.mutable_unknown_fields()));
  180. break;
  181. }
  182. }
  183. }
  184. success:
  185. // @@protoc_insertion_point(parse_success:google.protobuf.FieldMask)
  186. return true;
  187. failure:
  188. // @@protoc_insertion_point(parse_failure:google.protobuf.FieldMask)
  189. return false;
  190. #undef DO_
  191. }
  192. void FieldMask::SerializeWithCachedSizes(
  193. ::google::protobuf::io::CodedOutputStream* output) const {
  194. // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask)
  195. ::google::protobuf::uint32 cached_has_bits = 0;
  196. (void) cached_has_bits;
  197. // repeated string paths = 1;
  198. for (int i = 0, n = this->paths_size(); i < n; i++) {
  199. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  200. this->paths(i).data(), static_cast<int>(this->paths(i).length()),
  201. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  202. "google.protobuf.FieldMask.paths");
  203. ::google::protobuf::internal::WireFormatLite::WriteString(
  204. 1, this->paths(i), output);
  205. }
  206. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  207. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  208. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  209. }
  210. // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask)
  211. }
  212. ::google::protobuf::uint8* FieldMask::InternalSerializeWithCachedSizesToArray(
  213. bool deterministic, ::google::protobuf::uint8* target) const {
  214. (void)deterministic; // Unused
  215. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
  216. ::google::protobuf::uint32 cached_has_bits = 0;
  217. (void) cached_has_bits;
  218. // repeated string paths = 1;
  219. for (int i = 0, n = this->paths_size(); i < n; i++) {
  220. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  221. this->paths(i).data(), static_cast<int>(this->paths(i).length()),
  222. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  223. "google.protobuf.FieldMask.paths");
  224. target = ::google::protobuf::internal::WireFormatLite::
  225. WriteStringToArray(1, this->paths(i), target);
  226. }
  227. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  228. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  229. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  230. }
  231. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
  232. return target;
  233. }
  234. size_t FieldMask::ByteSizeLong() const {
  235. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
  236. size_t total_size = 0;
  237. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  238. total_size +=
  239. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  240. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  241. }
  242. // repeated string paths = 1;
  243. total_size += 1 *
  244. ::google::protobuf::internal::FromIntSize(this->paths_size());
  245. for (int i = 0, n = this->paths_size(); i < n; i++) {
  246. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  247. this->paths(i));
  248. }
  249. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  250. SetCachedSize(cached_size);
  251. return total_size;
  252. }
  253. void FieldMask::MergeFrom(const ::google::protobuf::Message& from) {
  254. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask)
  255. GOOGLE_DCHECK_NE(&from, this);
  256. const FieldMask* source =
  257. ::google::protobuf::internal::DynamicCastToGenerated<const FieldMask>(
  258. &from);
  259. if (source == NULL) {
  260. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
  261. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  262. } else {
  263. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask)
  264. MergeFrom(*source);
  265. }
  266. }
  267. void FieldMask::MergeFrom(const FieldMask& from) {
  268. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
  269. GOOGLE_DCHECK_NE(&from, this);
  270. _internal_metadata_.MergeFrom(from._internal_metadata_);
  271. ::google::protobuf::uint32 cached_has_bits = 0;
  272. (void) cached_has_bits;
  273. paths_.MergeFrom(from.paths_);
  274. }
  275. void FieldMask::CopyFrom(const ::google::protobuf::Message& from) {
  276. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask)
  277. if (&from == this) return;
  278. Clear();
  279. MergeFrom(from);
  280. }
  281. void FieldMask::CopyFrom(const FieldMask& from) {
  282. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
  283. if (&from == this) return;
  284. Clear();
  285. MergeFrom(from);
  286. }
  287. bool FieldMask::IsInitialized() const {
  288. return true;
  289. }
  290. void FieldMask::Swap(FieldMask* other) {
  291. if (other == this) return;
  292. InternalSwap(other);
  293. }
  294. void FieldMask::InternalSwap(FieldMask* other) {
  295. using std::swap;
  296. paths_.InternalSwap(CastToBase(&other->paths_));
  297. _internal_metadata_.Swap(&other->_internal_metadata_);
  298. }
  299. ::google::protobuf::Metadata FieldMask::GetMetadata() const {
  300. protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
  301. return ::protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages];
  302. }
  303. // @@protoc_insertion_point(namespace_scope)
  304. } // namespace protobuf
  305. } // namespace google
  306. namespace google {
  307. namespace protobuf {
  308. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::FieldMask* Arena::CreateMaybeMessage< ::google::protobuf::FieldMask >(Arena* arena) {
  309. return Arena::CreateInternal< ::google::protobuf::FieldMask >(arena);
  310. }
  311. } // namespace protobuf
  312. } // namespace google
  313. // @@protoc_insertion_point(global_scope)