github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/fs/proto/state.pb.cc (about)

     1  // Generated by the protocol buffer compiler.  DO NOT EDIT!
     2  // source: state.proto
     3  
     4  #include "state.pb.h"
     5  
     6  #include <algorithm>
     7  
     8  #include <google/protobuf/stubs/common.h>
     9  #include <google/protobuf/stubs/port.h>
    10  #include <google/protobuf/io/coded_stream.h>
    11  #include <google/protobuf/wire_format_lite_inl.h>
    12  #include <google/protobuf/descriptor.h>
    13  #include <google/protobuf/generated_message_reflection.h>
    14  #include <google/protobuf/reflection_ops.h>
    15  #include <google/protobuf/wire_format.h>
    16  // This is a temporary google only hack
    17  #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
    18  #include "third_party/protobuf/version.h"
    19  #endif
    20  // @@protoc_insertion_point(includes)
    21  
    22  namespace consensuspb {
    23  class ConsensusRootDefaultTypeInternal {
    24   public:
    25    ::google::protobuf::internal::ExplicitlyConstructed<ConsensusRoot>
    26        _instance;
    27  } _ConsensusRoot_default_instance_;
    28  }  // namespace consensuspb
    29  namespace protobuf_state_2eproto {
    30  static void InitDefaultsConsensusRoot() {
    31    GOOGLE_PROTOBUF_VERIFY_VERSION;
    32  
    33    {
    34      void* ptr = &::consensuspb::_ConsensusRoot_default_instance_;
    35      new (ptr) ::consensuspb::ConsensusRoot();
    36      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
    37    }
    38    ::consensuspb::ConsensusRoot::InitAsDefaultInstance();
    39  }
    40  
    41  ::google::protobuf::internal::SCCInfo<0> scc_info_ConsensusRoot =
    42      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsConsensusRoot}, {}};
    43  
    44  void InitDefaults() {
    45    ::google::protobuf::internal::InitSCC(&scc_info_ConsensusRoot.base);
    46  }
    47  
    48  ::google::protobuf::Metadata file_level_metadata[1];
    49  
    50  const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    51    ~0u,  // no _has_bits_
    52    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::consensuspb::ConsensusRoot, _internal_metadata_),
    53    ~0u,  // no _extensions_
    54    ~0u,  // no _oneof_case_
    55    ~0u,  // no _weak_field_map_
    56    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::consensuspb::ConsensusRoot, timestamp_),
    57    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::consensuspb::ConsensusRoot, proposer_),
    58    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::consensuspb::ConsensusRoot, dynasty_root_),
    59  };
    60  static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    61    { 0, -1, sizeof(::consensuspb::ConsensusRoot)},
    62  };
    63  
    64  static ::google::protobuf::Message const * const file_default_instances[] = {
    65    reinterpret_cast<const ::google::protobuf::Message*>(&::consensuspb::_ConsensusRoot_default_instance_),
    66  };
    67  
    68  void protobuf_AssignDescriptors() {
    69    AddDescriptors();
    70    AssignDescriptors(
    71        "state.proto", schemas, file_default_instances, TableStruct::offsets,
    72        file_level_metadata, NULL, NULL);
    73  }
    74  
    75  void protobuf_AssignDescriptorsOnce() {
    76    static ::google::protobuf::internal::once_flag once;
    77    ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
    78  }
    79  
    80  void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
    81  void protobuf_RegisterTypes(const ::std::string&) {
    82    protobuf_AssignDescriptorsOnce();
    83    ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
    84  }
    85  
    86  void AddDescriptorsImpl() {
    87    InitDefaults();
    88    static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    89        "\n\013state.proto\022\013consensuspb\"J\n\rConsensusR"
    90        "oot\022\021\n\ttimestamp\030\001 \001(\003\022\020\n\010proposer\030\002 \001(\014"
    91        "\022\024\n\014dynasty_root\030\003 \001(\014b\006proto3"
    92    };
    93    ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    94        descriptor, 110);
    95    ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    96      "state.proto", &protobuf_RegisterTypes);
    97  }
    98  
    99  void AddDescriptors() {
   100    static ::google::protobuf::internal::once_flag once;
   101    ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
   102  }
   103  // Force AddDescriptors() to be called at dynamic initialization time.
   104  struct StaticDescriptorInitializer {
   105    StaticDescriptorInitializer() {
   106      AddDescriptors();
   107    }
   108  } static_descriptor_initializer;
   109  }  // namespace protobuf_state_2eproto
   110  namespace consensuspb {
   111  
   112  // ===================================================================
   113  
   114  void ConsensusRoot::InitAsDefaultInstance() {
   115  }
   116  #if !defined(_MSC_VER) || _MSC_VER >= 1900
   117  const int ConsensusRoot::kTimestampFieldNumber;
   118  const int ConsensusRoot::kProposerFieldNumber;
   119  const int ConsensusRoot::kDynastyRootFieldNumber;
   120  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
   121  
   122  ConsensusRoot::ConsensusRoot()
   123    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
   124    ::google::protobuf::internal::InitSCC(
   125        &protobuf_state_2eproto::scc_info_ConsensusRoot.base);
   126    SharedCtor();
   127    // @@protoc_insertion_point(constructor:consensuspb.ConsensusRoot)
   128  }
   129  ConsensusRoot::ConsensusRoot(const ConsensusRoot& from)
   130    : ::google::protobuf::Message(),
   131        _internal_metadata_(NULL) {
   132    _internal_metadata_.MergeFrom(from._internal_metadata_);
   133    proposer_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   134    if (from.proposer().size() > 0) {
   135      proposer_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.proposer_);
   136    }
   137    dynasty_root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   138    if (from.dynasty_root().size() > 0) {
   139      dynasty_root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.dynasty_root_);
   140    }
   141    timestamp_ = from.timestamp_;
   142    // @@protoc_insertion_point(copy_constructor:consensuspb.ConsensusRoot)
   143  }
   144  
   145  void ConsensusRoot::SharedCtor() {
   146    proposer_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   147    dynasty_root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   148    timestamp_ = GOOGLE_LONGLONG(0);
   149  }
   150  
   151  ConsensusRoot::~ConsensusRoot() {
   152    // @@protoc_insertion_point(destructor:consensuspb.ConsensusRoot)
   153    SharedDtor();
   154  }
   155  
   156  void ConsensusRoot::SharedDtor() {
   157    proposer_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   158    dynasty_root_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   159  }
   160  
   161  void ConsensusRoot::SetCachedSize(int size) const {
   162    _cached_size_.Set(size);
   163  }
   164  const ::google::protobuf::Descriptor* ConsensusRoot::descriptor() {
   165    ::protobuf_state_2eproto::protobuf_AssignDescriptorsOnce();
   166    return ::protobuf_state_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
   167  }
   168  
   169  const ConsensusRoot& ConsensusRoot::default_instance() {
   170    ::google::protobuf::internal::InitSCC(&protobuf_state_2eproto::scc_info_ConsensusRoot.base);
   171    return *internal_default_instance();
   172  }
   173  
   174  
   175  void ConsensusRoot::Clear() {
   176  // @@protoc_insertion_point(message_clear_start:consensuspb.ConsensusRoot)
   177    ::google::protobuf::uint32 cached_has_bits = 0;
   178    // Prevent compiler warnings about cached_has_bits being unused
   179    (void) cached_has_bits;
   180  
   181    proposer_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   182    dynasty_root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   183    timestamp_ = GOOGLE_LONGLONG(0);
   184    _internal_metadata_.Clear();
   185  }
   186  
   187  bool ConsensusRoot::MergePartialFromCodedStream(
   188      ::google::protobuf::io::CodedInputStream* input) {
   189  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
   190    ::google::protobuf::uint32 tag;
   191    // @@protoc_insertion_point(parse_start:consensuspb.ConsensusRoot)
   192    for (;;) {
   193      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
   194      tag = p.first;
   195      if (!p.second) goto handle_unusual;
   196      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
   197        // int64 timestamp = 1;
   198        case 1: {
   199          if (static_cast< ::google::protobuf::uint8>(tag) ==
   200              static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
   201  
   202            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
   203                     ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
   204                   input, &timestamp_)));
   205          } else {
   206            goto handle_unusual;
   207          }
   208          break;
   209        }
   210  
   211        // bytes proposer = 2;
   212        case 2: {
   213          if (static_cast< ::google::protobuf::uint8>(tag) ==
   214              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
   215            DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
   216                  input, this->mutable_proposer()));
   217          } else {
   218            goto handle_unusual;
   219          }
   220          break;
   221        }
   222  
   223        // bytes dynasty_root = 3;
   224        case 3: {
   225          if (static_cast< ::google::protobuf::uint8>(tag) ==
   226              static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
   227            DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
   228                  input, this->mutable_dynasty_root()));
   229          } else {
   230            goto handle_unusual;
   231          }
   232          break;
   233        }
   234  
   235        default: {
   236        handle_unusual:
   237          if (tag == 0) {
   238            goto success;
   239          }
   240          DO_(::google::protobuf::internal::WireFormat::SkipField(
   241                input, tag, _internal_metadata_.mutable_unknown_fields()));
   242          break;
   243        }
   244      }
   245    }
   246  success:
   247    // @@protoc_insertion_point(parse_success:consensuspb.ConsensusRoot)
   248    return true;
   249  failure:
   250    // @@protoc_insertion_point(parse_failure:consensuspb.ConsensusRoot)
   251    return false;
   252  #undef DO_
   253  }
   254  
   255  void ConsensusRoot::SerializeWithCachedSizes(
   256      ::google::protobuf::io::CodedOutputStream* output) const {
   257    // @@protoc_insertion_point(serialize_start:consensuspb.ConsensusRoot)
   258    ::google::protobuf::uint32 cached_has_bits = 0;
   259    (void) cached_has_bits;
   260  
   261    // int64 timestamp = 1;
   262    if (this->timestamp() != 0) {
   263      ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->timestamp(), output);
   264    }
   265  
   266    // bytes proposer = 2;
   267    if (this->proposer().size() > 0) {
   268      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
   269        2, this->proposer(), output);
   270    }
   271  
   272    // bytes dynasty_root = 3;
   273    if (this->dynasty_root().size() > 0) {
   274      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
   275        3, this->dynasty_root(), output);
   276    }
   277  
   278    if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
   279      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
   280          (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
   281    }
   282    // @@protoc_insertion_point(serialize_end:consensuspb.ConsensusRoot)
   283  }
   284  
   285  ::google::protobuf::uint8* ConsensusRoot::InternalSerializeWithCachedSizesToArray(
   286      bool deterministic, ::google::protobuf::uint8* target) const {
   287    (void)deterministic; // Unused
   288    // @@protoc_insertion_point(serialize_to_array_start:consensuspb.ConsensusRoot)
   289    ::google::protobuf::uint32 cached_has_bits = 0;
   290    (void) cached_has_bits;
   291  
   292    // int64 timestamp = 1;
   293    if (this->timestamp() != 0) {
   294      target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->timestamp(), target);
   295    }
   296  
   297    // bytes proposer = 2;
   298    if (this->proposer().size() > 0) {
   299      target =
   300        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
   301          2, this->proposer(), target);
   302    }
   303  
   304    // bytes dynasty_root = 3;
   305    if (this->dynasty_root().size() > 0) {
   306      target =
   307        ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
   308          3, this->dynasty_root(), target);
   309    }
   310  
   311    if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
   312      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
   313          (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
   314    }
   315    // @@protoc_insertion_point(serialize_to_array_end:consensuspb.ConsensusRoot)
   316    return target;
   317  }
   318  
   319  size_t ConsensusRoot::ByteSizeLong() const {
   320  // @@protoc_insertion_point(message_byte_size_start:consensuspb.ConsensusRoot)
   321    size_t total_size = 0;
   322  
   323    if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
   324      total_size +=
   325        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
   326          (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
   327    }
   328    // bytes proposer = 2;
   329    if (this->proposer().size() > 0) {
   330      total_size += 1 +
   331        ::google::protobuf::internal::WireFormatLite::BytesSize(
   332          this->proposer());
   333    }
   334  
   335    // bytes dynasty_root = 3;
   336    if (this->dynasty_root().size() > 0) {
   337      total_size += 1 +
   338        ::google::protobuf::internal::WireFormatLite::BytesSize(
   339          this->dynasty_root());
   340    }
   341  
   342    // int64 timestamp = 1;
   343    if (this->timestamp() != 0) {
   344      total_size += 1 +
   345        ::google::protobuf::internal::WireFormatLite::Int64Size(
   346          this->timestamp());
   347    }
   348  
   349    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   350    SetCachedSize(cached_size);
   351    return total_size;
   352  }
   353  
   354  void ConsensusRoot::MergeFrom(const ::google::protobuf::Message& from) {
   355  // @@protoc_insertion_point(generalized_merge_from_start:consensuspb.ConsensusRoot)
   356    GOOGLE_DCHECK_NE(&from, this);
   357    const ConsensusRoot* source =
   358        ::google::protobuf::internal::DynamicCastToGenerated<const ConsensusRoot>(
   359            &from);
   360    if (source == NULL) {
   361    // @@protoc_insertion_point(generalized_merge_from_cast_fail:consensuspb.ConsensusRoot)
   362      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
   363    } else {
   364    // @@protoc_insertion_point(generalized_merge_from_cast_success:consensuspb.ConsensusRoot)
   365      MergeFrom(*source);
   366    }
   367  }
   368  
   369  void ConsensusRoot::MergeFrom(const ConsensusRoot& from) {
   370  // @@protoc_insertion_point(class_specific_merge_from_start:consensuspb.ConsensusRoot)
   371    GOOGLE_DCHECK_NE(&from, this);
   372    _internal_metadata_.MergeFrom(from._internal_metadata_);
   373    ::google::protobuf::uint32 cached_has_bits = 0;
   374    (void) cached_has_bits;
   375  
   376    if (from.proposer().size() > 0) {
   377  
   378      proposer_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.proposer_);
   379    }
   380    if (from.dynasty_root().size() > 0) {
   381  
   382      dynasty_root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.dynasty_root_);
   383    }
   384    if (from.timestamp() != 0) {
   385      set_timestamp(from.timestamp());
   386    }
   387  }
   388  
   389  void ConsensusRoot::CopyFrom(const ::google::protobuf::Message& from) {
   390  // @@protoc_insertion_point(generalized_copy_from_start:consensuspb.ConsensusRoot)
   391    if (&from == this) return;
   392    Clear();
   393    MergeFrom(from);
   394  }
   395  
   396  void ConsensusRoot::CopyFrom(const ConsensusRoot& from) {
   397  // @@protoc_insertion_point(class_specific_copy_from_start:consensuspb.ConsensusRoot)
   398    if (&from == this) return;
   399    Clear();
   400    MergeFrom(from);
   401  }
   402  
   403  bool ConsensusRoot::IsInitialized() const {
   404    return true;
   405  }
   406  
   407  void ConsensusRoot::Swap(ConsensusRoot* other) {
   408    if (other == this) return;
   409    InternalSwap(other);
   410  }
   411  void ConsensusRoot::InternalSwap(ConsensusRoot* other) {
   412    using std::swap;
   413    proposer_.Swap(&other->proposer_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   414      GetArenaNoVirtual());
   415    dynasty_root_.Swap(&other->dynasty_root_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   416      GetArenaNoVirtual());
   417    swap(timestamp_, other->timestamp_);
   418    _internal_metadata_.Swap(&other->_internal_metadata_);
   419  }
   420  
   421  ::google::protobuf::Metadata ConsensusRoot::GetMetadata() const {
   422    protobuf_state_2eproto::protobuf_AssignDescriptorsOnce();
   423    return ::protobuf_state_2eproto::file_level_metadata[kIndexInFileMessages];
   424  }
   425  
   426  
   427  // @@protoc_insertion_point(namespace_scope)
   428  }  // namespace consensuspb
   429  namespace google {
   430  namespace protobuf {
   431  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::consensuspb::ConsensusRoot* Arena::CreateMaybeMessage< ::consensuspb::ConsensusRoot >(Arena* arena) {
   432    return Arena::CreateInternal< ::consensuspb::ConsensusRoot >(arena);
   433  }
   434  }  // namespace protobuf
   435  }  // namespace google
   436  
   437  // @@protoc_insertion_point(global_scope)