4 #ifndef PROTOBUF_chatbuf_2eproto__INCLUDED
5 #define PROTOBUF_chatbuf_2eproto__INCLUDED
9 #include <google/protobuf/stubs/common.h>
12 #if GOOGLE_PROTOBUF_VERSION < 2005000
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
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.
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>
34 void protobuf_AddDesc_chatbuf_2eproto();
35 void protobuf_AssignDesc_chatbuf_2eproto();
36 void protobuf_ShutdownFile_chatbuf_2eproto();
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
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;
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);
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);
76 inline const ::google::protobuf::UnknownFieldSet& unknown_fields()
const {
77 return _unknown_fields_;
80 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
81 return &_unknown_fields_;
84 static const ::google::protobuf::Descriptor* descriptor();
92 void CopyFrom(const ::google::protobuf::Message& from);
93 void MergeFrom(const ::google::protobuf::Message& from);
97 bool IsInitialized()
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_; }
109 void SetCachedSize(
int size)
const;
112 ::google::protobuf::Metadata GetMetadata()
const;
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);
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();
135 static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
136 return ChatMessage_ChatMessageType_Name(value);
138 static inline bool ChatMessageType_Parse(const ::std::string& name,
139 ChatMessageType* value) {
140 return ChatMessage_ChatMessageType_Parse(name, value);
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();
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();
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);
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();
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);
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();
205 ::google::protobuf::UnknownFieldSet _unknown_fields_;
208 ::std::string* from_;
209 ::std::string* data_;
211 ::google::protobuf::int32 timestamp_;
213 mutable int _cached_size_;
214 ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
216 friend void protobuf_AddDesc_chatbuf_2eproto();
217 friend void protobuf_AssignDesc_chatbuf_2eproto();
218 friend void protobuf_ShutdownFile_chatbuf_2eproto();
220 void InitAsDefaultInstance();
231 inline bool ChatMessage::has_to()
const {
232 return (_has_bits_[0] & 0x00000001u) != 0;
234 inline void ChatMessage::set_has_to() {
235 _has_bits_[0] |= 0x00000001u;
237 inline void ChatMessage::clear_has_to() {
238 _has_bits_[0] &= ~0x00000001u;
240 inline void ChatMessage::clear_to() {
241 if (to_ != &::google::protobuf::internal::kEmptyString) {
246 inline const ::std::string& ChatMessage::to()
const {
249 inline void ChatMessage::set_to(const ::std::string& value) {
251 if (to_ == &::google::protobuf::internal::kEmptyString) {
252 to_ = new ::std::string;
256 inline void ChatMessage::set_to(
const char* value) {
258 if (to_ == &::google::protobuf::internal::kEmptyString) {
259 to_ = new ::std::string;
263 inline void ChatMessage::set_to(
const char* value,
size_t size) {
265 if (to_ == &::google::protobuf::internal::kEmptyString) {
266 to_ = new ::std::string;
268 to_->assign(reinterpret_cast<const char*>(value), size);
270 inline ::std::string* ChatMessage::mutable_to() {
272 if (to_ == &::google::protobuf::internal::kEmptyString) {
273 to_ = new ::std::string;
277 inline ::std::string* ChatMessage::release_to() {
279 if (to_ == &::google::protobuf::internal::kEmptyString) {
282 ::std::string* temp = to_;
283 to_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
289 inline bool ChatMessage::has_from()
const {
290 return (_has_bits_[0] & 0x00000002u) != 0;
292 inline void ChatMessage::set_has_from() {
293 _has_bits_[0] |= 0x00000002u;
295 inline void ChatMessage::clear_has_from() {
296 _has_bits_[0] &= ~0x00000002u;
298 inline void ChatMessage::clear_from() {
299 if (from_ != &::google::protobuf::internal::kEmptyString) {
304 inline const ::std::string& ChatMessage::from()
const {
307 inline void ChatMessage::set_from(const ::std::string& value) {
309 if (from_ == &::google::protobuf::internal::kEmptyString) {
310 from_ = new ::std::string;
312 from_->assign(value);
314 inline void ChatMessage::set_from(
const char* value) {
316 if (from_ == &::google::protobuf::internal::kEmptyString) {
317 from_ = new ::std::string;
319 from_->assign(value);
321 inline void ChatMessage::set_from(
const char* value,
size_t size) {
323 if (from_ == &::google::protobuf::internal::kEmptyString) {
324 from_ = new ::std::string;
326 from_->assign(reinterpret_cast<const char*>(value), size);
328 inline ::std::string* ChatMessage::mutable_from() {
330 if (from_ == &::google::protobuf::internal::kEmptyString) {
331 from_ = new ::std::string;
335 inline ::std::string* ChatMessage::release_from() {
337 if (from_ == &::google::protobuf::internal::kEmptyString) {
340 ::std::string* temp = from_;
341 from_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
347 inline bool ChatMessage::has_type()
const {
348 return (_has_bits_[0] & 0x00000004u) != 0;
350 inline void ChatMessage::set_has_type() {
351 _has_bits_[0] |= 0x00000004u;
353 inline void ChatMessage::clear_has_type() {
354 _has_bits_[0] &= ~0x00000004u;
356 inline void ChatMessage::clear_type() {
360 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type()
const {
361 return static_cast< ::SyncDemo::ChatMessage_ChatMessageType
>(type_);
363 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
364 GOOGLE_DCHECK(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
370 inline bool ChatMessage::has_data()
const {
371 return (_has_bits_[0] & 0x00000008u) != 0;
373 inline void ChatMessage::set_has_data() {
374 _has_bits_[0] |= 0x00000008u;
376 inline void ChatMessage::clear_has_data() {
377 _has_bits_[0] &= ~0x00000008u;
379 inline void ChatMessage::clear_data() {
380 if (data_ != &::google::protobuf::internal::kEmptyString) {
385 inline const ::std::string& ChatMessage::data()
const {
388 inline void ChatMessage::set_data(const ::std::string& value) {
390 if (data_ == &::google::protobuf::internal::kEmptyString) {
391 data_ = new ::std::string;
393 data_->assign(value);
395 inline void ChatMessage::set_data(
const char* value) {
397 if (data_ == &::google::protobuf::internal::kEmptyString) {
398 data_ = new ::std::string;
400 data_->assign(value);
402 inline void ChatMessage::set_data(
const char* value,
size_t size) {
404 if (data_ == &::google::protobuf::internal::kEmptyString) {
405 data_ = new ::std::string;
407 data_->assign(reinterpret_cast<const char*>(value), size);
409 inline ::std::string* ChatMessage::mutable_data() {
411 if (data_ == &::google::protobuf::internal::kEmptyString) {
412 data_ = new ::std::string;
416 inline ::std::string* ChatMessage::release_data() {
418 if (data_ == &::google::protobuf::internal::kEmptyString) {
421 ::std::string* temp = data_;
422 data_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
428 inline bool ChatMessage::has_timestamp()
const {
429 return (_has_bits_[0] & 0x00000010u) != 0;
431 inline void ChatMessage::set_has_timestamp() {
432 _has_bits_[0] |= 0x00000010u;
434 inline void ChatMessage::clear_has_timestamp() {
435 _has_bits_[0] &= ~0x00000010u;
437 inline void ChatMessage::clear_timestamp() {
439 clear_has_timestamp();
441 inline ::google::protobuf::int32 ChatMessage::timestamp()
const {
444 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
459 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
460 return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
469 #elif GOOGLE_PROTOBUF_VERSION < 2006000
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
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.
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>
493 void protobuf_AddDesc_chatbuf_2eproto();
494 void protobuf_AssignDesc_chatbuf_2eproto();
495 void protobuf_ShutdownFile_chatbuf_2eproto();
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
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;
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);
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);
523 class ChatMessage :
public ::google::protobuf::Message {
526 virtual ~ChatMessage();
528 ChatMessage(
const ChatMessage& from);
530 inline ChatMessage& operator=(
const ChatMessage& from) {
535 inline const ::google::protobuf::UnknownFieldSet& unknown_fields()
const {
536 return _unknown_fields_;
539 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
540 return &_unknown_fields_;
543 static const ::google::protobuf::Descriptor* descriptor();
544 static const ChatMessage& default_instance();
546 void Swap(ChatMessage* other);
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);
556 bool IsInitialized()
const;
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_; }
568 void SetCachedSize(
int size)
const;
571 ::google::protobuf::Metadata GetMetadata()
const;
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);
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();
594 static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
595 return ChatMessage_ChatMessageType_Name(value);
597 static inline bool ChatMessageType_Parse(const ::std::string& name,
598 ChatMessageType* value) {
599 return ChatMessage_ChatMessageType_Parse(name, value);
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);
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);
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);
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);
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);
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();
667 ::google::protobuf::UnknownFieldSet _unknown_fields_;
670 ::std::string* from_;
671 ::std::string* data_;
673 ::google::protobuf::int32 timestamp_;
675 mutable int _cached_size_;
676 ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
678 friend void protobuf_AddDesc_chatbuf_2eproto();
679 friend void protobuf_AssignDesc_chatbuf_2eproto();
680 friend void protobuf_ShutdownFile_chatbuf_2eproto();
682 void InitAsDefaultInstance();
683 static ChatMessage* default_instance_;
693 inline bool ChatMessage::has_to()
const {
694 return (_has_bits_[0] & 0x00000001u) != 0;
696 inline void ChatMessage::set_has_to() {
697 _has_bits_[0] |= 0x00000001u;
699 inline void ChatMessage::clear_has_to() {
700 _has_bits_[0] &= ~0x00000001u;
702 inline void ChatMessage::clear_to() {
703 if (to_ != &::google::protobuf::internal::kEmptyString) {
708 inline const ::std::string& ChatMessage::to()
const {
711 inline void ChatMessage::set_to(const ::std::string& value) {
713 if (to_ == &::google::protobuf::internal::kEmptyString) {
714 to_ = new ::std::string;
718 inline void ChatMessage::set_to(
const char* value) {
720 if (to_ == &::google::protobuf::internal::kEmptyString) {
721 to_ = new ::std::string;
725 inline void ChatMessage::set_to(
const char* value,
size_t size) {
727 if (to_ == &::google::protobuf::internal::kEmptyString) {
728 to_ = new ::std::string;
730 to_->assign(reinterpret_cast<const char*>(value), size);
732 inline ::std::string* ChatMessage::mutable_to() {
734 if (to_ == &::google::protobuf::internal::kEmptyString) {
735 to_ = new ::std::string;
739 inline ::std::string* ChatMessage::release_to() {
741 if (to_ == &::google::protobuf::internal::kEmptyString) {
744 ::std::string* temp = to_;
745 to_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
749 inline void ChatMessage::set_allocated_to(::std::string* to) {
750 if (to_ != &::google::protobuf::internal::kEmptyString) {
758 to_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
763 inline bool ChatMessage::has_from()
const {
764 return (_has_bits_[0] & 0x00000002u) != 0;
766 inline void ChatMessage::set_has_from() {
767 _has_bits_[0] |= 0x00000002u;
769 inline void ChatMessage::clear_has_from() {
770 _has_bits_[0] &= ~0x00000002u;
772 inline void ChatMessage::clear_from() {
773 if (from_ != &::google::protobuf::internal::kEmptyString) {
778 inline const ::std::string& ChatMessage::from()
const {
781 inline void ChatMessage::set_from(const ::std::string& value) {
783 if (from_ == &::google::protobuf::internal::kEmptyString) {
784 from_ = new ::std::string;
786 from_->assign(value);
788 inline void ChatMessage::set_from(
const char* value) {
790 if (from_ == &::google::protobuf::internal::kEmptyString) {
791 from_ = new ::std::string;
793 from_->assign(value);
795 inline void ChatMessage::set_from(
const char* value,
size_t size) {
797 if (from_ == &::google::protobuf::internal::kEmptyString) {
798 from_ = new ::std::string;
800 from_->assign(reinterpret_cast<const char*>(value), size);
802 inline ::std::string* ChatMessage::mutable_from() {
804 if (from_ == &::google::protobuf::internal::kEmptyString) {
805 from_ = new ::std::string;
809 inline ::std::string* ChatMessage::release_from() {
811 if (from_ == &::google::protobuf::internal::kEmptyString) {
814 ::std::string* temp = from_;
815 from_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
819 inline void ChatMessage::set_allocated_from(::std::string* from) {
820 if (from_ != &::google::protobuf::internal::kEmptyString) {
828 from_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
833 inline bool ChatMessage::has_type()
const {
834 return (_has_bits_[0] & 0x00000004u) != 0;
836 inline void ChatMessage::set_has_type() {
837 _has_bits_[0] |= 0x00000004u;
839 inline void ChatMessage::clear_has_type() {
840 _has_bits_[0] &= ~0x00000004u;
842 inline void ChatMessage::clear_type() {
846 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type()
const {
847 return static_cast< ::SyncDemo::ChatMessage_ChatMessageType
>(type_);
849 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
850 assert(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
856 inline bool ChatMessage::has_data()
const {
857 return (_has_bits_[0] & 0x00000008u) != 0;
859 inline void ChatMessage::set_has_data() {
860 _has_bits_[0] |= 0x00000008u;
862 inline void ChatMessage::clear_has_data() {
863 _has_bits_[0] &= ~0x00000008u;
865 inline void ChatMessage::clear_data() {
866 if (data_ != &::google::protobuf::internal::kEmptyString) {
871 inline const ::std::string& ChatMessage::data()
const {
874 inline void ChatMessage::set_data(const ::std::string& value) {
876 if (data_ == &::google::protobuf::internal::kEmptyString) {
877 data_ = new ::std::string;
879 data_->assign(value);
881 inline void ChatMessage::set_data(
const char* value) {
883 if (data_ == &::google::protobuf::internal::kEmptyString) {
884 data_ = new ::std::string;
886 data_->assign(value);
888 inline void ChatMessage::set_data(
const char* value,
size_t size) {
890 if (data_ == &::google::protobuf::internal::kEmptyString) {
891 data_ = new ::std::string;
893 data_->assign(reinterpret_cast<const char*>(value), size);
895 inline ::std::string* ChatMessage::mutable_data() {
897 if (data_ == &::google::protobuf::internal::kEmptyString) {
898 data_ = new ::std::string;
902 inline ::std::string* ChatMessage::release_data() {
904 if (data_ == &::google::protobuf::internal::kEmptyString) {
907 ::std::string* temp = data_;
908 data_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
912 inline void ChatMessage::set_allocated_data(::std::string* data) {
913 if (data_ != &::google::protobuf::internal::kEmptyString) {
921 data_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::kEmptyString);
926 inline bool ChatMessage::has_timestamp()
const {
927 return (_has_bits_[0] & 0x00000010u) != 0;
929 inline void ChatMessage::set_has_timestamp() {
930 _has_bits_[0] |= 0x00000010u;
932 inline void ChatMessage::clear_has_timestamp() {
933 _has_bits_[0] &= ~0x00000010u;
935 inline void ChatMessage::clear_timestamp() {
937 clear_has_timestamp();
939 inline ::google::protobuf::int32 ChatMessage::timestamp()
const {
942 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
957 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
958 return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
967 #else // GOOGLE_PROTOBUF_VERSION < 2006000
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
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.
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>
991 void protobuf_AddDesc_chatbuf_2eproto();
992 void protobuf_AssignDesc_chatbuf_2eproto();
993 void protobuf_ShutdownFile_chatbuf_2eproto();
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
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;
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);
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);
1021 class ChatMessage :
public ::google::protobuf::Message {
1024 virtual ~ChatMessage();
1026 ChatMessage(
const ChatMessage& from);
1028 inline ChatMessage& operator=(
const ChatMessage& from) {
1033 inline const ::google::protobuf::UnknownFieldSet& unknown_fields()
const {
1034 return _unknown_fields_;
1037 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
1038 return &_unknown_fields_;
1041 static const ::google::protobuf::Descriptor* descriptor();
1042 static const ChatMessage& default_instance();
1044 void Swap(ChatMessage* other);
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);
1054 bool IsInitialized()
const;
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_; }
1066 void SetCachedSize(
int size)
const;
1068 ::google::protobuf::Metadata GetMetadata()
const;
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);
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();
1091 static inline const ::std::string& ChatMessageType_Name(ChatMessageType value) {
1092 return ChatMessage_ChatMessageType_Name(value);
1094 static inline bool ChatMessageType_Parse(const ::std::string& name,
1095 ChatMessageType* value) {
1096 return ChatMessage_ChatMessageType_Parse(name, value);
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);
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);
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);
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);
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);
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();
1164 ::google::protobuf::UnknownFieldSet _unknown_fields_;
1166 ::google::protobuf::uint32 _has_bits_[1];
1167 mutable int _cached_size_;
1169 ::std::string* from_;
1170 ::std::string* data_;
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();
1177 void InitAsDefaultInstance();
1178 static ChatMessage* default_instance_;
1188 inline bool ChatMessage::has_to()
const {
1189 return (_has_bits_[0] & 0x00000001u) != 0;
1191 inline void ChatMessage::set_has_to() {
1192 _has_bits_[0] |= 0x00000001u;
1194 inline void ChatMessage::clear_has_to() {
1195 _has_bits_[0] &= ~0x00000001u;
1197 inline void ChatMessage::clear_to() {
1198 if (to_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1203 inline const ::std::string& ChatMessage::to()
const {
1207 inline void ChatMessage::set_to(const ::std::string& value) {
1209 if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1210 to_ = new ::std::string;
1215 inline void ChatMessage::set_to(
const char* value) {
1217 if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1218 to_ = new ::std::string;
1223 inline void ChatMessage::set_to(
const char* value,
size_t size) {
1225 if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1226 to_ = new ::std::string;
1228 to_->assign(reinterpret_cast<const char*>(value), size);
1231 inline ::std::string* ChatMessage::mutable_to() {
1233 if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1234 to_ = new ::std::string;
1239 inline ::std::string* ChatMessage::release_to() {
1241 if (to_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1244 ::std::string* temp = to_;
1245 to_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1249 inline void ChatMessage::set_allocated_to(::std::string* to) {
1250 if (to_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1258 to_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1264 inline bool ChatMessage::has_from()
const {
1265 return (_has_bits_[0] & 0x00000002u) != 0;
1267 inline void ChatMessage::set_has_from() {
1268 _has_bits_[0] |= 0x00000002u;
1270 inline void ChatMessage::clear_has_from() {
1271 _has_bits_[0] &= ~0x00000002u;
1273 inline void ChatMessage::clear_from() {
1274 if (from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1279 inline const ::std::string& ChatMessage::from()
const {
1283 inline void ChatMessage::set_from(const ::std::string& value) {
1285 if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1286 from_ = new ::std::string;
1288 from_->assign(value);
1291 inline void ChatMessage::set_from(
const char* value) {
1293 if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1294 from_ = new ::std::string;
1296 from_->assign(value);
1299 inline void ChatMessage::set_from(
const char* value,
size_t size) {
1301 if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1302 from_ = new ::std::string;
1304 from_->assign(reinterpret_cast<const char*>(value), size);
1307 inline ::std::string* ChatMessage::mutable_from() {
1309 if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1310 from_ = new ::std::string;
1315 inline ::std::string* ChatMessage::release_from() {
1317 if (from_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1320 ::std::string* temp = from_;
1321 from_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1325 inline void ChatMessage::set_allocated_from(::std::string* from) {
1326 if (from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1334 from_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1340 inline bool ChatMessage::has_type()
const {
1341 return (_has_bits_[0] & 0x00000004u) != 0;
1343 inline void ChatMessage::set_has_type() {
1344 _has_bits_[0] |= 0x00000004u;
1346 inline void ChatMessage::clear_has_type() {
1347 _has_bits_[0] &= ~0x00000004u;
1349 inline void ChatMessage::clear_type() {
1353 inline ::SyncDemo::ChatMessage_ChatMessageType ChatMessage::type()
const {
1355 return static_cast< ::SyncDemo::ChatMessage_ChatMessageType
>(type_);
1357 inline void ChatMessage::set_type(::SyncDemo::ChatMessage_ChatMessageType value) {
1358 assert(::SyncDemo::ChatMessage_ChatMessageType_IsValid(value));
1365 inline bool ChatMessage::has_data()
const {
1366 return (_has_bits_[0] & 0x00000008u) != 0;
1368 inline void ChatMessage::set_has_data() {
1369 _has_bits_[0] |= 0x00000008u;
1371 inline void ChatMessage::clear_has_data() {
1372 _has_bits_[0] &= ~0x00000008u;
1374 inline void ChatMessage::clear_data() {
1375 if (data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1380 inline const ::std::string& ChatMessage::data()
const {
1384 inline void ChatMessage::set_data(const ::std::string& value) {
1386 if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1387 data_ = new ::std::string;
1389 data_->assign(value);
1392 inline void ChatMessage::set_data(
const char* value) {
1394 if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1395 data_ = new ::std::string;
1397 data_->assign(value);
1400 inline void ChatMessage::set_data(
const char* value,
size_t size) {
1402 if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1403 data_ = new ::std::string;
1405 data_->assign(reinterpret_cast<const char*>(value), size);
1408 inline ::std::string* ChatMessage::mutable_data() {
1410 if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1411 data_ = new ::std::string;
1416 inline ::std::string* ChatMessage::release_data() {
1418 if (data_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1421 ::std::string* temp = data_;
1422 data_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1426 inline void ChatMessage::set_allocated_data(::std::string* data) {
1427 if (data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
1435 data_ =
const_cast< ::std::string*
>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1441 inline bool ChatMessage::has_timestamp()
const {
1442 return (_has_bits_[0] & 0x00000010u) != 0;
1444 inline void ChatMessage::set_has_timestamp() {
1445 _has_bits_[0] |= 0x00000010u;
1447 inline void ChatMessage::clear_has_timestamp() {
1448 _has_bits_[0] &= ~0x00000010u;
1450 inline void ChatMessage::clear_timestamp() {
1452 clear_has_timestamp();
1454 inline ::google::protobuf::int32 ChatMessage::timestamp()
const {
1458 inline void ChatMessage::set_timestamp(::google::protobuf::int32 value) {
1459 set_has_timestamp();
1471 namespace protobuf {
1473 template <>
struct is_proto_enum< ::SyncDemo::ChatMessage_ChatMessageType> : ::google::protobuf::internal::true_type {};
1475 inline const EnumDescriptor* GetEnumDescriptor< ::SyncDemo::ChatMessage_ChatMessageType>() {
1476 return ::SyncDemo::ChatMessage_ChatMessageType_descriptor();
1485 #endif // GOOGLE_PROTOBUF_VERSION < 2006000
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