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() {
126 void Catalog::InitAsDefaultInstance() {
130 Catalog::Catalog(
const Catalog& from)
131 : ::
google::protobuf::Message() {
137 void Catalog::SharedCtor() {
138 ::google::protobuf::internal::GetEmptyString();
140 name_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
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_));
149 Catalog::~Catalog() {
154 void Catalog::SharedDtor() {
155 if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
158 if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
161 if (
this != default_instance_) {
166 void Catalog::SetCachedSize(
int size)
const {
167 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
168 _cached_size_ = size;
169 GOOGLE_SAFE_CONCURRENT_WRITES_END();
171 const ::google::protobuf::Descriptor* Catalog::descriptor() {
172 protobuf_AssignDescriptorsOnce();
173 return Catalog_descriptor_;
176 const Catalog& Catalog::default_instance() {
177 if (default_instance_ == NULL) protobuf_AddDesc_catalog_2eproto();
178 return *default_instance_;
181 Catalog* Catalog::default_instance_ = NULL;
183 Catalog* Catalog::New()
const {
187 void Catalog::Clear() {
188 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
189 &reinterpret_cast<Catalog*>(16)->f) - \
190 reinterpret_cast<char*>(16))
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); \
198 if (_has_bits_[0 / 32] & 63) {
199 ZR_(creation_timestamp_, update_timestamp_);
201 if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
206 if (engine_ != NULL) engine_->::drizzled::message::Engine::Clear();
209 if (uuid_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
213 version_ = GOOGLE_ULONGLONG(0);
216 #undef OFFSET_OF_FIELD_
219 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
220 mutable_unknown_fields()->Clear();
223 bool Catalog::MergePartialFromCodedStream(
224 ::google::protobuf::io::CodedInputStream* input) {
225 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
226 ::google::protobuf::uint32 tag;
229 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
231 if (!p.second)
goto handle_unusual;
232 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
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,
245 if (input->ExpectTag(26))
goto parse_engine;
253 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
254 input, mutable_engine()));
258 if (input->ExpectTag(88))
goto parse_creation_timestamp;
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();
273 if (input->ExpectTag(96))
goto parse_update_timestamp;
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();
288 if (input->ExpectTag(106))
goto 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,
305 if (input->ExpectTag(112))
goto parse_version;
313 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
314 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
320 if (input->ExpectAtEnd())
goto success;
327 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
328 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
331 DO_(::google::protobuf::internal::WireFormat::SkipField(
332 input, tag, mutable_unknown_fields()));
346 void Catalog::SerializeWithCachedSizes(
347 ::google::protobuf::io::CodedOutputStream* output)
const {
351 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
352 this->name().data(), this->name().length(),
353 ::google::protobuf::internal::WireFormat::SERIALIZE,
355 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
356 1, this->name(), output);
361 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
362 3, this->engine(), output);
366 if (has_creation_timestamp()) {
367 ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->creation_timestamp(), output);
371 if (has_update_timestamp()) {
372 ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->update_timestamp(), output);
377 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
378 this->uuid().data(), this->uuid().length(),
379 ::google::protobuf::internal::WireFormat::SERIALIZE,
381 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
382 13, this->uuid(), output);
387 ::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->version(), output);
390 if (!unknown_fields().empty()) {
391 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
392 unknown_fields(), output);
397 ::google::protobuf::uint8* Catalog::SerializeWithCachedSizesToArray(
398 ::google::protobuf::uint8* target)
const {
402 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
403 this->name().data(), this->name().length(),
404 ::google::protobuf::internal::WireFormat::SERIALIZE,
407 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
408 1, this->name(), target);
413 target = ::google::protobuf::internal::WireFormatLite::
414 WriteMessageNoVirtualToArray(
415 3, this->engine(), target);
419 if (has_creation_timestamp()) {
420 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->creation_timestamp(), target);
424 if (has_update_timestamp()) {
425 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(12, this->update_timestamp(), target);
430 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
431 this->uuid().data(), this->uuid().length(),
432 ::google::protobuf::internal::WireFormat::SERIALIZE,
435 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
436 13, this->uuid(), target);
441 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->version(), target);
444 if (!unknown_fields().empty()) {
445 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
446 unknown_fields(), target);
452 int Catalog::ByteSize()
const {
455 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
459 ::google::protobuf::internal::WireFormatLite::StringSize(
466 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
471 if (has_creation_timestamp()) {
473 ::google::protobuf::internal::WireFormatLite::UInt64Size(
474 this->creation_timestamp());
478 if (has_update_timestamp()) {
480 ::google::protobuf::internal::WireFormatLite::UInt64Size(
481 this->update_timestamp());
487 ::google::protobuf::internal::WireFormatLite::StringSize(
494 ::google::protobuf::internal::WireFormatLite::UInt64Size(
499 if (!unknown_fields().empty()) {
501 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
504 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
505 _cached_size_ = total_size;
506 GOOGLE_SAFE_CONCURRENT_WRITES_END();
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*>(
515 if (source == NULL) {
516 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
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());
528 if (from.has_engine()) {
529 mutable_engine()->::drizzled::message::Engine::MergeFrom(from.engine());
531 if (from.has_creation_timestamp()) {
532 set_creation_timestamp(from.creation_timestamp());
534 if (from.has_update_timestamp()) {
535 set_update_timestamp(from.update_timestamp());
537 if (from.has_uuid()) {
538 set_uuid(from.uuid());
540 if (from.has_version()) {
541 set_version(from.version());
544 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
547 void Catalog::CopyFrom(const ::google::protobuf::Message& from) {
548 if (&from ==
this)
return;
553 void Catalog::CopyFrom(
const Catalog& from) {
554 if (&from ==
this)
return;
559 bool Catalog::IsInitialized()
const {
560 if ((_has_bits_[0] & 0x0000000f) != 0x0000000f)
return false;
563 if (!this->engine().IsInitialized())
return false;
568 void Catalog::Swap(Catalog* other) {
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_);
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_;
TODO: Rename this file - func.h is stupid.