4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "catalog.pb.h"
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>
24 const ::google::protobuf::Descriptor* Catalog_descriptor_ = NULL;
25 const ::google::protobuf::internal::GeneratedMessageReflection*
26 Catalog_reflection_ = NULL;
31 void protobuf_AssignDesc_catalog_2eproto() {
32 protobuf_AddDesc_catalog_2eproto();
33 const ::google::protobuf::FileDescriptor* file =
34 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
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_),
47 new ::google::protobuf::internal::GeneratedMessageReflection(
49 Catalog::default_instance_,
51 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _has_bits_[0]),
52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _unknown_fields_),
54 ::google::protobuf::DescriptorPool::generated_pool(),
55 ::google::protobuf::MessageFactory::generated_factory(),
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);
67 void protobuf_RegisterTypes(const ::std::string&) {
68 protobuf_AssignDescriptorsOnce();
69 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
70 Catalog_descriptor_, &Catalog::default_instance());
75 void protobuf_ShutdownFile_catalog_2eproto() {
76 delete Catalog::default_instance_;
77 delete Catalog_reflection_;
80 void protobuf_AddDesc_catalog_2eproto() {
81 static bool already_here =
false;
82 if (already_here)
return;
84 GOOGLE_PROTOBUF_VERIFY_VERSION;
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"
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);
105 protobuf_AddDesc_catalog_2eproto();
107 } static_descriptor_initializer_catalog_2eproto_;
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;
121 : ::google::protobuf::Message() {
125 void Catalog::InitAsDefaultInstance() {
129 Catalog::Catalog(
const Catalog& from)
130 : ::google::protobuf::Message() {
135 void Catalog::SharedCtor() {
137 name_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
139 creation_timestamp_ = GOOGLE_ULONGLONG(0);
140 update_timestamp_ = GOOGLE_ULONGLONG(0);
141 uuid_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
142 version_ = GOOGLE_ULONGLONG(0);
143 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
146 Catalog::~Catalog() {
150 void Catalog::SharedDtor() {
151 if (name_ != &::google::protobuf::internal::kEmptyString) {
154 if (uuid_ != &::google::protobuf::internal::kEmptyString) {
157 if (
this != default_instance_) {
162 void Catalog::SetCachedSize(
int size)
const {
163 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
164 _cached_size_ = size;
165 GOOGLE_SAFE_CONCURRENT_WRITES_END();
167 const ::google::protobuf::Descriptor* Catalog::descriptor() {
168 protobuf_AssignDescriptorsOnce();
169 return Catalog_descriptor_;
172 const Catalog& Catalog::default_instance() {
173 if (default_instance_ == NULL) protobuf_AddDesc_catalog_2eproto();
174 return *default_instance_;
177 Catalog* Catalog::default_instance_ = NULL;
179 Catalog* Catalog::New()
const {
183 void Catalog::Clear() {
184 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
186 if (name_ != &::google::protobuf::internal::kEmptyString) {
191 if (engine_ != NULL) engine_->::drizzled::message::Engine::Clear();
193 creation_timestamp_ = GOOGLE_ULONGLONG(0);
194 update_timestamp_ = GOOGLE_ULONGLONG(0);
196 if (uuid_ != &::google::protobuf::internal::kEmptyString) {
200 version_ = GOOGLE_ULONGLONG(0);
202 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
203 mutable_unknown_fields()->Clear();
206 bool Catalog::MergePartialFromCodedStream(
207 ::google::protobuf::io::CodedInputStream* input) {
208 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
209 ::google::protobuf::uint32 tag;
210 while ((tag = input->ReadTag()) != 0) {
211 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
214 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
215 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
216 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
217 input, this->mutable_name()));
218 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
219 this->name().data(), this->name().length(),
220 ::google::protobuf::internal::WireFormat::PARSE);
222 goto handle_uninterpreted;
224 if (input->ExpectTag(26))
goto parse_engine;
230 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
231 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
233 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
234 input, mutable_engine()));
236 goto handle_uninterpreted;
238 if (input->ExpectTag(88))
goto parse_creation_timestamp;
244 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
245 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
246 parse_creation_timestamp:
247 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
248 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
249 input, &creation_timestamp_)));
250 set_has_creation_timestamp();
252 goto handle_uninterpreted;
254 if (input->ExpectTag(96))
goto parse_update_timestamp;
260 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
261 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
262 parse_update_timestamp:
263 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
264 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
265 input, &update_timestamp_)));
266 set_has_update_timestamp();
268 goto handle_uninterpreted;
270 if (input->ExpectTag(106))
goto parse_uuid;
276 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
277 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
279 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
280 input, this->mutable_uuid()));
281 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
282 this->uuid().data(), this->uuid().length(),
283 ::google::protobuf::internal::WireFormat::PARSE);
285 goto handle_uninterpreted;
287 if (input->ExpectTag(112))
goto parse_version;
293 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
294 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
296 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
297 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
301 goto handle_uninterpreted;
303 if (input->ExpectAtEnd())
return true;
308 handle_uninterpreted:
309 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
310 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
313 DO_(::google::protobuf::internal::WireFormat::SkipField(
314 input, tag, mutable_unknown_fields()));
323 void Catalog::SerializeWithCachedSizes(
324 ::google::protobuf::io::CodedOutputStream* output)
const {
327 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
328 this->name().data(), this->name().length(),
329 ::google::protobuf::internal::WireFormat::SERIALIZE);
330 ::google::protobuf::internal::WireFormatLite::WriteString(
331 1, this->name(), output);
336 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
337 3, this->engine(), output);
341 if (has_creation_timestamp()) {
342 ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->creation_timestamp(), output);
346 if (has_update_timestamp()) {
347 ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->update_timestamp(), output);
352 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
353 this->uuid().data(), this->uuid().length(),
354 ::google::protobuf::internal::WireFormat::SERIALIZE);
355 ::google::protobuf::internal::WireFormatLite::WriteString(
356 13, this->uuid(), output);
361 ::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->version(), output);
364 if (!unknown_fields().empty()) {
365 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
366 unknown_fields(), output);
370 ::google::protobuf::uint8* Catalog::SerializeWithCachedSizesToArray(
371 ::google::protobuf::uint8* target)
const {
374 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
375 this->name().data(), this->name().length(),
376 ::google::protobuf::internal::WireFormat::SERIALIZE);
378 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
379 1, this->name(), target);
384 target = ::google::protobuf::internal::WireFormatLite::
385 WriteMessageNoVirtualToArray(
386 3, this->engine(), target);
390 if (has_creation_timestamp()) {
391 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->creation_timestamp(), target);
395 if (has_update_timestamp()) {
396 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(12, this->update_timestamp(), target);
401 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
402 this->uuid().data(), this->uuid().length(),
403 ::google::protobuf::internal::WireFormat::SERIALIZE);
405 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
406 13, this->uuid(), target);
411 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->version(), target);
414 if (!unknown_fields().empty()) {
415 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
416 unknown_fields(), target);
421 int Catalog::ByteSize()
const {
424 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
428 ::google::protobuf::internal::WireFormatLite::StringSize(
435 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
440 if (has_creation_timestamp()) {
442 ::google::protobuf::internal::WireFormatLite::UInt64Size(
443 this->creation_timestamp());
447 if (has_update_timestamp()) {
449 ::google::protobuf::internal::WireFormatLite::UInt64Size(
450 this->update_timestamp());
456 ::google::protobuf::internal::WireFormatLite::StringSize(
463 ::google::protobuf::internal::WireFormatLite::UInt64Size(
468 if (!unknown_fields().empty()) {
470 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
473 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
474 _cached_size_ = total_size;
475 GOOGLE_SAFE_CONCURRENT_WRITES_END();
479 void Catalog::MergeFrom(const ::google::protobuf::Message& from) {
480 GOOGLE_CHECK_NE(&from,
this);
481 const Catalog* source =
482 ::google::protobuf::internal::dynamic_cast_if_available<const Catalog*>(
484 if (source == NULL) {
485 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
491 void Catalog::MergeFrom(
const Catalog& from) {
492 GOOGLE_CHECK_NE(&from,
this);
493 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
494 if (from.has_name()) {
495 set_name(from.name());
497 if (from.has_engine()) {
498 mutable_engine()->::drizzled::message::Engine::MergeFrom(from.engine());
500 if (from.has_creation_timestamp()) {
501 set_creation_timestamp(from.creation_timestamp());
503 if (from.has_update_timestamp()) {
504 set_update_timestamp(from.update_timestamp());
506 if (from.has_uuid()) {
507 set_uuid(from.uuid());
509 if (from.has_version()) {
510 set_version(from.version());
513 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
516 void Catalog::CopyFrom(const ::google::protobuf::Message& from) {
517 if (&from ==
this)
return;
522 void Catalog::CopyFrom(
const Catalog& from) {
523 if (&from ==
this)
return;
528 bool Catalog::IsInitialized()
const {
529 if ((_has_bits_[0] & 0x0000000f) != 0x0000000f)
return false;
532 if (!this->engine().IsInitialized())
return false;
537 void Catalog::Swap(Catalog* other) {
539 std::swap(name_, other->name_);
540 std::swap(engine_, other->engine_);
541 std::swap(creation_timestamp_, other->creation_timestamp_);
542 std::swap(update_timestamp_, other->update_timestamp_);
543 std::swap(uuid_, other->uuid_);
544 std::swap(version_, other->version_);
545 std::swap(_has_bits_[0], other->_has_bits_[0]);
546 _unknown_fields_.Swap(&other->_unknown_fields_);
547 std::swap(_cached_size_, other->_cached_size_);
551 ::google::protobuf::Metadata Catalog::GetMetadata()
const {
552 protobuf_AssignDescriptorsOnce();
553 ::google::protobuf::Metadata metadata;
554 metadata.descriptor = Catalog_descriptor_;
555 metadata.reflection = Catalog_reflection_;