Drizzled Public API Documentation

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