Drizzled Public API Documentation

catalog.pb.cc
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: catalog.proto
3 
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "catalog.pb.h"
6 
7 #include <algorithm>
8 
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
17 // @@protoc_insertion_point(includes)
18 
19 namespace drizzled {
20 namespace message {
21 
22 namespace {
23 
24 const ::google::protobuf::Descriptor* Catalog_descriptor_ = NULL;
25 const ::google::protobuf::internal::GeneratedMessageReflection*
26  Catalog_reflection_ = NULL;
27 
28 } // namespace
29 
30 
31 void protobuf_AssignDesc_catalog_2eproto() {
32  protobuf_AddDesc_catalog_2eproto();
33  const ::google::protobuf::FileDescriptor* file =
34  ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
35  "catalog.proto");
36  GOOGLE_CHECK(file != NULL);
37  Catalog_descriptor_ = file->message_type(0);
38  static const int Catalog_offsets_[6] = {
39  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, name_),
40  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, engine_),
41  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, creation_timestamp_),
42  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, update_timestamp_),
43  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, uuid_),
44  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, version_),
45  };
46  Catalog_reflection_ =
47  new ::google::protobuf::internal::GeneratedMessageReflection(
48  Catalog_descriptor_,
49  Catalog::default_instance_,
50  Catalog_offsets_,
51  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _has_bits_[0]),
52  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _unknown_fields_),
53  -1,
54  ::google::protobuf::DescriptorPool::generated_pool(),
55  ::google::protobuf::MessageFactory::generated_factory(),
56  sizeof(Catalog));
57 }
58 
59 namespace {
60 
61 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
62 inline void protobuf_AssignDescriptorsOnce() {
63  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
64  &protobuf_AssignDesc_catalog_2eproto);
65 }
66 
67 void protobuf_RegisterTypes(const ::std::string&) {
68  protobuf_AssignDescriptorsOnce();
69  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
70  Catalog_descriptor_, &Catalog::default_instance());
71 }
72 
73 } // namespace
74 
75 void protobuf_ShutdownFile_catalog_2eproto() {
76  delete Catalog::default_instance_;
77  delete Catalog_reflection_;
78 }
79 
80 void protobuf_AddDesc_catalog_2eproto() {
81  static bool already_here = false;
82  if (already_here) return;
83  already_here = true;
84  GOOGLE_PROTOBUF_VERIFY_VERSION;
85 
86  ::drizzled::message::protobuf_AddDesc_engine_2eproto();
87  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
88  "\n\rcatalog.proto\022\020drizzled.message\032\014engin"
89  "e.proto\"\234\001\n\007Catalog\022\014\n\004name\030\001 \002(\t\022(\n\006eng"
90  "ine\030\003 \002(\0132\030.drizzled.message.Engine\022\035\n\022c"
91  "reation_timestamp\030\013 \002(\004:\0010\022\033\n\020update_tim"
92  "estamp\030\014 \002(\004:\0010\022\014\n\004uuid\030\r \001(\t\022\017\n\007version"
93  "\030\016 \001(\004B(\n\024org.drizzle.messagesB\016CatalogM"
94  "essageH\001", 248);
95  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
96  "catalog.proto", &protobuf_RegisterTypes);
97  Catalog::default_instance_ = new Catalog();
98  Catalog::default_instance_->InitAsDefaultInstance();
99  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_catalog_2eproto);
100 }
101 
102 // Force AddDescriptors() to be called at static initialization time.
105  protobuf_AddDesc_catalog_2eproto();
106  }
107 } static_descriptor_initializer_catalog_2eproto_;
108 
109 // ===================================================================
110 
111 #ifndef _MSC_VER
112 const int Catalog::kNameFieldNumber;
113 const int Catalog::kEngineFieldNumber;
114 const int Catalog::kCreationTimestampFieldNumber;
115 const int Catalog::kUpdateTimestampFieldNumber;
116 const int Catalog::kUuidFieldNumber;
117 const int Catalog::kVersionFieldNumber;
118 #endif // !_MSC_VER
119 
120 Catalog::Catalog()
121  : ::google::protobuf::Message() {
122  SharedCtor();
123  // @@protoc_insertion_point(constructor:drizzled.message.Catalog)
124 }
125 
126 void Catalog::InitAsDefaultInstance() {
127  engine_ = const_cast< ::drizzled::message::Engine*>(&::drizzled::message::Engine::default_instance());
128 }
129 
130 Catalog::Catalog(const Catalog& from)
131  : ::google::protobuf::Message() {
132  SharedCtor();
133  MergeFrom(from);
134  // @@protoc_insertion_point(copy_constructor:drizzled.message.Catalog)
135 }
136 
137 void Catalog::SharedCtor() {
138  ::google::protobuf::internal::GetEmptyString();
139  _cached_size_ = 0;
140  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
141  engine_ = NULL;
142  creation_timestamp_ = GOOGLE_ULONGLONG(0);
143  update_timestamp_ = GOOGLE_ULONGLONG(0);
144  uuid_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
145  version_ = GOOGLE_ULONGLONG(0);
146  ::memset(_has_bits_, 0, sizeof(_has_bits_));
147 }
148 
149 Catalog::~Catalog() {
150  // @@protoc_insertion_point(destructor:drizzled.message.Catalog)
151  SharedDtor();
152 }
153 
154 void Catalog::SharedDtor() {
155  if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
156  delete name_;
157  }
158  if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
159  delete uuid_;
160  }
161  if (this != default_instance_) {
162  delete engine_;
163  }
164 }
165 
166 void Catalog::SetCachedSize(int size) const {
167  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
168  _cached_size_ = size;
169  GOOGLE_SAFE_CONCURRENT_WRITES_END();
170 }
171 const ::google::protobuf::Descriptor* Catalog::descriptor() {
172  protobuf_AssignDescriptorsOnce();
173  return Catalog_descriptor_;
174 }
175 
176 const Catalog& Catalog::default_instance() {
177  if (default_instance_ == NULL) protobuf_AddDesc_catalog_2eproto();
178  return *default_instance_;
179 }
180 
181 Catalog* Catalog::default_instance_ = NULL;
182 
183 Catalog* Catalog::New() const {
184  return new Catalog;
185 }
186 
187 void Catalog::Clear() {
188 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
189  &reinterpret_cast<Catalog*>(16)->f) - \
190  reinterpret_cast<char*>(16))
191 
192 #define ZR_(first, last) do { \
193  size_t f = OFFSET_OF_FIELD_(first); \
194  size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
195  ::memset(&first, 0, n); \
196  } while (0)
197 
198  if (_has_bits_[0 / 32] & 63) {
199  ZR_(creation_timestamp_, update_timestamp_);
200  if (has_name()) {
201  if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
202  name_->clear();
203  }
204  }
205  if (has_engine()) {
206  if (engine_ != NULL) engine_->::drizzled::message::Engine::Clear();
207  }
208  if (has_uuid()) {
209  if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
210  uuid_->clear();
211  }
212  }
213  version_ = GOOGLE_ULONGLONG(0);
214  }
215 
216 #undef OFFSET_OF_FIELD_
217 #undef ZR_
218 
219  ::memset(_has_bits_, 0, sizeof(_has_bits_));
220  mutable_unknown_fields()->Clear();
221 }
222 
223 bool Catalog::MergePartialFromCodedStream(
224  ::google::protobuf::io::CodedInputStream* input) {
225 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
226  ::google::protobuf::uint32 tag;
227  // @@protoc_insertion_point(parse_start:drizzled.message.Catalog)
228  for (;;) {
229  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
230  tag = p.first;
231  if (!p.second) goto handle_unusual;
232  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
233  // required string name = 1;
234  case 1: {
235  if (tag == 10) {
236  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
237  input, this->mutable_name()));
238  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
239  this->name().data(), this->name().length(),
240  ::google::protobuf::internal::WireFormat::PARSE,
241  "name");
242  } else {
243  goto handle_unusual;
244  }
245  if (input->ExpectTag(26)) goto parse_engine;
246  break;
247  }
248 
249  // required .drizzled.message.Engine engine = 3;
250  case 3: {
251  if (tag == 26) {
252  parse_engine:
253  DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
254  input, mutable_engine()));
255  } else {
256  goto handle_unusual;
257  }
258  if (input->ExpectTag(88)) goto parse_creation_timestamp;
259  break;
260  }
261 
262  // required uint64 creation_timestamp = 11 [default = 0];
263  case 11: {
264  if (tag == 88) {
265  parse_creation_timestamp:
266  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
267  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
268  input, &creation_timestamp_)));
269  set_has_creation_timestamp();
270  } else {
271  goto handle_unusual;
272  }
273  if (input->ExpectTag(96)) goto parse_update_timestamp;
274  break;
275  }
276 
277  // required uint64 update_timestamp = 12 [default = 0];
278  case 12: {
279  if (tag == 96) {
280  parse_update_timestamp:
281  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
282  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
283  input, &update_timestamp_)));
284  set_has_update_timestamp();
285  } else {
286  goto handle_unusual;
287  }
288  if (input->ExpectTag(106)) goto parse_uuid;
289  break;
290  }
291 
292  // optional string uuid = 13;
293  case 13: {
294  if (tag == 106) {
295  parse_uuid:
296  DO_(::google::protobuf::internal::WireFormatLite::ReadString(
297  input, this->mutable_uuid()));
298  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
299  this->uuid().data(), this->uuid().length(),
300  ::google::protobuf::internal::WireFormat::PARSE,
301  "uuid");
302  } else {
303  goto handle_unusual;
304  }
305  if (input->ExpectTag(112)) goto parse_version;
306  break;
307  }
308 
309  // optional uint64 version = 14;
310  case 14: {
311  if (tag == 112) {
312  parse_version:
313  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
314  ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
315  input, &version_)));
316  set_has_version();
317  } else {
318  goto handle_unusual;
319  }
320  if (input->ExpectAtEnd()) goto success;
321  break;
322  }
323 
324  default: {
325  handle_unusual:
326  if (tag == 0 ||
327  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
328  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
329  goto success;
330  }
331  DO_(::google::protobuf::internal::WireFormat::SkipField(
332  input, tag, mutable_unknown_fields()));
333  break;
334  }
335  }
336  }
337 success:
338  // @@protoc_insertion_point(parse_success:drizzled.message.Catalog)
339  return true;
340 failure:
341  // @@protoc_insertion_point(parse_failure:drizzled.message.Catalog)
342  return false;
343 #undef DO_
344 }
345 
346 void Catalog::SerializeWithCachedSizes(
347  ::google::protobuf::io::CodedOutputStream* output) const {
348  // @@protoc_insertion_point(serialize_start:drizzled.message.Catalog)
349  // required string name = 1;
350  if (has_name()) {
351  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
352  this->name().data(), this->name().length(),
353  ::google::protobuf::internal::WireFormat::SERIALIZE,
354  "name");
355  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
356  1, this->name(), output);
357  }
358 
359  // required .drizzled.message.Engine engine = 3;
360  if (has_engine()) {
361  ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
362  3, this->engine(), output);
363  }
364 
365  // required uint64 creation_timestamp = 11 [default = 0];
366  if (has_creation_timestamp()) {
367  ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->creation_timestamp(), output);
368  }
369 
370  // required uint64 update_timestamp = 12 [default = 0];
371  if (has_update_timestamp()) {
372  ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->update_timestamp(), output);
373  }
374 
375  // optional string uuid = 13;
376  if (has_uuid()) {
377  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
378  this->uuid().data(), this->uuid().length(),
379  ::google::protobuf::internal::WireFormat::SERIALIZE,
380  "uuid");
381  ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
382  13, this->uuid(), output);
383  }
384 
385  // optional uint64 version = 14;
386  if (has_version()) {
387  ::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->version(), output);
388  }
389 
390  if (!unknown_fields().empty()) {
391  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
392  unknown_fields(), output);
393  }
394  // @@protoc_insertion_point(serialize_end:drizzled.message.Catalog)
395 }
396 
397 ::google::protobuf::uint8* Catalog::SerializeWithCachedSizesToArray(
398  ::google::protobuf::uint8* target) const {
399  // @@protoc_insertion_point(serialize_to_array_start:drizzled.message.Catalog)
400  // required string name = 1;
401  if (has_name()) {
402  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
403  this->name().data(), this->name().length(),
404  ::google::protobuf::internal::WireFormat::SERIALIZE,
405  "name");
406  target =
407  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
408  1, this->name(), target);
409  }
410 
411  // required .drizzled.message.Engine engine = 3;
412  if (has_engine()) {
413  target = ::google::protobuf::internal::WireFormatLite::
414  WriteMessageNoVirtualToArray(
415  3, this->engine(), target);
416  }
417 
418  // required uint64 creation_timestamp = 11 [default = 0];
419  if (has_creation_timestamp()) {
420  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->creation_timestamp(), target);
421  }
422 
423  // required uint64 update_timestamp = 12 [default = 0];
424  if (has_update_timestamp()) {
425  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(12, this->update_timestamp(), target);
426  }
427 
428  // optional string uuid = 13;
429  if (has_uuid()) {
430  ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
431  this->uuid().data(), this->uuid().length(),
432  ::google::protobuf::internal::WireFormat::SERIALIZE,
433  "uuid");
434  target =
435  ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
436  13, this->uuid(), target);
437  }
438 
439  // optional uint64 version = 14;
440  if (has_version()) {
441  target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->version(), target);
442  }
443 
444  if (!unknown_fields().empty()) {
445  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
446  unknown_fields(), target);
447  }
448  // @@protoc_insertion_point(serialize_to_array_end:drizzled.message.Catalog)
449  return target;
450 }
451 
452 int Catalog::ByteSize() const {
453  int total_size = 0;
454 
455  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
456  // required string name = 1;
457  if (has_name()) {
458  total_size += 1 +
459  ::google::protobuf::internal::WireFormatLite::StringSize(
460  this->name());
461  }
462 
463  // required .drizzled.message.Engine engine = 3;
464  if (has_engine()) {
465  total_size += 1 +
466  ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
467  this->engine());
468  }
469 
470  // required uint64 creation_timestamp = 11 [default = 0];
471  if (has_creation_timestamp()) {
472  total_size += 1 +
473  ::google::protobuf::internal::WireFormatLite::UInt64Size(
474  this->creation_timestamp());
475  }
476 
477  // required uint64 update_timestamp = 12 [default = 0];
478  if (has_update_timestamp()) {
479  total_size += 1 +
480  ::google::protobuf::internal::WireFormatLite::UInt64Size(
481  this->update_timestamp());
482  }
483 
484  // optional string uuid = 13;
485  if (has_uuid()) {
486  total_size += 1 +
487  ::google::protobuf::internal::WireFormatLite::StringSize(
488  this->uuid());
489  }
490 
491  // optional uint64 version = 14;
492  if (has_version()) {
493  total_size += 1 +
494  ::google::protobuf::internal::WireFormatLite::UInt64Size(
495  this->version());
496  }
497 
498  }
499  if (!unknown_fields().empty()) {
500  total_size +=
501  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
502  unknown_fields());
503  }
504  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
505  _cached_size_ = total_size;
506  GOOGLE_SAFE_CONCURRENT_WRITES_END();
507  return total_size;
508 }
509 
510 void Catalog::MergeFrom(const ::google::protobuf::Message& from) {
511  GOOGLE_CHECK_NE(&from, this);
512  const Catalog* source =
513  ::google::protobuf::internal::dynamic_cast_if_available<const Catalog*>(
514  &from);
515  if (source == NULL) {
516  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
517  } else {
518  MergeFrom(*source);
519  }
520 }
521 
522 void Catalog::MergeFrom(const Catalog& from) {
523  GOOGLE_CHECK_NE(&from, this);
524  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
525  if (from.has_name()) {
526  set_name(from.name());
527  }
528  if (from.has_engine()) {
529  mutable_engine()->::drizzled::message::Engine::MergeFrom(from.engine());
530  }
531  if (from.has_creation_timestamp()) {
532  set_creation_timestamp(from.creation_timestamp());
533  }
534  if (from.has_update_timestamp()) {
535  set_update_timestamp(from.update_timestamp());
536  }
537  if (from.has_uuid()) {
538  set_uuid(from.uuid());
539  }
540  if (from.has_version()) {
541  set_version(from.version());
542  }
543  }
544  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
545 }
546 
547 void Catalog::CopyFrom(const ::google::protobuf::Message& from) {
548  if (&from == this) return;
549  Clear();
550  MergeFrom(from);
551 }
552 
553 void Catalog::CopyFrom(const Catalog& from) {
554  if (&from == this) return;
555  Clear();
556  MergeFrom(from);
557 }
558 
559 bool Catalog::IsInitialized() const {
560  if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
561 
562  if (has_engine()) {
563  if (!this->engine().IsInitialized()) return false;
564  }
565  return true;
566 }
567 
568 void Catalog::Swap(Catalog* other) {
569  if (other != this) {
570  std::swap(name_, other->name_);
571  std::swap(engine_, other->engine_);
572  std::swap(creation_timestamp_, other->creation_timestamp_);
573  std::swap(update_timestamp_, other->update_timestamp_);
574  std::swap(uuid_, other->uuid_);
575  std::swap(version_, other->version_);
576  std::swap(_has_bits_[0], other->_has_bits_[0]);
577  _unknown_fields_.Swap(&other->_unknown_fields_);
578  std::swap(_cached_size_, other->_cached_size_);
579  }
580 }
581 
582 ::google::protobuf::Metadata Catalog::GetMetadata() const {
583  protobuf_AssignDescriptorsOnce();
584  ::google::protobuf::Metadata metadata;
585  metadata.descriptor = Catalog_descriptor_;
586  metadata.reflection = Catalog_reflection_;
587  return metadata;
588 }
589 
590 
591 // @@protoc_insertion_point(namespace_scope)
592 
593 } // namespace message
594 } // namespace drizzled
595 
596 // @@protoc_insertion_point(global_scope)
TODO: Rename this file - func.h is stupid.