3 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
4 #include "catalog.pb.h"
8 #include <google/protobuf/stubs/once.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/wire_format_lite_inl.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/reflection_ops.h>
13 #include <google/protobuf/wire_format.h>
21 const ::google::protobuf::Descriptor* Catalog_descriptor_ = NULL;
22 const ::google::protobuf::internal::GeneratedMessageReflection*
23 Catalog_reflection_ = NULL;
28 void protobuf_AssignDesc_catalog_2eproto() {
29 protobuf_AddDesc_catalog_2eproto();
30 const ::google::protobuf::FileDescriptor* file =
31 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
33 GOOGLE_CHECK(file != NULL);
34 Catalog_descriptor_ = file->message_type(0);
35 static const int Catalog_offsets_[6] = {
36 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, name_),
37 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, engine_),
38 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, creation_timestamp_),
39 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, update_timestamp_),
40 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, uuid_),
41 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, version_),
44 new ::google::protobuf::internal::GeneratedMessageReflection(
46 Catalog::default_instance_,
48 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _has_bits_[0]),
49 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Catalog, _unknown_fields_),
51 ::google::protobuf::DescriptorPool::generated_pool(),
52 ::google::protobuf::MessageFactory::generated_factory(),
58 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
59 inline void protobuf_AssignDescriptorsOnce() {
60 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
61 &protobuf_AssignDesc_catalog_2eproto);
64 void protobuf_RegisterTypes(const ::std::string&) {
65 protobuf_AssignDescriptorsOnce();
66 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
67 Catalog_descriptor_, &Catalog::default_instance());
72 void protobuf_ShutdownFile_catalog_2eproto() {
73 delete Catalog::default_instance_;
74 delete Catalog_reflection_;
77 void protobuf_AddDesc_catalog_2eproto() {
78 static bool already_here =
false;
79 if (already_here)
return;
81 GOOGLE_PROTOBUF_VERIFY_VERSION;
83 ::drizzled::message::protobuf_AddDesc_engine_2eproto();
84 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
85 "\n\rcatalog.proto\022\020drizzled.message\032\014engin"
86 "e.proto\"\234\001\n\007Catalog\022\014\n\004name\030\001 \002(\t\022(\n\006eng"
87 "ine\030\003 \002(\0132\030.drizzled.message.Engine\022\035\n\022c"
88 "reation_timestamp\030\013 \002(\004:\0010\022\033\n\020update_tim"
89 "estamp\030\014 \002(\004:\0010\022\014\n\004uuid\030\r \001(\t\022\017\n\007version"
90 "\030\016 \001(\004B(\n\024org.drizzle.messagesB\016CatalogM"
92 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
93 "catalog.proto", &protobuf_RegisterTypes);
94 Catalog::default_instance_ =
new Catalog();
95 Catalog::default_instance_->InitAsDefaultInstance();
96 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_catalog_2eproto);
102 protobuf_AddDesc_catalog_2eproto();
104 } static_descriptor_initializer_catalog_2eproto_;
110 const int Catalog::kNameFieldNumber;
111 const int Catalog::kEngineFieldNumber;
112 const int Catalog::kCreationTimestampFieldNumber;
113 const int Catalog::kUpdateTimestampFieldNumber;
114 const int Catalog::kUuidFieldNumber;
115 const int Catalog::kVersionFieldNumber;
119 : ::google::protobuf::Message() {
123 void Catalog::InitAsDefaultInstance() {
127 Catalog::Catalog(
const Catalog& from)
128 : ::google::protobuf::Message() {
133 void Catalog::SharedCtor() {
135 name_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
137 creation_timestamp_ = GOOGLE_ULONGLONG(0);
138 update_timestamp_ = GOOGLE_ULONGLONG(0);
139 uuid_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
140 version_ = GOOGLE_ULONGLONG(0);
141 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
144 Catalog::~Catalog() {
148 void Catalog::SharedDtor() {
149 if (name_ != &::google::protobuf::internal::kEmptyString) {
152 if (uuid_ != &::google::protobuf::internal::kEmptyString) {
155 if (
this != default_instance_) {
160 void Catalog::SetCachedSize(
int size)
const {
161 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
162 _cached_size_ = size;
163 GOOGLE_SAFE_CONCURRENT_WRITES_END();
165 const ::google::protobuf::Descriptor* Catalog::descriptor() {
166 protobuf_AssignDescriptorsOnce();
167 return Catalog_descriptor_;
170 const Catalog& Catalog::default_instance() {
171 if (default_instance_ == NULL) protobuf_AddDesc_catalog_2eproto();
return *default_instance_;
174 Catalog* Catalog::default_instance_ = NULL;
176 Catalog* Catalog::New()
const {
180 void Catalog::Clear() {
181 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
183 if (name_ != &::google::protobuf::internal::kEmptyString) {
188 if (engine_ != NULL) engine_->::drizzled::message::Engine::Clear();
190 creation_timestamp_ = GOOGLE_ULONGLONG(0);
191 update_timestamp_ = GOOGLE_ULONGLONG(0);
193 if (uuid_ != &::google::protobuf::internal::kEmptyString) {
197 version_ = GOOGLE_ULONGLONG(0);
199 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
200 mutable_unknown_fields()->Clear();
203 bool Catalog::MergePartialFromCodedStream(
204 ::google::protobuf::io::CodedInputStream* input) {
205 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
206 ::google::protobuf::uint32 tag;
207 while ((tag = input->ReadTag()) != 0) {
208 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
211 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
212 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
213 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
214 input, this->mutable_name()));
215 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
216 this->name().data(), this->name().length(),
217 ::google::protobuf::internal::WireFormat::PARSE);
219 goto handle_uninterpreted;
221 if (input->ExpectTag(26))
goto parse_engine;
227 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
228 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
230 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
231 input, mutable_engine()));
233 goto handle_uninterpreted;
235 if (input->ExpectTag(88))
goto parse_creation_timestamp;
241 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
242 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
243 parse_creation_timestamp:
244 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
245 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
246 input, &creation_timestamp_)));
247 set_has_creation_timestamp();
249 goto handle_uninterpreted;
251 if (input->ExpectTag(96))
goto parse_update_timestamp;
257 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
258 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
259 parse_update_timestamp:
260 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
261 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
262 input, &update_timestamp_)));
263 set_has_update_timestamp();
265 goto handle_uninterpreted;
267 if (input->ExpectTag(106))
goto parse_uuid;
273 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
274 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
276 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
277 input, this->mutable_uuid()));
278 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
279 this->uuid().data(), this->uuid().length(),
280 ::google::protobuf::internal::WireFormat::PARSE);
282 goto handle_uninterpreted;
284 if (input->ExpectTag(112))
goto parse_version;
290 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
291 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
293 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
294 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
298 goto handle_uninterpreted;
300 if (input->ExpectAtEnd())
return true;
305 handle_uninterpreted:
306 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
307 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
310 DO_(::google::protobuf::internal::WireFormat::SkipField(
311 input, tag, mutable_unknown_fields()));
320 void Catalog::SerializeWithCachedSizes(
321 ::google::protobuf::io::CodedOutputStream* output)
const {
324 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
325 this->name().data(), this->name().length(),
326 ::google::protobuf::internal::WireFormat::SERIALIZE);
327 ::google::protobuf::internal::WireFormatLite::WriteString(
328 1, this->name(), output);
333 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
334 3, this->engine(), output);
338 if (has_creation_timestamp()) {
339 ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->creation_timestamp(), output);
343 if (has_update_timestamp()) {
344 ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->update_timestamp(), output);
349 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
350 this->uuid().data(), this->uuid().length(),
351 ::google::protobuf::internal::WireFormat::SERIALIZE);
352 ::google::protobuf::internal::WireFormatLite::WriteString(
353 13, this->uuid(), output);
358 ::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->version(), output);
361 if (!unknown_fields().empty()) {
362 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
363 unknown_fields(), output);
367 ::google::protobuf::uint8* Catalog::SerializeWithCachedSizesToArray(
368 ::google::protobuf::uint8* target)
const {
371 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
372 this->name().data(), this->name().length(),
373 ::google::protobuf::internal::WireFormat::SERIALIZE);
375 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
376 1, this->name(), target);
381 target = ::google::protobuf::internal::WireFormatLite::
382 WriteMessageNoVirtualToArray(
383 3, this->engine(), target);
387 if (has_creation_timestamp()) {
388 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->creation_timestamp(), target);
392 if (has_update_timestamp()) {
393 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(12, this->update_timestamp(), target);
398 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
399 this->uuid().data(), this->uuid().length(),
400 ::google::protobuf::internal::WireFormat::SERIALIZE);
402 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
403 13, this->uuid(), target);
408 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->version(), target);
411 if (!unknown_fields().empty()) {
412 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
413 unknown_fields(), target);
418 int Catalog::ByteSize()
const {
421 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
425 ::google::protobuf::internal::WireFormatLite::StringSize(
432 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
437 if (has_creation_timestamp()) {
439 ::google::protobuf::internal::WireFormatLite::UInt64Size(
440 this->creation_timestamp());
444 if (has_update_timestamp()) {
446 ::google::protobuf::internal::WireFormatLite::UInt64Size(
447 this->update_timestamp());
453 ::google::protobuf::internal::WireFormatLite::StringSize(
460 ::google::protobuf::internal::WireFormatLite::UInt64Size(
465 if (!unknown_fields().empty()) {
467 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
470 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
471 _cached_size_ = total_size;
472 GOOGLE_SAFE_CONCURRENT_WRITES_END();
476 void Catalog::MergeFrom(const ::google::protobuf::Message& from) {
477 GOOGLE_CHECK_NE(&from,
this);
478 const Catalog* source =
479 ::google::protobuf::internal::dynamic_cast_if_available<const Catalog*>(
481 if (source == NULL) {
482 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
488 void Catalog::MergeFrom(
const Catalog& from) {
489 GOOGLE_CHECK_NE(&from,
this);
490 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
491 if (from.has_name()) {
492 set_name(from.name());
494 if (from.has_engine()) {
495 mutable_engine()->::drizzled::message::Engine::MergeFrom(from.engine());
497 if (from.has_creation_timestamp()) {
498 set_creation_timestamp(from.creation_timestamp());
500 if (from.has_update_timestamp()) {
501 set_update_timestamp(from.update_timestamp());
503 if (from.has_uuid()) {
504 set_uuid(from.uuid());
506 if (from.has_version()) {
507 set_version(from.version());
510 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
513 void Catalog::CopyFrom(const ::google::protobuf::Message& from) {
514 if (&from ==
this)
return;
519 void Catalog::CopyFrom(
const Catalog& from) {
520 if (&from ==
this)
return;
525 bool Catalog::IsInitialized()
const {
526 if ((_has_bits_[0] & 0x0000000f) != 0x0000000f)
return false;
529 if (!this->engine().IsInitialized())
return false;
534 void Catalog::Swap(Catalog* other) {
536 std::swap(name_, other->name_);
537 std::swap(engine_, other->engine_);
538 std::swap(creation_timestamp_, other->creation_timestamp_);
539 std::swap(update_timestamp_, other->update_timestamp_);
540 std::swap(uuid_, other->uuid_);
541 std::swap(version_, other->version_);
542 std::swap(_has_bits_[0], other->_has_bits_[0]);
543 _unknown_fields_.Swap(&other->_unknown_fields_);
544 std::swap(_cached_size_, other->_cached_size_);
548 ::google::protobuf::Metadata Catalog::GetMetadata()
const {
549 protobuf_AssignDescriptorsOnce();
550 ::google::protobuf::Metadata metadata;
551 metadata.descriptor = Catalog_descriptor_;
552 metadata.reflection = Catalog_reflection_;