// Generated by the protocol buffer compiler. DO NOT EDIT! #ifndef PROTOBUF_person_2eproto__INCLUDED #define PROTOBUF_person_2eproto__INCLUDED #include #include #if GOOGLE_PROTOBUF_VERSION < 2002000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 2002000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include #include #include #include // Internal implementation detail -- do not call these. void protobuf_AddDesc_person_2eproto(); void protobuf_AssignDesc_person_2eproto(); void protobuf_ShutdownFile_person_2eproto(); class Person; // =================================================================== class Person : public ::google::protobuf::Message { public: Person(); virtual ~Person(); Person(const Person& from); inline Person& operator=(const Person& from) { CopyFrom(from); return *this; } inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _unknown_fields_; } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return &_unknown_fields_; } static const ::google::protobuf::Descriptor* descriptor(); static const Person& default_instance(); void Swap(Person* other); // implements Message ---------------------------------------------- Person* New() const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); void CopyFrom(const Person& from); void MergeFrom(const Person& from); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const { _cached_size_ = size; } public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required int32 id = 1; inline bool has_id() const; inline void clear_id(); static const int kIdFieldNumber = 1; inline ::google::protobuf::int32 id() const; inline void set_id(::google::protobuf::int32 value); // required string name = 2; inline bool has_name() const; inline void clear_name(); static const int kNameFieldNumber = 2; inline const ::std::string& name() const; inline void set_name(const ::std::string& value); inline void set_name(const char* value); inline void set_name(const char* value, size_t size); inline ::std::string* mutable_name(); // optional string email = 3; inline bool has_email() const; inline void clear_email(); static const int kEmailFieldNumber = 3; inline const ::std::string& email() const; inline void set_email(const ::std::string& value); inline void set_email(const char* value); inline void set_email(const char* value, size_t size); inline ::std::string* mutable_email(); private: ::google::protobuf::UnknownFieldSet _unknown_fields_; mutable int _cached_size_; ::google::protobuf::int32 id_; ::std::string* name_; static const ::std::string _default_name_; ::std::string* email_; static const ::std::string _default_email_; friend void protobuf_AddDesc_person_2eproto(); friend void protobuf_AssignDesc_person_2eproto(); friend void protobuf_ShutdownFile_person_2eproto(); ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? inline bool _has_bit(int index) const { return (_has_bits_[index / 32] & (1u << (index % 32))) != 0; } inline void _set_bit(int index) { _has_bits_[index / 32] |= (1u << (index % 32)); } inline void _clear_bit(int index) { _has_bits_[index / 32] &= ~(1u << (index % 32)); } void InitAsDefaultInstance(); static Person* default_instance_; }; // =================================================================== // =================================================================== // =================================================================== // Person // required int32 id = 1; inline bool Person::has_id() const { return _has_bit(0); } inline void Person::clear_id() { id_ = 0; _clear_bit(0); } inline ::google::protobuf::int32 Person::id() const { return id_; } inline void Person::set_id(::google::protobuf::int32 value) { _set_bit(0); id_ = value; } // required string name = 2; inline bool Person::has_name() const { return _has_bit(1); } inline void Person::clear_name() { if (name_ != &_default_name_) { name_->clear(); } _clear_bit(1); } inline const ::std::string& Person::name() const { return *name_; } inline void Person::set_name(const ::std::string& value) { _set_bit(1); if (name_ == &_default_name_) { name_ = new ::std::string; } name_->assign(value); } inline void Person::set_name(const char* value) { _set_bit(1); if (name_ == &_default_name_) { name_ = new ::std::string; } name_->assign(value); } inline void Person::set_name(const char* value, size_t size) { _set_bit(1); if (name_ == &_default_name_) { name_ = new ::std::string; } name_->assign(reinterpret_cast(value), size); } inline ::std::string* Person::mutable_name() { _set_bit(1); if (name_ == &_default_name_) { name_ = new ::std::string; } return name_; } // optional string email = 3; inline bool Person::has_email() const { return _has_bit(2); } inline void Person::clear_email() { if (email_ != &_default_email_) { email_->clear(); } _clear_bit(2); } inline const ::std::string& Person::email() const { return *email_; } inline void Person::set_email(const ::std::string& value) { _set_bit(2); if (email_ == &_default_email_) { email_ = new ::std::string; } email_->assign(value); } inline void Person::set_email(const char* value) { _set_bit(2); if (email_ == &_default_email_) { email_ = new ::std::string; } email_->assign(value); } inline void Person::set_email(const char* value, size_t size) { _set_bit(2); if (email_ == &_default_email_) { email_ = new ::std::string; } email_->assign(reinterpret_cast(value), size); } inline ::std::string* Person::mutable_email() { _set_bit(2); if (email_ == &_default_email_) { email_ = new ::std::string; } return email_; } #ifndef SWIG namespace google { namespace protobuf { } // namespace google } // namespace protobuf #endif // SWIG #endif // PROTOBUF_person_2eproto__INCLUDED