00001
00002
00003 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
00004 #include "event.pb.h"
00005 #include <google/protobuf/stubs/once.h>
00006 #include <google/protobuf/io/coded_stream.h>
00007 #include <google/protobuf/wire_format_lite_inl.h>
00008 #include <google/protobuf/descriptor.h>
00009 #include <google/protobuf/reflection_ops.h>
00010 #include <google/protobuf/wire_format.h>
00011
00012
00013 namespace drizzled {
00014 namespace message {
00015
00016 namespace {
00017
00018 const ::google::protobuf::Descriptor* Event_descriptor_ = NULL;
00019 const ::google::protobuf::internal::GeneratedMessageReflection*
00020 Event_reflection_ = NULL;
00021 const ::google::protobuf::EnumDescriptor* Event_Type_descriptor_ = NULL;
00022
00023 }
00024
00025
00026 void protobuf_AssignDesc_event_2eproto() {
00027 protobuf_AddDesc_event_2eproto();
00028 const ::google::protobuf::FileDescriptor* file =
00029 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
00030 "event.proto");
00031 GOOGLE_CHECK(file != NULL);
00032 Event_descriptor_ = file->message_type(0);
00033 static const int Event_offsets_[1] = {
00034 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, type_),
00035 };
00036 Event_reflection_ =
00037 new ::google::protobuf::internal::GeneratedMessageReflection(
00038 Event_descriptor_,
00039 Event::default_instance_,
00040 Event_offsets_,
00041 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, _has_bits_[0]),
00042 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, _unknown_fields_),
00043 -1,
00044 ::google::protobuf::DescriptorPool::generated_pool(),
00045 ::google::protobuf::MessageFactory::generated_factory(),
00046 sizeof(Event));
00047 Event_Type_descriptor_ = Event_descriptor_->enum_type(0);
00048 }
00049
00050 namespace {
00051
00052 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
00053 inline void protobuf_AssignDescriptorsOnce() {
00054 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
00055 &protobuf_AssignDesc_event_2eproto);
00056 }
00057
00058 void protobuf_RegisterTypes(const ::std::string&) {
00059 protobuf_AssignDescriptorsOnce();
00060 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
00061 Event_descriptor_, &Event::default_instance());
00062 }
00063
00064 }
00065
00066 void protobuf_ShutdownFile_event_2eproto() {
00067 delete Event::default_instance_;
00068 delete Event_reflection_;
00069 }
00070
00071 void protobuf_AddDesc_event_2eproto() {
00072 static bool already_here = false;
00073 if (already_here) return;
00074 already_here = true;
00075 GOOGLE_PROTOBUF_VERIFY_VERSION;
00076
00077 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
00078 "\n\013event.proto\022\020drizzled.message\"V\n\005Event"
00079 "\022*\n\004type\030\001 \002(\0162\034.drizzled.message.Event."
00080 "Type\"!\n\004Type\022\013\n\007STARTUP\020\000\022\014\n\010SHUTDOWN\020\001B"
00081 "&\n\024org.drizzle.messagesB\014EventMessageH\001", 159);
00082 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
00083 "event.proto", &protobuf_RegisterTypes);
00084 Event::default_instance_ = new Event();
00085 Event::default_instance_->InitAsDefaultInstance();
00086 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_event_2eproto);
00087 }
00088
00089
00090 struct StaticDescriptorInitializer_event_2eproto {
00091 StaticDescriptorInitializer_event_2eproto() {
00092 protobuf_AddDesc_event_2eproto();
00093 }
00094 } static_descriptor_initializer_event_2eproto_;
00095
00096
00097
00098
00099 const ::google::protobuf::EnumDescriptor* Event_Type_descriptor() {
00100 protobuf_AssignDescriptorsOnce();
00101 return Event_Type_descriptor_;
00102 }
00103 bool Event_Type_IsValid(int value) {
00104 switch(value) {
00105 case 0:
00106 case 1:
00107 return true;
00108 default:
00109 return false;
00110 }
00111 }
00112
00113 #ifndef _MSC_VER
00114 const Event_Type Event::STARTUP;
00115 const Event_Type Event::SHUTDOWN;
00116 const Event_Type Event::Type_MIN;
00117 const Event_Type Event::Type_MAX;
00118 const int Event::Type_ARRAYSIZE;
00119 #endif // _MSC_VER
00120 #ifndef _MSC_VER
00121 const int Event::kTypeFieldNumber;
00122 #endif // !_MSC_VER
00123
00124 Event::Event()
00125 : ::google::protobuf::Message() {
00126 SharedCtor();
00127 }
00128
00129 void Event::InitAsDefaultInstance() {
00130 }
00131
00132 Event::Event(const Event& from)
00133 : ::google::protobuf::Message() {
00134 SharedCtor();
00135 MergeFrom(from);
00136 }
00137
00138 void Event::SharedCtor() {
00139 _cached_size_ = 0;
00140 type_ = 0;
00141 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00142 }
00143
00144 Event::~Event() {
00145 SharedDtor();
00146 }
00147
00148 void Event::SharedDtor() {
00149 if (this != default_instance_) {
00150 }
00151 }
00152
00153 void Event::SetCachedSize(int size) const {
00154 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
00155 _cached_size_ = size;
00156 GOOGLE_SAFE_CONCURRENT_WRITES_END();
00157 }
00158 const ::google::protobuf::Descriptor* Event::descriptor() {
00159 protobuf_AssignDescriptorsOnce();
00160 return Event_descriptor_;
00161 }
00162
00163 const Event& Event::default_instance() {
00164 if (default_instance_ == NULL) protobuf_AddDesc_event_2eproto(); return *default_instance_;
00165 }
00166
00167 Event* Event::default_instance_ = NULL;
00168
00169 Event* Event::New() const {
00170 return new Event;
00171 }
00172
00173 void Event::Clear() {
00174 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00175 type_ = 0;
00176 }
00177 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00178 mutable_unknown_fields()->Clear();
00179 }
00180
00181 bool Event::MergePartialFromCodedStream(
00182 ::google::protobuf::io::CodedInputStream* input) {
00183 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
00184 ::google::protobuf::uint32 tag;
00185 while ((tag = input->ReadTag()) != 0) {
00186 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
00187
00188 case 1: {
00189 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
00190 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00191 int value;
00192 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
00193 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
00194 input, &value)));
00195 if (::drizzled::message::Event_Type_IsValid(value)) {
00196 set_type(static_cast< ::drizzled::message::Event_Type >(value));
00197 } else {
00198 mutable_unknown_fields()->AddVarint(1, value);
00199 }
00200 } else {
00201 goto handle_uninterpreted;
00202 }
00203 if (input->ExpectAtEnd()) return true;
00204 break;
00205 }
00206
00207 default: {
00208 handle_uninterpreted:
00209 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
00210 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
00211 return true;
00212 }
00213 DO_(::google::protobuf::internal::WireFormat::SkipField(
00214 input, tag, mutable_unknown_fields()));
00215 break;
00216 }
00217 }
00218 }
00219 return true;
00220 #undef DO_
00221 }
00222
00223 void Event::SerializeWithCachedSizes(
00224 ::google::protobuf::io::CodedOutputStream* output) const {
00225
00226 if (_has_bit(0)) {
00227 ::google::protobuf::internal::WireFormatLite::WriteEnum(
00228 1, this->type(), output);
00229 }
00230
00231 if (!unknown_fields().empty()) {
00232 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
00233 unknown_fields(), output);
00234 }
00235 }
00236
00237 ::google::protobuf::uint8* Event::SerializeWithCachedSizesToArray(
00238 ::google::protobuf::uint8* target) const {
00239
00240 if (_has_bit(0)) {
00241 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
00242 1, this->type(), target);
00243 }
00244
00245 if (!unknown_fields().empty()) {
00246 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
00247 unknown_fields(), target);
00248 }
00249 return target;
00250 }
00251
00252 int Event::ByteSize() const {
00253 int total_size = 0;
00254
00255 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00256
00257 if (has_type()) {
00258 total_size += 1 +
00259 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
00260 }
00261
00262 }
00263 if (!unknown_fields().empty()) {
00264 total_size +=
00265 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
00266 unknown_fields());
00267 }
00268 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
00269 _cached_size_ = total_size;
00270 GOOGLE_SAFE_CONCURRENT_WRITES_END();
00271 return total_size;
00272 }
00273
00274 void Event::MergeFrom(const ::google::protobuf::Message& from) {
00275 GOOGLE_CHECK_NE(&from, this);
00276 const Event* source =
00277 ::google::protobuf::internal::dynamic_cast_if_available<const Event*>(
00278 &from);
00279 if (source == NULL) {
00280 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
00281 } else {
00282 MergeFrom(*source);
00283 }
00284 }
00285
00286 void Event::MergeFrom(const Event& from) {
00287 GOOGLE_CHECK_NE(&from, this);
00288 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00289 if (from._has_bit(0)) {
00290 set_type(from.type());
00291 }
00292 }
00293 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
00294 }
00295
00296 void Event::CopyFrom(const ::google::protobuf::Message& from) {
00297 if (&from == this) return;
00298 Clear();
00299 MergeFrom(from);
00300 }
00301
00302 void Event::CopyFrom(const Event& from) {
00303 if (&from == this) return;
00304 Clear();
00305 MergeFrom(from);
00306 }
00307
00308 bool Event::IsInitialized() const {
00309 if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
00310
00311 return true;
00312 }
00313
00314 void Event::Swap(Event* other) {
00315 if (other != this) {
00316 std::swap(type_, other->type_);
00317 std::swap(_has_bits_[0], other->_has_bits_[0]);
00318 _unknown_fields_.Swap(&other->_unknown_fields_);
00319 std::swap(_cached_size_, other->_cached_size_);
00320 }
00321 }
00322
00323 ::google::protobuf::Metadata Event::GetMetadata() const {
00324 protobuf_AssignDescriptorsOnce();
00325 ::google::protobuf::Metadata metadata;
00326 metadata.descriptor = Event_descriptor_;
00327 metadata.reflection = Event_reflection_;
00328 return metadata;
00329 }
00330
00331
00332
00333
00334 }
00335 }
00336
00337