chatbuf.pb.h
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: chatbuf.proto
3 
4 #ifndef PROTOBUF_chatbuf_2eproto__INCLUDED
5 #define PROTOBUF_chatbuf_2eproto__INCLUDED
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 // For backwards compatibility with systems that install an older Protobuf (e.g. Ubuntu)),
11 // include the older output from protoc so that the sample program compiles.
12 #if GOOGLE_PROTOBUF_VERSION < 2005000
13 
14 #if GOOGLE_PROTOBUF_VERSION < 2004000
15 #error This file was generated by a newer version of protoc which is
16 #error incompatible with your Protocol Buffer headers. Please update
17 #error your headers.
18 #endif
19 #if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
20 #error This file was generated by an older version of protoc which is
21 #error incompatible with your Protocol Buffer headers. Please
22 #error regenerate this file with a newer version of protoc.
23 #endif
24 
25 #include <google/protobuf/generated_message_util.h>
26 #include <google/protobuf/repeated_field.h>
27 #include <google/protobuf/extension_set.h>
28 #include <google/protobuf/generated_message_reflection.h>
29 // @@protoc_insertion_point(includes)
30 
31 namespace SyncDemo {
32 
33 // Internal implementation detail -- do not call these.
34 void protobuf_AddDesc_chatbuf_2eproto();
35 void protobuf_AssignDesc_chatbuf_2eproto();
36 void protobuf_ShutdownFile_chatbuf_2eproto();
37 
38 class ChatMessage;
39 
40 enum ChatMessage_ChatMessageType {
41  ChatMessage_ChatMessageType_CHAT = 0,
42  ChatMessage_ChatMessageType_HELLO = 1,
43  ChatMessage_ChatMessageType_LEAVE = 2,
44  ChatMessage_ChatMessageType_JOIN = 3,
45  ChatMessage_ChatMessageType_OTHER = 4
46 };
47 bool ChatMessage_ChatMessageType_IsValid(int value);
48 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MIN = ChatMessage_ChatMessageType_CHAT;
49 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MAX = ChatMessage_ChatMessageType_OTHER;
50 const int ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE = ChatMessage_ChatMessageType_ChatMessageType_MAX + 1;
51 
52 const ::google::protobuf::EnumDescriptor* ChatMessage_ChatMessageType_descriptor();
53 inline const ::std::string& ChatMessage_ChatMessageType_Name(ChatMessage_ChatMessageType value) {
54  return ::google::protobuf::internal::NameOfEnum(
55  ChatMessage_ChatMessageType_descriptor(), value);
56 }
57 inline bool ChatMessage_ChatMessageType_Parse(
58  const ::std::string& name, ChatMessage_ChatMessageType* value) {
59  return ::google::protobuf::internal::ParseNamedEnum<ChatMessage_ChatMessageType>(
60  ChatMessage_ChatMessageType_descriptor(), name, value);
61 }
62 // ===================================================================
63 
64 class ChatMessage : public ::google::protobuf::Message {
65  public:
66  ChatMessage();
67  virtual ~ChatMessage();
68 
69  ChatMessage(const ChatMessage& from);
70 
71  inline ChatMessage& operator=(const ChatMessage& from) {
72  CopyFrom(from);
73  return *this;
74  }
75 
76  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
77  return _unknown_fields_;
78  }
79 
80  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
81  return &_unknown_fields_;
82  }
83 
84  static const ::google::protobuf::Descriptor* descriptor();
85  static const ChatMessage& default_instance();
86 
87  void Swap(ChatMessage* other);
88 
89  // implements Message ----------------------------------------------
90 
91  ChatMessage* New() const;
92  void CopyFrom(const ::google::protobuf::Message& from);
93  void MergeFrom(const ::google::protobuf::Message& from);
94  void CopyFrom(const ChatMessage& from);
95  void MergeFrom(const ChatMessage& from);
96  void Clear();
97  bool IsInitialized() const;
98 
99  int ByteSize() const;
100  bool MergePartialFromCodedStream(
101  ::google::protobuf::io::CodedInputStream* input);
102  void SerializeWithCachedSizes(
103  ::google::protobuf::io::CodedOutputStream* output) const;
104  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
105  int GetCachedSize() const { return _cached_size_; }
106  private:
107  void SharedCtor();
108  void SharedDtor();
109  void SetCachedSize(int size) const;
110  public:
111 
112  ::google::protobuf::Metadata GetMetadata() const;
113 
114  // nested types ----------------------------------------------------
115 
116  typedef ChatMessage_ChatMessageType ChatMessageType;
117  static const ChatMessageType CHAT = ChatMessage_ChatMessageType_CHAT;
118  static const ChatMessageType HELLO = ChatMessage_ChatMessageType_HELLO;
119  static const ChatMessageType LEAVE = ChatMessage_ChatMessageType_LEAVE;
120  static const ChatMessageType JOIN = ChatMessage_ChatMessageType_JOIN;
121  static const ChatMessageType OTHER = ChatMessage_ChatMessageType_OTHER;
122  static inline bool ChatMessageType_IsValid(int value) {
123  return ChatMessage_ChatMessageType_IsValid(value);
124  }
125  static const ChatMessageType ChatMessageType_MIN =
126  ChatMessage_ChatMessageType_ChatMessageType_MIN;
127  static const ChatMessageType ChatMessageType_MAX =
128  ChatMessage_ChatMessageType_ChatMessageType_MAX;
129  static const int ChatMessageType_ARRAYSIZE =
130  ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE;
131  static inline const ::google::protobuf::EnumDescriptor*
132  ChatMessageType_descriptor() {
133  return ChatMessage_ChatMessageType_descriptor();
134  }
135  static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
136  return ChatMessage_ChatMessageType_Name(value);
137  }
138  static inline bool ChatMessageType_Parse(const ::std::string& name,
139  ChatMessageType* value) {
140  return ChatMessage_ChatMessageType_Parse(name, value);
141  }
142 
143  // accessors -------------------------------------------------------
144 
145  // required string to = 1;
146  inline bool has_to() const;
147  inline void clear_to();
148  static const int kToFieldNumber = 1;
149  inline const ::std::string& to() const;
150  inline void set_to(const ::std::string& value);
151  inline void set_to(const char* value);
152  inline void set_to(const char* value, size_t size);
153  inline ::std::string* mutable_to();
154  inline ::std::string* release_to();
155 
156  // required string from = 2;
157  inline bool has_from() const;
158  inline void clear_from();
159  static const int kFromFieldNumber = 2;
160  inline const ::std::string& from() const;
161  inline void set_from(const ::std::string& value);
162  inline void set_from(const char* value);
163  inline void set_from(const char* value, size_t size);
164  inline ::std::string* mutable_from();
165  inline ::std::string* release_from();
166 
167  // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
168  inline bool has_type() const;
169  inline void clear_type();
170  static const int kTypeFieldNumber = 3;
171  inline ::SyncDemo::ChatMessage_ChatMessageType type() const;
172  inline void set_type(::SyncDemo::ChatMessage_ChatMessageType value);
173 
174  // optional string data = 4;
175  inline bool has_data() const;
176  inline void clear_data();
177  static const int kDataFieldNumber = 4;
178  inline const ::std::string& data() const;
179  inline void set_data(const ::std::string& value);
180  inline void set_data(const char* value);
181  inline void set_data(const char* value, size_t size);
182  inline ::std::string* mutable_data();
183  inline ::std::string* release_data();
184 
185  // required int32 timestamp = 5;
186  inline bool has_timestamp() const;
187  inline void clear_timestamp();
188  static const int kTimestampFieldNumber = 5;
189  inline ::google::protobuf::int32 timestamp() const;
190  inline void set_timestamp(::google::protobuf::int32 value);
191 
192  // @@protoc_insertion_point(class_scope:SyncDemo.ChatMessage)
193  private:
194  inline void set_has_to();
195  inline void clear_has_to();
196  inline void set_has_from();
197  inline void clear_has_from();
198  inline void set_has_type();
199  inline void clear_has_type();
200  inline void set_has_data();
201  inline void clear_has_data();
202  inline void set_has_timestamp();
203  inline void clear_has_timestamp();
204 
205  ::google::protobuf::UnknownFieldSet _unknown_fields_;
206 
207  ::std::string* to_;
208  ::std::string* from_;
209  ::std::string* data_;
210  int type_;
211  ::google::protobuf::int32 timestamp_;
212 
213  mutable int _cached_size_;
214  ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
215 
216  friend void protobuf_AddDesc_chatbuf_2eproto();
217  friend void protobuf_AssignDesc_chatbuf_2eproto();
218  friend void protobuf_ShutdownFile_chatbuf_2eproto();
219 
220  void InitAsDefaultInstance();
221  static ChatMessage* default_instance_;
222 };
223 // ===================================================================
224 
225 
226 // ===================================================================
227 
228 // ChatMessage
229 
230 // required string to = 1;
231 inline bool ChatMessage::has_to() const {
232  return (_has_bits_[0] & 0x00000001u) != 0;
233 }
234 inline void ChatMessage::set_has_to() {
235  _has_bits_[0] |= 0x00000001u;
236 }
237 inline void ChatMessage::clear_has_to() {
238  _has_bits_[0] &= ~0x00000001u;
239 }
240 inline void ChatMessage::clear_to() {
241  if (to_ != &::google::protobuf::internal::kEmptyString) {
242  to_->clear();
243  }
244  clear_has_to();
245 }
246 inline const ::std::string& ChatMessage::to() const {
247  return *to_;
248 }
249 inline void ChatMessage::set_to(const ::std::string& value) {
250  set_has_to();
251  if (to_ == &::google::protobuf::internal::kEmptyString) {
252  to_ = new ::std::string;
253  }
254  to_->assign(value);
255 }
256 inline void ChatMessage::set_to(const char* value) {
257  set_has_to();
258  if (to_ == &::google::protobuf::internal::kEmptyString) {
259  to_ = new ::std::string;
260  }
261  to_->assign(value);
262 }
263 inline void ChatMessage::set_to(const char* value, size_t size) {
264  set_has_to();
265  if (to_ == &::google::protobuf::internal::kEmptyString) {
266  to_ = new ::std::string;
267  }
268  to_->assign(reinterpret_cast<const char*>(value), size);
269 }
270 inline ::std::string* ChatMessage::mutable_to() {
271  set_has_to();
272  if (to_ == &::google::protobuf::internal::kEmptyString) {
273  to_ = new ::std::string;
274  }
275  return to_;
276 }
277 inline ::std::string* ChatMessage::release_to() {
278  clear_has_to();
279  if (to_ == &::google::protobuf::internal::kEmptyString) {
280  return NULL;
281  } else {
282  ::std::string* temp = to_;
283  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
284  return temp;
285  }
286 }
287 
288 // required string from = 2;
289 inline bool ChatMessage::has_from() const {
290  return (_has_bits_[0] & 0x00000002u) != 0;
291 }
292 inline void ChatMessage::set_has_from() {
293  _has_bits_[0] |= 0x00000002u;
294 }
295 inline void ChatMessage::clear_has_from() {
296  _has_bits_[0] &= ~0x00000002u;
297 }
298 inline void ChatMessage::clear_from() {
299  if (from_ != &::google::protobuf::internal::kEmptyString) {
300  from_->clear();
301  }
302  clear_has_from();
303 }
304 inline const ::std::string& ChatMessage::from() const {
305  return *from_;
306 }
307 inline void ChatMessage::set_from(const ::std::string& value) {
308  set_has_from();
309  if (from_ == &::google::protobuf::internal::kEmptyString) {
310  from_ = new ::std::string;
311  }
312  from_->assign(value);
313 }
314 inline void ChatMessage::set_from(const char* value) {
315  set_has_from();
316  if (from_ == &::google::protobuf::internal::kEmptyString) {
317  from_ = new ::std::string;
318  }
319  from_->assign(value);
320 }
321 inline void ChatMessage::set_from(const char* value, size_t size) {
322  set_has_from();
323  if (from_ == &::google::protobuf::internal::kEmptyString) {
324  from_ = new ::std::string;
325  }
326  from_->assign(reinterpret_cast<const char*>(value), size);
327 }
328 inline ::std::string* ChatMessage::mutable_from() {
329  set_has_from();
330  if (from_ == &::google::protobuf::internal::kEmptyString) {
331  from_ = new ::std::string;
332  }
333  return from_;
334 }
335 inline ::std::string* ChatMessage::release_from() {
336  clear_has_from();
337  if (from_ == &::google::protobuf::internal::kEmptyString) {
338  return NULL;
339  } else {
340  ::std::string* temp = from_;
341  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
342  return temp;
343  }
344 }
345 
346 // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
347 inline bool ChatMessage::has_type() const {
348  return (_has_bits_[0] & 0x00000004u) != 0;
349 }
350 inline void ChatMessage::set_has_type() {
351  _has_bits_[0] |= 0x00000004u;
352 }
353 inline void ChatMessage::clear_has_type() {
354  _has_bits_[0] &= ~0x00000004u;
355 }
356 inline void ChatMessage::clear_type() {
357  type_ = 0;
358  clear_has_type();
359 }
360 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type() const {
361  return static_cast< ::SyncDemo::ChatMessage_ChatMessageType >(type_);
362 }
363 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
364  GOOGLE_DCHECK(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
365  set_has_type();
366  type_ = value;
367 }
368 
369 // optional string data = 4;
370 inline bool ChatMessage::has_data() const {
371  return (_has_bits_[0] & 0x00000008u) != 0;
372 }
373 inline void ChatMessage::set_has_data() {
374  _has_bits_[0] |= 0x00000008u;
375 }
376 inline void ChatMessage::clear_has_data() {
377  _has_bits_[0] &= ~0x00000008u;
378 }
379 inline void ChatMessage::clear_data() {
380  if (data_ != &::google::protobuf::internal::kEmptyString) {
381  data_->clear();
382  }
383  clear_has_data();
384 }
385 inline const ::std::string& ChatMessage::data() const {
386  return *data_;
387 }
388 inline void ChatMessage::set_data(const ::std::string& value) {
389  set_has_data();
390  if (data_ == &::google::protobuf::internal::kEmptyString) {
391  data_ = new ::std::string;
392  }
393  data_->assign(value);
394 }
395 inline void ChatMessage::set_data(const char* value) {
396  set_has_data();
397  if (data_ == &::google::protobuf::internal::kEmptyString) {
398  data_ = new ::std::string;
399  }
400  data_->assign(value);
401 }
402 inline void ChatMessage::set_data(const char* value, size_t size) {
403  set_has_data();
404  if (data_ == &::google::protobuf::internal::kEmptyString) {
405  data_ = new ::std::string;
406  }
407  data_->assign(reinterpret_cast<const char*>(value), size);
408 }
409 inline ::std::string* ChatMessage::mutable_data() {
410  set_has_data();
411  if (data_ == &::google::protobuf::internal::kEmptyString) {
412  data_ = new ::std::string;
413  }
414  return data_;
415 }
416 inline ::std::string* ChatMessage::release_data() {
417  clear_has_data();
418  if (data_ == &::google::protobuf::internal::kEmptyString) {
419  return NULL;
420  } else {
421  ::std::string* temp = data_;
422  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
423  return temp;
424  }
425 }
426 
427 // required int32 timestamp = 5;
428 inline bool ChatMessage::has_timestamp() const {
429  return (_has_bits_[0] & 0x00000010u) != 0;
430 }
431 inline void ChatMessage::set_has_timestamp() {
432  _has_bits_[0] |= 0x00000010u;
433 }
434 inline void ChatMessage::clear_has_timestamp() {
435  _has_bits_[0] &= ~0x00000010u;
436 }
437 inline void ChatMessage::clear_timestamp() {
438  timestamp_ = 0;
439  clear_has_timestamp();
440 }
441 inline ::google::protobuf::int32 ChatMessage::timestamp() const {
442  return timestamp_;
443 }
444 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
445  set_has_timestamp();
446  timestamp_ = value;
447 }
448 
449 
450 // @@protoc_insertion_point(namespace_scope)
451 
452 } // namespace SyncDemo
453 
454 #ifndef SWIG
455 namespace google {
456 namespace protobuf {
457 
458 template <>
459 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
460  return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
461 }
462 
463 } // namespace google
464 } // namespace protobuf
465 #endif // SWIG
466 
467 // @@protoc_insertion_point(global_scope)
468 
469 #elif GOOGLE_PROTOBUF_VERSION < 2006000
470 
471 #if GOOGLE_PROTOBUF_VERSION < 2005000
472 #error This file was generated by a newer version of protoc which is
473 #error incompatible with your Protocol Buffer headers. Please update
474 #error your headers.
475 #endif
476 #if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
477 #error This file was generated by an older version of protoc which is
478 #error incompatible with your Protocol Buffer headers. Please
479 #error regenerate this file with a newer version of protoc.
480 #endif
481 
482 #include <google/protobuf/generated_message_util.h>
483 #include <google/protobuf/message.h>
484 #include <google/protobuf/repeated_field.h>
485 #include <google/protobuf/extension_set.h>
486 #include <google/protobuf/generated_enum_reflection.h>
487 #include <google/protobuf/unknown_field_set.h>
488 // @@protoc_insertion_point(includes)
489 
490 namespace SyncDemo {
491 
492 // Internal implementation detail -- do not call these.
493 void protobuf_AddDesc_chatbuf_2eproto();
494 void protobuf_AssignDesc_chatbuf_2eproto();
495 void protobuf_ShutdownFile_chatbuf_2eproto();
496 
497 class ChatMessage;
498 
499 enum ChatMessage_ChatMessageType {
500  ChatMessage_ChatMessageType_CHAT = 0,
501  ChatMessage_ChatMessageType_HELLO = 1,
502  ChatMessage_ChatMessageType_LEAVE = 2,
503  ChatMessage_ChatMessageType_JOIN = 3,
504  ChatMessage_ChatMessageType_OTHER = 4
505 };
506 bool ChatMessage_ChatMessageType_IsValid(int value);
507 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MIN = ChatMessage_ChatMessageType_CHAT;
508 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MAX = ChatMessage_ChatMessageType_OTHER;
509 const int ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE = ChatMessage_ChatMessageType_ChatMessageType_MAX + 1;
510 
511 const ::google::protobuf::EnumDescriptor* ChatMessage_ChatMessageType_descriptor();
512 inline const ::std::string& ChatMessage_ChatMessageType_Name(ChatMessage_ChatMessageType value) {
513  return ::google::protobuf::internal::NameOfEnum(
514  ChatMessage_ChatMessageType_descriptor(), value);
515 }
516 inline bool ChatMessage_ChatMessageType_Parse(
517  const ::std::string& name, ChatMessage_ChatMessageType* value) {
518  return ::google::protobuf::internal::ParseNamedEnum<ChatMessage_ChatMessageType>(
519  ChatMessage_ChatMessageType_descriptor(), name, value);
520 }
521 // ===================================================================
522 
523 class ChatMessage : public ::google::protobuf::Message {
524  public:
525  ChatMessage();
526  virtual ~ChatMessage();
527 
528  ChatMessage(const ChatMessage& from);
529 
530  inline ChatMessage& operator=(const ChatMessage& from) {
531  CopyFrom(from);
532  return *this;
533  }
534 
535  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
536  return _unknown_fields_;
537  }
538 
539  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
540  return &_unknown_fields_;
541  }
542 
543  static const ::google::protobuf::Descriptor* descriptor();
544  static const ChatMessage& default_instance();
545 
546  void Swap(ChatMessage* other);
547 
548  // implements Message ----------------------------------------------
549 
550  ChatMessage* New() const;
551  void CopyFrom(const ::google::protobuf::Message& from);
552  void MergeFrom(const ::google::protobuf::Message& from);
553  void CopyFrom(const ChatMessage& from);
554  void MergeFrom(const ChatMessage& from);
555  void Clear();
556  bool IsInitialized() const;
557 
558  int ByteSize() const;
559  bool MergePartialFromCodedStream(
560  ::google::protobuf::io::CodedInputStream* input);
561  void SerializeWithCachedSizes(
562  ::google::protobuf::io::CodedOutputStream* output) const;
563  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
564  int GetCachedSize() const { return _cached_size_; }
565  private:
566  void SharedCtor();
567  void SharedDtor();
568  void SetCachedSize(int size) const;
569  public:
570 
571  ::google::protobuf::Metadata GetMetadata() const;
572 
573  // nested types ----------------------------------------------------
574 
575  typedef ChatMessage_ChatMessageType ChatMessageType;
576  static const ChatMessageType CHAT = ChatMessage_ChatMessageType_CHAT;
577  static const ChatMessageType HELLO = ChatMessage_ChatMessageType_HELLO;
578  static const ChatMessageType LEAVE = ChatMessage_ChatMessageType_LEAVE;
579  static const ChatMessageType JOIN = ChatMessage_ChatMessageType_JOIN;
580  static const ChatMessageType OTHER = ChatMessage_ChatMessageType_OTHER;
581  static inline bool ChatMessageType_IsValid(int value) {
582  return ChatMessage_ChatMessageType_IsValid(value);
583  }
584  static const ChatMessageType ChatMessageType_MIN =
585  ChatMessage_ChatMessageType_ChatMessageType_MIN;
586  static const ChatMessageType ChatMessageType_MAX =
587  ChatMessage_ChatMessageType_ChatMessageType_MAX;
588  static const int ChatMessageType_ARRAYSIZE =
589  ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE;
590  static inline const ::google::protobuf::EnumDescriptor*
591  ChatMessageType_descriptor() {
592  return ChatMessage_ChatMessageType_descriptor();
593  }
594  static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
595  return ChatMessage_ChatMessageType_Name(value);
596  }
597  static inline bool ChatMessageType_Parse(const ::std::string& name,
598  ChatMessageType* value) {
599  return ChatMessage_ChatMessageType_Parse(name, value);
600  }
601 
602  // accessors -------------------------------------------------------
603 
604  // required string to = 1;
605  inline bool has_to() const;
606  inline void clear_to();
607  static const int kToFieldNumber = 1;
608  inline const ::std::string& to() const;
609  inline void set_to(const ::std::string& value);
610  inline void set_to(const char* value);
611  inline void set_to(const char* value, size_t size);
612  inline ::std::string* mutable_to();
613  inline ::std::string* release_to();
614  inline void set_allocated_to(::std::string* to);
615 
616  // required string from = 2;
617  inline bool has_from() const;
618  inline void clear_from();
619  static const int kFromFieldNumber = 2;
620  inline const ::std::string& from() const;
621  inline void set_from(const ::std::string& value);
622  inline void set_from(const char* value);
623  inline void set_from(const char* value, size_t size);
624  inline ::std::string* mutable_from();
625  inline ::std::string* release_from();
626  inline void set_allocated_from(::std::string* from);
627 
628  // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
629  inline bool has_type() const;
630  inline void clear_type();
631  static const int kTypeFieldNumber = 3;
632  inline ::SyncDemo::ChatMessage_ChatMessageType type() const;
633  inline void set_type(::SyncDemo::ChatMessage_ChatMessageType value);
634 
635  // optional string data = 4;
636  inline bool has_data() const;
637  inline void clear_data();
638  static const int kDataFieldNumber = 4;
639  inline const ::std::string& data() const;
640  inline void set_data(const ::std::string& value);
641  inline void set_data(const char* value);
642  inline void set_data(const char* value, size_t size);
643  inline ::std::string* mutable_data();
644  inline ::std::string* release_data();
645  inline void set_allocated_data(::std::string* data);
646 
647  // required int32 timestamp = 5;
648  inline bool has_timestamp() const;
649  inline void clear_timestamp();
650  static const int kTimestampFieldNumber = 5;
651  inline ::google::protobuf::int32 timestamp() const;
652  inline void set_timestamp(::google::protobuf::int32 value);
653 
654  // @@protoc_insertion_point(class_scope:SyncDemo.ChatMessage)
655  private:
656  inline void set_has_to();
657  inline void clear_has_to();
658  inline void set_has_from();
659  inline void clear_has_from();
660  inline void set_has_type();
661  inline void clear_has_type();
662  inline void set_has_data();
663  inline void clear_has_data();
664  inline void set_has_timestamp();
665  inline void clear_has_timestamp();
666 
667  ::google::protobuf::UnknownFieldSet _unknown_fields_;
668 
669  ::std::string* to_;
670  ::std::string* from_;
671  ::std::string* data_;
672  int type_;
673  ::google::protobuf::int32 timestamp_;
674 
675  mutable int _cached_size_;
676  ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
677 
678  friend void protobuf_AddDesc_chatbuf_2eproto();
679  friend void protobuf_AssignDesc_chatbuf_2eproto();
680  friend void protobuf_ShutdownFile_chatbuf_2eproto();
681 
682  void InitAsDefaultInstance();
683  static ChatMessage* default_instance_;
684 };
685 // ===================================================================
686 
687 
688 // ===================================================================
689 
690 // ChatMessage
691 
692 // required string to = 1;
693 inline bool ChatMessage::has_to() const {
694  return (_has_bits_[0] & 0x00000001u) != 0;
695 }
696 inline void ChatMessage::set_has_to() {
697  _has_bits_[0] |= 0x00000001u;
698 }
699 inline void ChatMessage::clear_has_to() {
700  _has_bits_[0] &= ~0x00000001u;
701 }
702 inline void ChatMessage::clear_to() {
703  if (to_ != &::google::protobuf::internal::kEmptyString) {
704  to_->clear();
705  }
706  clear_has_to();
707 }
708 inline const ::std::string& ChatMessage::to() const {
709  return *to_;
710 }
711 inline void ChatMessage::set_to(const ::std::string& value) {
712  set_has_to();
713  if (to_ == &::google::protobuf::internal::kEmptyString) {
714  to_ = new ::std::string;
715  }
716  to_->assign(value);
717 }
718 inline void ChatMessage::set_to(const char* value) {
719  set_has_to();
720  if (to_ == &::google::protobuf::internal::kEmptyString) {
721  to_ = new ::std::string;
722  }
723  to_->assign(value);
724 }
725 inline void ChatMessage::set_to(const char* value, size_t size) {
726  set_has_to();
727  if (to_ == &::google::protobuf::internal::kEmptyString) {
728  to_ = new ::std::string;
729  }
730  to_->assign(reinterpret_cast<const char*>(value), size);
731 }
732 inline ::std::string* ChatMessage::mutable_to() {
733  set_has_to();
734  if (to_ == &::google::protobuf::internal::kEmptyString) {
735  to_ = new ::std::string;
736  }
737  return to_;
738 }
739 inline ::std::string* ChatMessage::release_to() {
740  clear_has_to();
741  if (to_ == &::google::protobuf::internal::kEmptyString) {
742  return NULL;
743  } else {
744  ::std::string* temp = to_;
745  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
746  return temp;
747  }
748 }
749 inline void ChatMessage::set_allocated_to(::std::string* to) {
750  if (to_ != &::google::protobuf::internal::kEmptyString) {
751  delete to_;
752  }
753  if (to) {
754  set_has_to();
755  to_ = to;
756  } else {
757  clear_has_to();
758  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
759  }
760 }
761 
762 // required string from = 2;
763 inline bool ChatMessage::has_from() const {
764  return (_has_bits_[0] & 0x00000002u) != 0;
765 }
766 inline void ChatMessage::set_has_from() {
767  _has_bits_[0] |= 0x00000002u;
768 }
769 inline void ChatMessage::clear_has_from() {
770  _has_bits_[0] &= ~0x00000002u;
771 }
772 inline void ChatMessage::clear_from() {
773  if (from_ != &::google::protobuf::internal::kEmptyString) {
774  from_->clear();
775  }
776  clear_has_from();
777 }
778 inline const ::std::string& ChatMessage::from() const {
779  return *from_;
780 }
781 inline void ChatMessage::set_from(const ::std::string& value) {
782  set_has_from();
783  if (from_ == &::google::protobuf::internal::kEmptyString) {
784  from_ = new ::std::string;
785  }
786  from_->assign(value);
787 }
788 inline void ChatMessage::set_from(const char* value) {
789  set_has_from();
790  if (from_ == &::google::protobuf::internal::kEmptyString) {
791  from_ = new ::std::string;
792  }
793  from_->assign(value);
794 }
795 inline void ChatMessage::set_from(const char* value, size_t size) {
796  set_has_from();
797  if (from_ == &::google::protobuf::internal::kEmptyString) {
798  from_ = new ::std::string;
799  }
800  from_->assign(reinterpret_cast<const char*>(value), size);
801 }
802 inline ::std::string* ChatMessage::mutable_from() {
803  set_has_from();
804  if (from_ == &::google::protobuf::internal::kEmptyString) {
805  from_ = new ::std::string;
806  }
807  return from_;
808 }
809 inline ::std::string* ChatMessage::release_from() {
810  clear_has_from();
811  if (from_ == &::google::protobuf::internal::kEmptyString) {
812  return NULL;
813  } else {
814  ::std::string* temp = from_;
815  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
816  return temp;
817  }
818 }
819 inline void ChatMessage::set_allocated_from(::std::string* from) {
820  if (from_ != &::google::protobuf::internal::kEmptyString) {
821  delete from_;
822  }
823  if (from) {
824  set_has_from();
825  from_ = from;
826  } else {
827  clear_has_from();
828  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
829  }
830 }
831 
832 // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
833 inline bool ChatMessage::has_type() const {
834  return (_has_bits_[0] & 0x00000004u) != 0;
835 }
836 inline void ChatMessage::set_has_type() {
837  _has_bits_[0] |= 0x00000004u;
838 }
839 inline void ChatMessage::clear_has_type() {
840  _has_bits_[0] &= ~0x00000004u;
841 }
842 inline void ChatMessage::clear_type() {
843  type_ = 0;
844  clear_has_type();
845 }
846 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type() const {
847  return static_cast< ::SyncDemo::ChatMessage_ChatMessageType >(type_);
848 }
849 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
850  assert(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
851  set_has_type();
852  type_ = value;
853 }
854 
855 // optional string data = 4;
856 inline bool ChatMessage::has_data() const {
857  return (_has_bits_[0] & 0x00000008u) != 0;
858 }
859 inline void ChatMessage::set_has_data() {
860  _has_bits_[0] |= 0x00000008u;
861 }
862 inline void ChatMessage::clear_has_data() {
863  _has_bits_[0] &= ~0x00000008u;
864 }
865 inline void ChatMessage::clear_data() {
866  if (data_ != &::google::protobuf::internal::kEmptyString) {
867  data_->clear();
868  }
869  clear_has_data();
870 }
871 inline const ::std::string& ChatMessage::data() const {
872  return *data_;
873 }
874 inline void ChatMessage::set_data(const ::std::string& value) {
875  set_has_data();
876  if (data_ == &::google::protobuf::internal::kEmptyString) {
877  data_ = new ::std::string;
878  }
879  data_->assign(value);
880 }
881 inline void ChatMessage::set_data(const char* value) {
882  set_has_data();
883  if (data_ == &::google::protobuf::internal::kEmptyString) {
884  data_ = new ::std::string;
885  }
886  data_->assign(value);
887 }
888 inline void ChatMessage::set_data(const char* value, size_t size) {
889  set_has_data();
890  if (data_ == &::google::protobuf::internal::kEmptyString) {
891  data_ = new ::std::string;
892  }
893  data_->assign(reinterpret_cast<const char*>(value), size);
894 }
895 inline ::std::string* ChatMessage::mutable_data() {
896  set_has_data();
897  if (data_ == &::google::protobuf::internal::kEmptyString) {
898  data_ = new ::std::string;
899  }
900  return data_;
901 }
902 inline ::std::string* ChatMessage::release_data() {
903  clear_has_data();
904  if (data_ == &::google::protobuf::internal::kEmptyString) {
905  return NULL;
906  } else {
907  ::std::string* temp = data_;
908  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
909  return temp;
910  }
911 }
912 inline void ChatMessage::set_allocated_data(::std::string* data) {
913  if (data_ != &::google::protobuf::internal::kEmptyString) {
914  delete data_;
915  }
916  if (data) {
917  set_has_data();
918  data_ = data;
919  } else {
920  clear_has_data();
921  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
922  }
923 }
924 
925 // required int32 timestamp = 5;
926 inline bool ChatMessage::has_timestamp() const {
927  return (_has_bits_[0] & 0x00000010u) != 0;
928 }
929 inline void ChatMessage::set_has_timestamp() {
930  _has_bits_[0] |= 0x00000010u;
931 }
932 inline void ChatMessage::clear_has_timestamp() {
933  _has_bits_[0] &= ~0x00000010u;
934 }
935 inline void ChatMessage::clear_timestamp() {
936  timestamp_ = 0;
937  clear_has_timestamp();
938 }
939 inline ::google::protobuf::int32 ChatMessage::timestamp() const {
940  return timestamp_;
941 }
942 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
943  set_has_timestamp();
944  timestamp_ = value;
945 }
946 
947 
948 // @@protoc_insertion_point(namespace_scope)
949 
950 } // namespace SyncDemo
951 
952 #ifndef SWIG
953 namespace google {
954 namespace protobuf {
955 
956 template <>
957 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
958  return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
959 }
960 
961 } // namespace google
962 } // namespace protobuf
963 #endif // SWIG
964 
965 // @@protoc_insertion_point(global_scope)
966 
967 #else // GOOGLE_PROTOBUF_VERSION < 2006000
968 
969 #if GOOGLE_PROTOBUF_VERSION < 2006000
970 #error This file was generated by a newer version of protoc which is
971 #error incompatible with your Protocol Buffer headers. Please update
972 #error your headers.
973 #endif
974 #if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
975 #error This file was generated by an older version of protoc which is
976 #error incompatible with your Protocol Buffer headers. Please
977 #error regenerate this file with a newer version of protoc.
978 #endif
979 
980 #include <google/protobuf/generated_message_util.h>
981 #include <google/protobuf/message.h>
982 #include <google/protobuf/repeated_field.h>
983 #include <google/protobuf/extension_set.h>
984 #include <google/protobuf/generated_enum_reflection.h>
985 #include <google/protobuf/unknown_field_set.h>
986 // @@protoc_insertion_point(includes)
987 
988 namespace SyncDemo {
989 
990 // Internal implementation detail -- do not call these.
991 void protobuf_AddDesc_chatbuf_2eproto();
992 void protobuf_AssignDesc_chatbuf_2eproto();
993 void protobuf_ShutdownFile_chatbuf_2eproto();
994 
995 class ChatMessage;
996 
997 enum ChatMessage_ChatMessageType {
998  ChatMessage_ChatMessageType_CHAT = 0,
999  ChatMessage_ChatMessageType_HELLO = 1,
1000  ChatMessage_ChatMessageType_LEAVE = 2,
1001  ChatMessage_ChatMessageType_JOIN = 3,
1002  ChatMessage_ChatMessageType_OTHER = 4
1003 };
1004 bool ChatMessage_ChatMessageType_IsValid(int value);
1005 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MIN = ChatMessage_ChatMessageType_CHAT;
1006 const ChatMessage_ChatMessageType ChatMessage_ChatMessageType_ChatMessageType_MAX = ChatMessage_ChatMessageType_OTHER;
1007 const int ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE = ChatMessage_ChatMessageType_ChatMessageType_MAX + 1;
1008 
1009 const ::google::protobuf::EnumDescriptor* ChatMessage_ChatMessageType_descriptor();
1010 inline const ::std::string& ChatMessage_ChatMessageType_Name(ChatMessage_ChatMessageType value) {
1011  return ::google::protobuf::internal::NameOfEnum(
1012  ChatMessage_ChatMessageType_descriptor(), value);
1013 }
1014 inline bool ChatMessage_ChatMessageType_Parse(
1015  const ::std::string& name, ChatMessage_ChatMessageType* value) {
1016  return ::google::protobuf::internal::ParseNamedEnum<ChatMessage_ChatMessageType>(
1017  ChatMessage_ChatMessageType_descriptor(), name, value);
1018 }
1019 // ===================================================================
1020 
1021 class ChatMessage : public ::google::protobuf::Message {
1022  public:
1023  ChatMessage();
1024  virtual ~ChatMessage();
1025 
1026  ChatMessage(const ChatMessage& from);
1027 
1028  inline ChatMessage& operator=(const ChatMessage& from) {
1029  CopyFrom(from);
1030  return *this;
1031  }
1032 
1033  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
1034  return _unknown_fields_;
1035  }
1036 
1037  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
1038  return &_unknown_fields_;
1039  }
1040 
1041  static const ::google::protobuf::Descriptor* descriptor();
1042  static const ChatMessage& default_instance();
1043 
1044  void Swap(ChatMessage* other);
1045 
1046  // implements Message ----------------------------------------------
1047 
1048  ChatMessage* New() const;
1049  void CopyFrom(const ::google::protobuf::Message& from);
1050  void MergeFrom(const ::google::protobuf::Message& from);
1051  void CopyFrom(const ChatMessage& from);
1052  void MergeFrom(const ChatMessage& from);
1053  void Clear();
1054  bool IsInitialized() const;
1055 
1056  int ByteSize() const;
1057  bool MergePartialFromCodedStream(
1058  ::google::protobuf::io::CodedInputStream* input);
1059  void SerializeWithCachedSizes(
1060  ::google::protobuf::io::CodedOutputStream* output) const;
1061  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
1062  int GetCachedSize() const { return _cached_size_; }
1063  private:
1064  void SharedCtor();
1065  void SharedDtor();
1066  void SetCachedSize(int size) const;
1067  public:
1068  ::google::protobuf::Metadata GetMetadata() const;
1069 
1070  // nested types ----------------------------------------------------
1071 
1072  typedef ChatMessage_ChatMessageType ChatMessageType;
1073  static const ChatMessageType CHAT = ChatMessage_ChatMessageType_CHAT;
1074  static const ChatMessageType HELLO = ChatMessage_ChatMessageType_HELLO;
1075  static const ChatMessageType LEAVE = ChatMessage_ChatMessageType_LEAVE;
1076  static const ChatMessageType JOIN = ChatMessage_ChatMessageType_JOIN;
1077  static const ChatMessageType OTHER = ChatMessage_ChatMessageType_OTHER;
1078  static inline bool ChatMessageType_IsValid(int value) {
1079  return ChatMessage_ChatMessageType_IsValid(value);
1080  }
1081  static const ChatMessageType ChatMessageType_MIN =
1082  ChatMessage_ChatMessageType_ChatMessageType_MIN;
1083  static const ChatMessageType ChatMessageType_MAX =
1084  ChatMessage_ChatMessageType_ChatMessageType_MAX;
1085  static const int ChatMessageType_ARRAYSIZE =
1086  ChatMessage_ChatMessageType_ChatMessageType_ARRAYSIZE;
1087  static inline const ::google::protobuf::EnumDescriptor*
1088  ChatMessageType_descriptor() {
1089  return ChatMessage_ChatMessageType_descriptor();
1090  }
1091  static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
1092  return ChatMessage_ChatMessageType_Name(value);
1093  }
1094  static inline bool ChatMessageType_Parse(const ::std::string& name,
1095  ChatMessageType* value) {
1096  return ChatMessage_ChatMessageType_Parse(name, value);
1097  }
1098 
1099  // accessors -------------------------------------------------------
1100 
1101  // required string to = 1;
1102  inline bool has_to() const;
1103  inline void clear_to();
1104  static const int kToFieldNumber = 1;
1105  inline const ::std::string& to() const;
1106  inline void set_to(const ::std::string& value);
1107  inline void set_to(const char* value);
1108  inline void set_to(const char* value, size_t size);
1109  inline ::std::string* mutable_to();
1110  inline ::std::string* release_to();
1111  inline void set_allocated_to(::std::string* to);
1112 
1113  // required string from = 2;
1114  inline bool has_from() const;
1115  inline void clear_from();
1116  static const int kFromFieldNumber = 2;
1117  inline const ::std::string& from() const;
1118  inline void set_from(const ::std::string& value);
1119  inline void set_from(const char* value);
1120  inline void set_from(const char* value, size_t size);
1121  inline ::std::string* mutable_from();
1122  inline ::std::string* release_from();
1123  inline void set_allocated_from(::std::string* from);
1124 
1125  // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
1126  inline bool has_type() const;
1127  inline void clear_type();
1128  static const int kTypeFieldNumber = 3;
1129  inline ::SyncDemo::ChatMessage_ChatMessageType type() const;
1130  inline void set_type(::SyncDemo::ChatMessage_ChatMessageType value);
1131 
1132  // optional string data = 4;
1133  inline bool has_data() const;
1134  inline void clear_data();
1135  static const int kDataFieldNumber = 4;
1136  inline const ::std::string& data() const;
1137  inline void set_data(const ::std::string& value);
1138  inline void set_data(const char* value);
1139  inline void set_data(const char* value, size_t size);
1140  inline ::std::string* mutable_data();
1141  inline ::std::string* release_data();
1142  inline void set_allocated_data(::std::string* data);
1143 
1144  // required int32 timestamp = 5;
1145  inline bool has_timestamp() const;
1146  inline void clear_timestamp();
1147  static const int kTimestampFieldNumber = 5;
1148  inline ::google::protobuf::int32 timestamp() const;
1149  inline void set_timestamp(::google::protobuf::int32 value);
1150 
1151  // @@protoc_insertion_point(class_scope:SyncDemo.ChatMessage)
1152  private:
1153  inline void set_has_to();
1154  inline void clear_has_to();
1155  inline void set_has_from();
1156  inline void clear_has_from();
1157  inline void set_has_type();
1158  inline void clear_has_type();
1159  inline void set_has_data();
1160  inline void clear_has_data();
1161  inline void set_has_timestamp();
1162  inline void clear_has_timestamp();
1163 
1164  ::google::protobuf::UnknownFieldSet _unknown_fields_;
1165 
1166  ::google::protobuf::uint32 _has_bits_[1];
1167  mutable int _cached_size_;
1168  ::std::string* to_;
1169  ::std::string* from_;
1170  ::std::string* data_;
1171  int type_;
1172  ::google::protobuf::int32 timestamp_;
1173  friend void protobuf_AddDesc_chatbuf_2eproto();
1174  friend void protobuf_AssignDesc_chatbuf_2eproto();
1175  friend void protobuf_ShutdownFile_chatbuf_2eproto();
1176 
1177  void InitAsDefaultInstance();
1178  static ChatMessage* default_instance_;
1179 };
1180 // ===================================================================
1181 
1182 
1183 // ===================================================================
1184 
1185 // ChatMessage
1186 
1187 // required string to = 1;
1188 inline bool ChatMessage::has_to() const {
1189  return (_has_bits_[0] & 0x00000001u) != 0;
1190 }
1191 inline void ChatMessage::set_has_to() {
1192  _has_bits_[0] |= 0x00000001u;
1193 }
1194 inline void ChatMessage::clear_has_to() {
1195  _has_bits_[0] &= ~0x00000001u;
1196 }
1197 inline void ChatMessage::clear_to() {
1198  if (to_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1199  to_->clear();
1200  }
1201  clear_has_to();
1202 }
1203 inline const ::std::string& ChatMessage::to() const {
1204  // @@protoc_insertion_point(field_get:SyncDemo.ChatMessage.to)
1205  return *to_;
1206 }
1207 inline void ChatMessage::set_to(const ::std::string& value) {
1208  set_has_to();
1209  if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1210  to_ = new ::std::string;
1211  }
1212  to_->assign(value);
1213  // @@protoc_insertion_point(field_set:SyncDemo.ChatMessage.to)
1214 }
1215 inline void ChatMessage::set_to(const char* value) {
1216  set_has_to();
1217  if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1218  to_ = new ::std::string;
1219  }
1220  to_->assign(value);
1221  // @@protoc_insertion_point(field_set_char:SyncDemo.ChatMessage.to)
1222 }
1223 inline void ChatMessage::set_to(const char* value, size_t size) {
1224  set_has_to();
1225  if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1226  to_ = new ::std::string;
1227  }
1228  to_->assign(reinterpret_cast<const char*>(value), size);
1229  // @@protoc_insertion_point(field_set_pointer:SyncDemo.ChatMessage.to)
1230 }
1231 inline ::std::string* ChatMessage::mutable_to() {
1232  set_has_to();
1233  if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1234  to_ = new ::std::string;
1235  }
1236  // @@protoc_insertion_point(field_mutable:SyncDemo.ChatMessage.to)
1237  return to_;
1238 }
1239 inline ::std::string* ChatMessage::release_to() {
1240  clear_has_to();
1241  if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1242  return NULL;
1243  } else {
1244  ::std::string* temp = to_;
1245  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1246  return temp;
1247  }
1248 }
1249 inline void ChatMessage::set_allocated_to(::std::string* to) {
1250  if (to_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1251  delete to_;
1252  }
1253  if (to) {
1254  set_has_to();
1255  to_ = to;
1256  } else {
1257  clear_has_to();
1258  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1259  }
1260  // @@protoc_insertion_point(field_set_allocated:SyncDemo.ChatMessage.to)
1261 }
1262 
1263 // required string from = 2;
1264 inline bool ChatMessage::has_from() const {
1265  return (_has_bits_[0] & 0x00000002u) != 0;
1266 }
1267 inline void ChatMessage::set_has_from() {
1268  _has_bits_[0] |= 0x00000002u;
1269 }
1270 inline void ChatMessage::clear_has_from() {
1271  _has_bits_[0] &= ~0x00000002u;
1272 }
1273 inline void ChatMessage::clear_from() {
1274  if (from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1275  from_->clear();
1276  }
1277  clear_has_from();
1278 }
1279 inline const ::std::string& ChatMessage::from() const {
1280  // @@protoc_insertion_point(field_get:SyncDemo.ChatMessage.from)
1281  return *from_;
1282 }
1283 inline void ChatMessage::set_from(const ::std::string& value) {
1284  set_has_from();
1285  if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1286  from_ = new ::std::string;
1287  }
1288  from_->assign(value);
1289  // @@protoc_insertion_point(field_set:SyncDemo.ChatMessage.from)
1290 }
1291 inline void ChatMessage::set_from(const char* value) {
1292  set_has_from();
1293  if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1294  from_ = new ::std::string;
1295  }
1296  from_->assign(value);
1297  // @@protoc_insertion_point(field_set_char:SyncDemo.ChatMessage.from)
1298 }
1299 inline void ChatMessage::set_from(const char* value, size_t size) {
1300  set_has_from();
1301  if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1302  from_ = new ::std::string;
1303  }
1304  from_->assign(reinterpret_cast<const char*>(value), size);
1305  // @@protoc_insertion_point(field_set_pointer:SyncDemo.ChatMessage.from)
1306 }
1307 inline ::std::string* ChatMessage::mutable_from() {
1308  set_has_from();
1309  if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1310  from_ = new ::std::string;
1311  }
1312  // @@protoc_insertion_point(field_mutable:SyncDemo.ChatMessage.from)
1313  return from_;
1314 }
1315 inline ::std::string* ChatMessage::release_from() {
1316  clear_has_from();
1317  if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1318  return NULL;
1319  } else {
1320  ::std::string* temp = from_;
1321  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1322  return temp;
1323  }
1324 }
1325 inline void ChatMessage::set_allocated_from(::std::string* from) {
1326  if (from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1327  delete from_;
1328  }
1329  if (from) {
1330  set_has_from();
1331  from_ = from;
1332  } else {
1333  clear_has_from();
1334  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1335  }
1336  // @@protoc_insertion_point(field_set_allocated:SyncDemo.ChatMessage.from)
1337 }
1338 
1339 // required .SyncDemo.ChatMessage.ChatMessageType type = 3 [default = CHAT];
1340 inline bool ChatMessage::has_type() const {
1341  return (_has_bits_[0] & 0x00000004u) != 0;
1342 }
1343 inline void ChatMessage::set_has_type() {
1344  _has_bits_[0] |= 0x00000004u;
1345 }
1346 inline void ChatMessage::clear_has_type() {
1347  _has_bits_[0] &= ~0x00000004u;
1348 }
1349 inline void ChatMessage::clear_type() {
1350  type_ = 0;
1351  clear_has_type();
1352 }
1353 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type() const {
1354  // @@protoc_insertion_point(field_get:SyncDemo.ChatMessage.type)
1355  return static_cast< ::SyncDemo::ChatMessage_ChatMessageType >(type_);
1356 }
1357 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
1358  assert(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
1359  set_has_type();
1360  type_ = value;
1361  // @@protoc_insertion_point(field_set:SyncDemo.ChatMessage.type)
1362 }
1363 
1364 // optional string data = 4;
1365 inline bool ChatMessage::has_data() const {
1366  return (_has_bits_[0] & 0x00000008u) != 0;
1367 }
1368 inline void ChatMessage::set_has_data() {
1369  _has_bits_[0] |= 0x00000008u;
1370 }
1371 inline void ChatMessage::clear_has_data() {
1372  _has_bits_[0] &= ~0x00000008u;
1373 }
1374 inline void ChatMessage::clear_data() {
1375  if (data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1376  data_->clear();
1377  }
1378  clear_has_data();
1379 }
1380 inline const ::std::string& ChatMessage::data() const {
1381  // @@protoc_insertion_point(field_get:SyncDemo.ChatMessage.data)
1382  return *data_;
1383 }
1384 inline void ChatMessage::set_data(const ::std::string& value) {
1385  set_has_data();
1386  if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1387  data_ = new ::std::string;
1388  }
1389  data_->assign(value);
1390  // @@protoc_insertion_point(field_set:SyncDemo.ChatMessage.data)
1391 }
1392 inline void ChatMessage::set_data(const char* value) {
1393  set_has_data();
1394  if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1395  data_ = new ::std::string;
1396  }
1397  data_->assign(value);
1398  // @@protoc_insertion_point(field_set_char:SyncDemo.ChatMessage.data)
1399 }
1400 inline void ChatMessage::set_data(const char* value, size_t size) {
1401  set_has_data();
1402  if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1403  data_ = new ::std::string;
1404  }
1405  data_->assign(reinterpret_cast<const char*>(value), size);
1406  // @@protoc_insertion_point(field_set_pointer:SyncDemo.ChatMessage.data)
1407 }
1408 inline ::std::string* ChatMessage::mutable_data() {
1409  set_has_data();
1410  if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1411  data_ = new ::std::string;
1412  }
1413  // @@protoc_insertion_point(field_mutable:SyncDemo.ChatMessage.data)
1414  return data_;
1415 }
1416 inline ::std::string* ChatMessage::release_data() {
1417  clear_has_data();
1418  if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1419  return NULL;
1420  } else {
1421  ::std::string* temp = data_;
1422  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1423  return temp;
1424  }
1425 }
1426 inline void ChatMessage::set_allocated_data(::std::string* data) {
1427  if (data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1428  delete data_;
1429  }
1430  if (data) {
1431  set_has_data();
1432  data_ = data;
1433  } else {
1434  clear_has_data();
1435  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1436  }
1437  // @@protoc_insertion_point(field_set_allocated:SyncDemo.ChatMessage.data)
1438 }
1439 
1440 // required int32 timestamp = 5;
1441 inline bool ChatMessage::has_timestamp() const {
1442  return (_has_bits_[0] & 0x00000010u) != 0;
1443 }
1444 inline void ChatMessage::set_has_timestamp() {
1445  _has_bits_[0] |= 0x00000010u;
1446 }
1447 inline void ChatMessage::clear_has_timestamp() {
1448  _has_bits_[0] &= ~0x00000010u;
1449 }
1450 inline void ChatMessage::clear_timestamp() {
1451  timestamp_ = 0;
1452  clear_has_timestamp();
1453 }
1454 inline ::google::protobuf::int32 ChatMessage::timestamp() const {
1455  // @@protoc_insertion_point(field_get:SyncDemo.ChatMessage.timestamp)
1456  return timestamp_;
1457 }
1458 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
1459  set_has_timestamp();
1460  timestamp_ = value;
1461  // @@protoc_insertion_point(field_set:SyncDemo.ChatMessage.timestamp)
1462 }
1463 
1464 
1465 // @@protoc_insertion_point(namespace_scope)
1466 
1467 } // namespace SyncDemo
1468 
1469 #ifndef SWIG
1470 namespace google {
1471 namespace protobuf {
1472 
1473 template <> struct is_proto_enum< ::SyncDemo::ChatMessage_ChatMessageType> : ::google::protobuf::internal::true_type {};
1474 template <>
1475 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
1476  return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
1477 }
1478 
1479 } // namespace google
1480 } // namespace protobuf
1481 #endif // SWIG
1482 
1483 // @@protoc_insertion_point(global_scope)
1484 
1485 #endif // GOOGLE_PROTOBUF_VERSION < 2006000
1486 
1487 #endif // PROTOBUF_chatbuf_2eproto__INCLUDED
Definition: chatbuf.pb.h:64
Definition: chatbuf.pb.h:31
Copyright (C) 2014-2016 Regents of the University of California.
Definition: channel-status.pb.h:315