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