/bin/cpp/custom/rpc/rpc.pb.h
https://github.com/Ehnn/proto · C Header · 221 lines · 160 code · 42 blank · 19 comment · 11 complexity · dc41a0aa2b69cd2ccea89859437d4bf2 MD5 · raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: custom/rpc/rpc.proto
- #ifndef PROTOBUF_custom_2frpc_2frpc_2eproto__INCLUDED
- #define PROTOBUF_custom_2frpc_2frpc_2eproto__INCLUDED
- #include <string>
- #include <google/protobuf/stubs/common.h>
- #if GOOGLE_PROTOBUF_VERSION < 2003000
- #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 2003000 < 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 <google/protobuf/generated_message_util.h>
- #include <google/protobuf/repeated_field.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/generated_message_reflection.h>
- // @@protoc_insertion_point(includes)
- namespace custom {
- namespace rpc {
- // Internal implementation detail -- do not call these.
- void protobuf_AddDesc_custom_2frpc_2frpc_2eproto();
- void protobuf_AssignDesc_custom_2frpc_2frpc_2eproto();
- void protobuf_ShutdownFile_custom_2frpc_2frpc_2eproto();
- class Packet;
- // ===================================================================
- class Packet : public ::google::protobuf::Message {
- public:
- Packet();
- virtual ~Packet();
-
- Packet(const Packet& from);
-
- inline Packet& operator=(const Packet& 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 Packet& default_instance();
-
- void Swap(Packet* other);
-
- // implements Message ----------------------------------------------
-
- Packet* New() const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const Packet& from);
- void MergeFrom(const Packet& 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;
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // required uint64 size = 1;
- inline bool has_size() const;
- inline void clear_size();
- static const int kSizeFieldNumber = 1;
- inline ::google::protobuf::uint64 size() const;
- inline void set_size(::google::protobuf::uint64 value);
-
- // optional bytes payload = 2;
- inline bool has_payload() const;
- inline void clear_payload();
- static const int kPayloadFieldNumber = 2;
- inline const ::std::string& payload() const;
- inline void set_payload(const ::std::string& value);
- inline void set_payload(const char* value);
- inline void set_payload(const void* value, size_t size);
- inline ::std::string* mutable_payload();
-
- // @@protoc_insertion_point(class_scope:custom.rpc.Packet)
- private:
- ::google::protobuf::UnknownFieldSet _unknown_fields_;
- mutable int _cached_size_;
-
- ::google::protobuf::uint64 size_;
- ::std::string* payload_;
- static const ::std::string _default_payload_;
- friend void protobuf_AddDesc_custom_2frpc_2frpc_2eproto();
- friend void protobuf_AssignDesc_custom_2frpc_2frpc_2eproto();
- friend void protobuf_ShutdownFile_custom_2frpc_2frpc_2eproto();
-
- ::google::protobuf::uint32 _has_bits_[(2 + 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 Packet* default_instance_;
- };
- // ===================================================================
- // ===================================================================
- // Packet
- // required uint64 size = 1;
- inline bool Packet::has_size() const {
- return _has_bit(0);
- }
- inline void Packet::clear_size() {
- size_ = GOOGLE_ULONGLONG(0);
- _clear_bit(0);
- }
- inline ::google::protobuf::uint64 Packet::size() const {
- return size_;
- }
- inline void Packet::set_size(::google::protobuf::uint64 value) {
- _set_bit(0);
- size_ = value;
- }
- // optional bytes payload = 2;
- inline bool Packet::has_payload() const {
- return _has_bit(1);
- }
- inline void Packet::clear_payload() {
- if (payload_ != &_default_payload_) {
- payload_->clear();
- }
- _clear_bit(1);
- }
- inline const ::std::string& Packet::payload() const {
- return *payload_;
- }
- inline void Packet::set_payload(const ::std::string& value) {
- _set_bit(1);
- if (payload_ == &_default_payload_) {
- payload_ = new ::std::string;
- }
- payload_->assign(value);
- }
- inline void Packet::set_payload(const char* value) {
- _set_bit(1);
- if (payload_ == &_default_payload_) {
- payload_ = new ::std::string;
- }
- payload_->assign(value);
- }
- inline void Packet::set_payload(const void* value, size_t size) {
- _set_bit(1);
- if (payload_ == &_default_payload_) {
- payload_ = new ::std::string;
- }
- payload_->assign(reinterpret_cast<const char*>(value), size);
- }
- inline ::std::string* Packet::mutable_payload() {
- _set_bit(1);
- if (payload_ == &_default_payload_) {
- payload_ = new ::std::string;
- }
- return payload_;
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace rpc
- } // namespace custom
- #ifndef SWIG
- namespace google {
- namespace protobuf {
- } // namespace google
- } // namespace protobuf
- #endif // SWIG
- // @@protoc_insertion_point(global_scope)
- #endif // PROTOBUF_custom_2frpc_2frpc_2eproto__INCLUDED