Home | History | Annotate | Download | only in cpp
      1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
      2 // source: msgheader.proto
      3 
      4 #ifndef PROTOBUF_msgheader_2eproto__INCLUDED
      5 #define PROTOBUF_msgheader_2eproto__INCLUDED
      6 
      7 #include <string>
      8 
      9 #include <google/protobuf/stubs/common.h>
     10 
     11 #if GOOGLE_PROTOBUF_VERSION < 2003000
     12 #error This file was generated by a newer version of protoc which is
     13 #error incompatible with your Protocol Buffer headers.  Please update
     14 #error your headers.
     15 #endif
     16 #if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
     17 #error This file was generated by an older version of protoc which is
     18 #error incompatible with your Protocol Buffer headers.  Please
     19 #error regenerate this file with a newer version of protoc.
     20 #endif
     21 
     22 #include <google/protobuf/generated_message_util.h>
     23 #include <google/protobuf/repeated_field.h>
     24 #include <google/protobuf/extension_set.h>
     25 #include <google/protobuf/generated_message_reflection.h>
     26 // @@protoc_insertion_point(includes)
     27 
     28 namespace communication {
     29 
     30 // Internal implementation detail -- do not call these.
     31 void  protobuf_AddDesc_msgheader_2eproto();
     32 void protobuf_AssignDesc_msgheader_2eproto();
     33 void protobuf_ShutdownFile_msgheader_2eproto();
     34 
     35 class MsgHeader;
     36 
     37 // ===================================================================
     38 
     39 class MsgHeader : public ::google::protobuf::Message {
     40  public:
     41   MsgHeader();
     42   virtual ~MsgHeader();
     43 
     44   MsgHeader(const MsgHeader& from);
     45 
     46   inline MsgHeader& operator=(const MsgHeader& from) {
     47     CopyFrom(from);
     48     return *this;
     49   }
     50 
     51   inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
     52     return _unknown_fields_;
     53   }
     54 
     55   inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
     56     return &_unknown_fields_;
     57   }
     58 
     59   static const ::google::protobuf::Descriptor* descriptor();
     60   static const MsgHeader& default_instance();
     61 
     62   void Swap(MsgHeader* other);
     63 
     64   // implements Message ----------------------------------------------
     65 
     66   MsgHeader* New() const;
     67   void CopyFrom(const ::google::protobuf::Message& from);
     68   void MergeFrom(const ::google::protobuf::Message& from);
     69   void CopyFrom(const MsgHeader& from);
     70   void MergeFrom(const MsgHeader& from);
     71   void Clear();
     72   bool IsInitialized() const;
     73 
     74   int ByteSize() const;
     75   bool MergePartialFromCodedStream(
     76       ::google::protobuf::io::CodedInputStream* input);
     77   void SerializeWithCachedSizes(
     78       ::google::protobuf::io::CodedOutputStream* output) const;
     79   ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
     80   int GetCachedSize() const { return _cached_size_; }
     81   private:
     82   void SharedCtor();
     83   void SharedDtor();
     84   void SetCachedSize(int size) const;
     85   public:
     86 
     87   ::google::protobuf::Metadata GetMetadata() const;
     88 
     89   // nested types ----------------------------------------------------
     90 
     91   // accessors -------------------------------------------------------
     92 
     93   // required uint32 cmd = 1;
     94   inline bool has_cmd() const;
     95   inline void clear_cmd();
     96   static const int kCmdFieldNumber = 1;
     97   inline ::google::protobuf::uint32 cmd() const;
     98   inline void set_cmd(::google::protobuf::uint32 value);
     99 
    100   // required uint32 length_data = 2;
    101   inline bool has_length_data() const;
    102   inline void clear_length_data();
    103   static const int kLengthDataFieldNumber = 2;
    104   inline ::google::protobuf::uint32 length_data() const;
    105   inline void set_length_data(::google::protobuf::uint32 value);
    106 
    107   // optional uint32 status = 3;
    108   inline bool has_status() const;
    109   inline void clear_status();
    110   static const int kStatusFieldNumber = 3;
    111   inline ::google::protobuf::uint32 status() const;
    112   inline void set_status(::google::protobuf::uint32 value);
    113 
    114   // optional uint64 token = 4;
    115   inline bool has_token() const;
    116   inline void clear_token();
    117   static const int kTokenFieldNumber = 4;
    118   inline ::google::protobuf::uint64 token() const;
    119   inline void set_token(::google::protobuf::uint64 value);
    120 
    121   // @@protoc_insertion_point(class_scope:communication.MsgHeader)
    122  private:
    123   ::google::protobuf::UnknownFieldSet _unknown_fields_;
    124   mutable int _cached_size_;
    125 
    126   ::google::protobuf::uint32 cmd_;
    127   ::google::protobuf::uint32 length_data_;
    128   ::google::protobuf::uint32 status_;
    129   ::google::protobuf::uint64 token_;
    130   friend void  protobuf_AddDesc_msgheader_2eproto();
    131   friend void protobuf_AssignDesc_msgheader_2eproto();
    132   friend void protobuf_ShutdownFile_msgheader_2eproto();
    133 
    134   ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
    135 
    136   // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
    137   inline bool _has_bit(int index) const {
    138     return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
    139   }
    140   inline void _set_bit(int index) {
    141     _has_bits_[index / 32] |= (1u << (index % 32));
    142   }
    143   inline void _clear_bit(int index) {
    144     _has_bits_[index / 32] &= ~(1u << (index % 32));
    145   }
    146 
    147   void InitAsDefaultInstance();
    148   static MsgHeader* default_instance_;
    149 };
    150 // ===================================================================
    151 
    152 
    153 // ===================================================================
    154 
    155 // MsgHeader
    156 
    157 // required uint32 cmd = 1;
    158 inline bool MsgHeader::has_cmd() const {
    159   return _has_bit(0);
    160 }
    161 inline void MsgHeader::clear_cmd() {
    162   cmd_ = 0u;
    163   _clear_bit(0);
    164 }
    165 inline ::google::protobuf::uint32 MsgHeader::cmd() const {
    166   return cmd_;
    167 }
    168 inline void MsgHeader::set_cmd(::google::protobuf::uint32 value) {
    169   _set_bit(0);
    170   cmd_ = value;
    171 }
    172 
    173 // required uint32 length_data = 2;
    174 inline bool MsgHeader::has_length_data() const {
    175   return _has_bit(1);
    176 }
    177 inline void MsgHeader::clear_length_data() {
    178   length_data_ = 0u;
    179   _clear_bit(1);
    180 }
    181 inline ::google::protobuf::uint32 MsgHeader::length_data() const {
    182   return length_data_;
    183 }
    184 inline void MsgHeader::set_length_data(::google::protobuf::uint32 value) {
    185   _set_bit(1);
    186   length_data_ = value;
    187 }
    188 
    189 // optional uint32 status = 3;
    190 inline bool MsgHeader::has_status() const {
    191   return _has_bit(2);
    192 }
    193 inline void MsgHeader::clear_status() {
    194   status_ = 0u;
    195   _clear_bit(2);
    196 }
    197 inline ::google::protobuf::uint32 MsgHeader::status() const {
    198   return status_;
    199 }
    200 inline void MsgHeader::set_status(::google::protobuf::uint32 value) {
    201   _set_bit(2);
    202   status_ = value;
    203 }
    204 
    205 // optional uint64 token = 4;
    206 inline bool MsgHeader::has_token() const {
    207   return _has_bit(3);
    208 }
    209 inline void MsgHeader::clear_token() {
    210   token_ = GOOGLE_ULONGLONG(0);
    211   _clear_bit(3);
    212 }
    213 inline ::google::protobuf::uint64 MsgHeader::token() const {
    214   return token_;
    215 }
    216 inline void MsgHeader::set_token(::google::protobuf::uint64 value) {
    217   _set_bit(3);
    218   token_ = value;
    219 }
    220 
    221 
    222 // @@protoc_insertion_point(namespace_scope)
    223 
    224 }  // namespace communication
    225 
    226 #ifndef SWIG
    227 namespace google {
    228 namespace protobuf {
    229 
    230 
    231 }  // namespace google
    232 }  // namespace protobuf
    233 #endif  // SWIG
    234 
    235 // @@protoc_insertion_point(global_scope)
    236 
    237 #endif  // PROTOBUF_msgheader_2eproto__INCLUDED
    238