empty.pb.cc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/protobuf/empty.proto
  18. #include <google/protobuf/empty.pb.h>
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/stubs/port.h>
  22. #include <google/protobuf/stubs/once.h>
  23. #include <google/protobuf/io/coded_stream.h>
  24. #include <google/protobuf/wire_format_lite_inl.h>
  25. #include <google/protobuf/descriptor.h>
  26. #include <google/protobuf/generated_message_reflection.h>
  27. #include <google/protobuf/reflection_ops.h>
  28. #include <google/protobuf/wire_format.h>
  29. // This is a temporary google only hack
  30. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  31. #include "third_party/protobuf/version.h"
  32. #endif
  33. // @@protoc_insertion_point(includes)
  34. namespace google {
  35. namespace protobuf {
  36. class EmptyDefaultTypeInternal {
  37. public:
  38. ::google::protobuf::internal::ExplicitlyConstructed<Empty>
  39. _instance;
  40. } _Empty_default_instance_;
  41. } // namespace protobuf
  42. } // namespace google
  43. namespace protobuf_google_2fprotobuf_2fempty_2eproto {
  44. void InitDefaultsEmptyImpl() {
  45. GOOGLE_PROTOBUF_VERIFY_VERSION;
  46. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  47. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  48. #else
  49. ::google::protobuf::internal::InitProtobufDefaults();
  50. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  51. {
  52. void* ptr = &::google::protobuf::_Empty_default_instance_;
  53. new (ptr) ::google::protobuf::Empty();
  54. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  55. }
  56. ::google::protobuf::Empty::InitAsDefaultInstance();
  57. }
  58. void InitDefaultsEmpty() {
  59. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  60. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsEmptyImpl);
  61. }
  62. ::google::protobuf::Metadata file_level_metadata[1];
  63. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  64. ~0u, // no _has_bits_
  65. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Empty, _internal_metadata_),
  66. ~0u, // no _extensions_
  67. ~0u, // no _oneof_case_
  68. ~0u, // no _weak_field_map_
  69. };
  70. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  71. { 0, -1, sizeof(::google::protobuf::Empty)},
  72. };
  73. static ::google::protobuf::Message const * const file_default_instances[] = {
  74. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Empty_default_instance_),
  75. };
  76. void protobuf_AssignDescriptors() {
  77. AddDescriptors();
  78. ::google::protobuf::MessageFactory* factory = NULL;
  79. AssignDescriptors(
  80. "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  81. file_level_metadata, NULL, NULL);
  82. }
  83. void protobuf_AssignDescriptorsOnce() {
  84. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  85. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  86. }
  87. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  88. void protobuf_RegisterTypes(const ::std::string&) {
  89. protobuf_AssignDescriptorsOnce();
  90. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
  91. }
  92. void AddDescriptorsImpl() {
  93. InitDefaults();
  94. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  95. "\n\033google/protobuf/empty.proto\022\017google.pr"
  96. "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n"
  97. "EmptyProtoP\001Z\'github.com/golang/protobuf"
  98. "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
  99. ".WellKnownTypesb\006proto3"
  100. };
  101. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  102. descriptor, 183);
  103. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  104. "google/protobuf/empty.proto", &protobuf_RegisterTypes);
  105. }
  106. void AddDescriptors() {
  107. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  108. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  109. }
  110. // Force AddDescriptors() to be called at dynamic initialization time.
  111. struct StaticDescriptorInitializer {
  112. StaticDescriptorInitializer() {
  113. AddDescriptors();
  114. }
  115. } static_descriptor_initializer;
  116. } // namespace protobuf_google_2fprotobuf_2fempty_2eproto
  117. namespace google {
  118. namespace protobuf {
  119. // ===================================================================
  120. void Empty::InitAsDefaultInstance() {
  121. }
  122. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  123. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  124. Empty::Empty()
  125. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  126. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  127. ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
  128. }
  129. SharedCtor();
  130. // @@protoc_insertion_point(constructor:google.protobuf.Empty)
  131. }
  132. Empty::Empty(::google::protobuf::Arena* arena)
  133. : ::google::protobuf::Message(),
  134. _internal_metadata_(arena) {
  135. ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
  136. SharedCtor();
  137. RegisterArenaDtor(arena);
  138. // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty)
  139. }
  140. Empty::Empty(const Empty& from)
  141. : ::google::protobuf::Message(),
  142. _internal_metadata_(NULL),
  143. _cached_size_(0) {
  144. _internal_metadata_.MergeFrom(from._internal_metadata_);
  145. // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty)
  146. }
  147. void Empty::SharedCtor() {
  148. _cached_size_ = 0;
  149. }
  150. Empty::~Empty() {
  151. // @@protoc_insertion_point(destructor:google.protobuf.Empty)
  152. SharedDtor();
  153. }
  154. void Empty::SharedDtor() {
  155. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  156. }
  157. void Empty::ArenaDtor(void* object) {
  158. Empty* _this = reinterpret_cast< Empty* >(object);
  159. (void)_this;
  160. }
  161. void Empty::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  162. }
  163. void Empty::SetCachedSize(int size) const {
  164. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  165. _cached_size_ = size;
  166. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  167. }
  168. const ::google::protobuf::Descriptor* Empty::descriptor() {
  169. ::protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce();
  170. return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  171. }
  172. const Empty& Empty::default_instance() {
  173. ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
  174. return *internal_default_instance();
  175. }
  176. Empty* Empty::New(::google::protobuf::Arena* arena) const {
  177. return ::google::protobuf::Arena::CreateMessage<Empty>(arena);
  178. }
  179. void Empty::Clear() {
  180. // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty)
  181. ::google::protobuf::uint32 cached_has_bits = 0;
  182. // Prevent compiler warnings about cached_has_bits being unused
  183. (void) cached_has_bits;
  184. _internal_metadata_.Clear();
  185. }
  186. bool Empty::MergePartialFromCodedStream(
  187. ::google::protobuf::io::CodedInputStream* input) {
  188. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  189. ::google::protobuf::uint32 tag;
  190. // @@protoc_insertion_point(parse_start:google.protobuf.Empty)
  191. for (;;) {
  192. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  193. tag = p.first;
  194. if (!p.second) goto handle_unusual;
  195. handle_unusual:
  196. if (tag == 0) {
  197. goto success;
  198. }
  199. DO_(::google::protobuf::internal::WireFormat::SkipField(
  200. input, tag, _internal_metadata_.mutable_unknown_fields()));
  201. }
  202. success:
  203. // @@protoc_insertion_point(parse_success:google.protobuf.Empty)
  204. return true;
  205. failure:
  206. // @@protoc_insertion_point(parse_failure:google.protobuf.Empty)
  207. return false;
  208. #undef DO_
  209. }
  210. void Empty::SerializeWithCachedSizes(
  211. ::google::protobuf::io::CodedOutputStream* output) const {
  212. // @@protoc_insertion_point(serialize_start:google.protobuf.Empty)
  213. ::google::protobuf::uint32 cached_has_bits = 0;
  214. (void) cached_has_bits;
  215. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  216. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  217. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  218. }
  219. // @@protoc_insertion_point(serialize_end:google.protobuf.Empty)
  220. }
  221. ::google::protobuf::uint8* Empty::InternalSerializeWithCachedSizesToArray(
  222. bool deterministic, ::google::protobuf::uint8* target) const {
  223. (void)deterministic; // Unused
  224. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty)
  225. ::google::protobuf::uint32 cached_has_bits = 0;
  226. (void) cached_has_bits;
  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.Empty)
  232. return target;
  233. }
  234. size_t Empty::ByteSizeLong() const {
  235. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty)
  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. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  243. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  244. _cached_size_ = cached_size;
  245. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  246. return total_size;
  247. }
  248. void Empty::MergeFrom(const ::google::protobuf::Message& from) {
  249. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty)
  250. GOOGLE_DCHECK_NE(&from, this);
  251. const Empty* source =
  252. ::google::protobuf::internal::DynamicCastToGenerated<const Empty>(
  253. &from);
  254. if (source == NULL) {
  255. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Empty)
  256. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  257. } else {
  258. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Empty)
  259. MergeFrom(*source);
  260. }
  261. }
  262. void Empty::MergeFrom(const Empty& from) {
  263. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empty)
  264. GOOGLE_DCHECK_NE(&from, this);
  265. _internal_metadata_.MergeFrom(from._internal_metadata_);
  266. ::google::protobuf::uint32 cached_has_bits = 0;
  267. (void) cached_has_bits;
  268. }
  269. void Empty::CopyFrom(const ::google::protobuf::Message& from) {
  270. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Empty)
  271. if (&from == this) return;
  272. Clear();
  273. MergeFrom(from);
  274. }
  275. void Empty::CopyFrom(const Empty& from) {
  276. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Empty)
  277. if (&from == this) return;
  278. Clear();
  279. MergeFrom(from);
  280. }
  281. bool Empty::IsInitialized() const {
  282. return true;
  283. }
  284. void Empty::Swap(Empty* other) {
  285. if (other == this) return;
  286. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  287. InternalSwap(other);
  288. } else {
  289. Empty* temp = New(GetArenaNoVirtual());
  290. temp->MergeFrom(*other);
  291. other->CopyFrom(*this);
  292. InternalSwap(temp);
  293. if (GetArenaNoVirtual() == NULL) {
  294. delete temp;
  295. }
  296. }
  297. }
  298. void Empty::UnsafeArenaSwap(Empty* other) {
  299. if (other == this) return;
  300. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  301. InternalSwap(other);
  302. }
  303. void Empty::InternalSwap(Empty* other) {
  304. using std::swap;
  305. _internal_metadata_.Swap(&other->_internal_metadata_);
  306. swap(_cached_size_, other->_cached_size_);
  307. }
  308. ::google::protobuf::Metadata Empty::GetMetadata() const {
  309. protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce();
  310. return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages];
  311. }
  312. // @@protoc_insertion_point(namespace_scope)
  313. } // namespace protobuf
  314. } // namespace google
  315. // @@protoc_insertion_point(global_scope)