Drizzled Public API Documentation

event.pb.cc
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: event.proto
3 
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "event.pb.h"
6 
7 #include <algorithm>
8 
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>
17 // @@protoc_insertion_point(includes)
18 
19 namespace drizzled {
20 namespace message {
21 
22 namespace {
23 
24 const ::google::protobuf::Descriptor* Event_descriptor_ = NULL;
25 const ::google::protobuf::internal::GeneratedMessageReflection*
26  Event_reflection_ = NULL;
27 const ::google::protobuf::EnumDescriptor* Event_Type_descriptor_ = NULL;
28 
29 } // namespace
30 
31 
32 void protobuf_AssignDesc_event_2eproto() {
33  protobuf_AddDesc_event_2eproto();
34  const ::google::protobuf::FileDescriptor* file =
35  ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
36  "event.proto");
37  GOOGLE_CHECK(file != NULL);
38  Event_descriptor_ = file->message_type(0);
39  static const int Event_offsets_[1] = {
40  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, type_),
41  };
42  Event_reflection_ =
43  new ::google::protobuf::internal::GeneratedMessageReflection(
44  Event_descriptor_,
45  Event::default_instance_,
46  Event_offsets_,
47  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, _has_bits_[0]),
48  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, _unknown_fields_),
49  -1,
50  ::google::protobuf::DescriptorPool::generated_pool(),
51  ::google::protobuf::MessageFactory::generated_factory(),
52  sizeof(Event));
53  Event_Type_descriptor_ = Event_descriptor_->enum_type(0);
54 }
55 
56 namespace {
57 
58 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
59 inline void protobuf_AssignDescriptorsOnce() {
60  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
61  &protobuf_AssignDesc_event_2eproto);
62 }
63 
64 void protobuf_RegisterTypes(const ::std::string&) {
65  protobuf_AssignDescriptorsOnce();
66  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
67  Event_descriptor_, &Event::default_instance());
68 }
69 
70 } // namespace
71 
72 void protobuf_ShutdownFile_event_2eproto() {
73  delete Event::default_instance_;
74  delete Event_reflection_;
75 }
76 
77 void protobuf_AddDesc_event_2eproto() {
78  static bool already_here = false;
79  if (already_here) return;
80  already_here = true;
81  GOOGLE_PROTOBUF_VERIFY_VERSION;
82 
83  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
84  "\n\013event.proto\022\020drizzled.message\"V\n\005Event"
85  "\022*\n\004type\030\001 \002(\0162\034.drizzled.message.Event."
86  "Type\"!\n\004Type\022\013\n\007STARTUP\020\000\022\014\n\010SHUTDOWN\020\001B"
87  "&\n\024org.drizzle.messagesB\014EventMessageH\001", 159);
88  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
89  "event.proto", &protobuf_RegisterTypes);
90  Event::default_instance_ = new Event();
91  Event::default_instance_->InitAsDefaultInstance();
92  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_event_2eproto);
93 }
94 
95 // Force AddDescriptors() to be called at static initialization time.
98  protobuf_AddDesc_event_2eproto();
99  }
100 } static_descriptor_initializer_event_2eproto_;
101 
102 // ===================================================================
103 
104 const ::google::protobuf::EnumDescriptor* Event_Type_descriptor() {
105  protobuf_AssignDescriptorsOnce();
106  return Event_Type_descriptor_;
107 }
108 bool Event_Type_IsValid(int value) {
109  switch(value) {
110  case 0:
111  case 1:
112  return true;
113  default:
114  return false;
115  }
116 }
117 
118 #ifndef _MSC_VER
119 const Event_Type Event::STARTUP;
120 const Event_Type Event::SHUTDOWN;
121 const Event_Type Event::Type_MIN;
122 const Event_Type Event::Type_MAX;
123 const int Event::Type_ARRAYSIZE;
124 #endif // _MSC_VER
125 #ifndef _MSC_VER
126 const int Event::kTypeFieldNumber;
127 #endif // !_MSC_VER
128 
129 Event::Event()
130  : ::google::protobuf::Message() {
131  SharedCtor();
132  // @@protoc_insertion_point(constructor:drizzled.message.Event)
133 }
134 
135 void Event::InitAsDefaultInstance() {
136 }
137 
138 Event::Event(const Event& from)
139  : ::google::protobuf::Message() {
140  SharedCtor();
141  MergeFrom(from);
142  // @@protoc_insertion_point(copy_constructor:drizzled.message.Event)
143 }
144 
145 void Event::SharedCtor() {
146  _cached_size_ = 0;
147  type_ = 0;
148  ::memset(_has_bits_, 0, sizeof(_has_bits_));
149 }
150 
151 Event::~Event() {
152  // @@protoc_insertion_point(destructor:drizzled.message.Event)
153  SharedDtor();
154 }
155 
156 void Event::SharedDtor() {
157  if (this != default_instance_) {
158  }
159 }
160 
161 void Event::SetCachedSize(int size) const {
162  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
163  _cached_size_ = size;
164  GOOGLE_SAFE_CONCURRENT_WRITES_END();
165 }
166 const ::google::protobuf::Descriptor* Event::descriptor() {
167  protobuf_AssignDescriptorsOnce();
168  return Event_descriptor_;
169 }
170 
171 const Event& Event::default_instance() {
172  if (default_instance_ == NULL) protobuf_AddDesc_event_2eproto();
173  return *default_instance_;
174 }
175 
176 Event* Event::default_instance_ = NULL;
177 
178 Event* Event::New() const {
179  return new Event;
180 }
181 
182 void Event::Clear() {
183  type_ = 0;
184  ::memset(_has_bits_, 0, sizeof(_has_bits_));
185  mutable_unknown_fields()->Clear();
186 }
187 
188 bool Event::MergePartialFromCodedStream(
189  ::google::protobuf::io::CodedInputStream* input) {
190 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
191  ::google::protobuf::uint32 tag;
192  // @@protoc_insertion_point(parse_start:drizzled.message.Event)
193  for (;;) {
194  ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
195  tag = p.first;
196  if (!p.second) goto handle_unusual;
197  switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
198  // required .drizzled.message.Event.Type type = 1;
199  case 1: {
200  if (tag == 8) {
201  int value;
202  DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
203  int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
204  input, &value)));
205  if (::drizzled::message::Event_Type_IsValid(value)) {
206  set_type(static_cast< ::drizzled::message::Event_Type >(value));
207  } else {
208  mutable_unknown_fields()->AddVarint(1, value);
209  }
210  } else {
211  goto handle_unusual;
212  }
213  if (input->ExpectAtEnd()) goto success;
214  break;
215  }
216 
217  default: {
218  handle_unusual:
219  if (tag == 0 ||
220  ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
221  ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
222  goto success;
223  }
224  DO_(::google::protobuf::internal::WireFormat::SkipField(
225  input, tag, mutable_unknown_fields()));
226  break;
227  }
228  }
229  }
230 success:
231  // @@protoc_insertion_point(parse_success:drizzled.message.Event)
232  return true;
233 failure:
234  // @@protoc_insertion_point(parse_failure:drizzled.message.Event)
235  return false;
236 #undef DO_
237 }
238 
239 void Event::SerializeWithCachedSizes(
240  ::google::protobuf::io::CodedOutputStream* output) const {
241  // @@protoc_insertion_point(serialize_start:drizzled.message.Event)
242  // required .drizzled.message.Event.Type type = 1;
243  if (has_type()) {
244  ::google::protobuf::internal::WireFormatLite::WriteEnum(
245  1, this->type(), output);
246  }
247 
248  if (!unknown_fields().empty()) {
249  ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
250  unknown_fields(), output);
251  }
252  // @@protoc_insertion_point(serialize_end:drizzled.message.Event)
253 }
254 
255 ::google::protobuf::uint8* Event::SerializeWithCachedSizesToArray(
256  ::google::protobuf::uint8* target) const {
257  // @@protoc_insertion_point(serialize_to_array_start:drizzled.message.Event)
258  // required .drizzled.message.Event.Type type = 1;
259  if (has_type()) {
260  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
261  1, this->type(), target);
262  }
263 
264  if (!unknown_fields().empty()) {
265  target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
266  unknown_fields(), target);
267  }
268  // @@protoc_insertion_point(serialize_to_array_end:drizzled.message.Event)
269  return target;
270 }
271 
272 int Event::ByteSize() const {
273  int total_size = 0;
274 
275  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
276  // required .drizzled.message.Event.Type type = 1;
277  if (has_type()) {
278  total_size += 1 +
279  ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
280  }
281 
282  }
283  if (!unknown_fields().empty()) {
284  total_size +=
285  ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
286  unknown_fields());
287  }
288  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
289  _cached_size_ = total_size;
290  GOOGLE_SAFE_CONCURRENT_WRITES_END();
291  return total_size;
292 }
293 
294 void Event::MergeFrom(const ::google::protobuf::Message& from) {
295  GOOGLE_CHECK_NE(&from, this);
296  const Event* source =
297  ::google::protobuf::internal::dynamic_cast_if_available<const Event*>(
298  &from);
299  if (source == NULL) {
300  ::google::protobuf::internal::ReflectionOps::Merge(from, this);
301  } else {
302  MergeFrom(*source);
303  }
304 }
305 
306 void Event::MergeFrom(const Event& from) {
307  GOOGLE_CHECK_NE(&from, this);
308  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
309  if (from.has_type()) {
310  set_type(from.type());
311  }
312  }
313  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
314 }
315 
316 void Event::CopyFrom(const ::google::protobuf::Message& from) {
317  if (&from == this) return;
318  Clear();
319  MergeFrom(from);
320 }
321 
322 void Event::CopyFrom(const Event& from) {
323  if (&from == this) return;
324  Clear();
325  MergeFrom(from);
326 }
327 
328 bool Event::IsInitialized() const {
329  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
330 
331  return true;
332 }
333 
334 void Event::Swap(Event* other) {
335  if (other != this) {
336  std::swap(type_, other->type_);
337  std::swap(_has_bits_[0], other->_has_bits_[0]);
338  _unknown_fields_.Swap(&other->_unknown_fields_);
339  std::swap(_cached_size_, other->_cached_size_);
340  }
341 }
342 
343 ::google::protobuf::Metadata Event::GetMetadata() const {
344  protobuf_AssignDescriptorsOnce();
345  ::google::protobuf::Metadata metadata;
346  metadata.descriptor = Event_descriptor_;
347  metadata.reflection = Event_reflection_;
348  return metadata;
349 }
350 
351 
352 // @@protoc_insertion_point(namespace_scope)
353 
354 } // namespace message
355 } // namespace drizzled
356 
357 // @@protoc_insertion_point(global_scope)
TODO: Rename this file - func.h is stupid.