github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/c-deps/libroach/protos/util/unresolved_addr.pb.cc (about)

     1  // Generated by the protocol buffer compiler.  DO NOT EDIT!
     2  // source: util/unresolved_addr.proto
     3  
     4  #include "util/unresolved_addr.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/io/zero_copy_stream_impl_lite.h>
    13  // This is a temporary google only hack
    14  #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
    15  #include "third_party/protobuf/version.h"
    16  #endif
    17  // @@protoc_insertion_point(includes)
    18  
    19  namespace cockroach {
    20  namespace util {
    21  class UnresolvedAddrDefaultTypeInternal {
    22   public:
    23    ::google::protobuf::internal::ExplicitlyConstructed<UnresolvedAddr>
    24        _instance;
    25  } _UnresolvedAddr_default_instance_;
    26  }  // namespace util
    27  }  // namespace cockroach
    28  namespace protobuf_util_2funresolved_5faddr_2eproto {
    29  static void InitDefaultsUnresolvedAddr() {
    30    GOOGLE_PROTOBUF_VERIFY_VERSION;
    31  
    32    {
    33      void* ptr = &::cockroach::util::_UnresolvedAddr_default_instance_;
    34      new (ptr) ::cockroach::util::UnresolvedAddr();
    35      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
    36    }
    37    ::cockroach::util::UnresolvedAddr::InitAsDefaultInstance();
    38  }
    39  
    40  ::google::protobuf::internal::SCCInfo<0> scc_info_UnresolvedAddr =
    41      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUnresolvedAddr}, {}};
    42  
    43  void InitDefaults() {
    44    ::google::protobuf::internal::InitSCC(&scc_info_UnresolvedAddr.base);
    45  }
    46  
    47  }  // namespace protobuf_util_2funresolved_5faddr_2eproto
    48  namespace cockroach {
    49  namespace util {
    50  
    51  // ===================================================================
    52  
    53  void UnresolvedAddr::InitAsDefaultInstance() {
    54  }
    55  #if !defined(_MSC_VER) || _MSC_VER >= 1900
    56  const int UnresolvedAddr::kNetworkFieldFieldNumber;
    57  const int UnresolvedAddr::kAddressFieldFieldNumber;
    58  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
    59  
    60  UnresolvedAddr::UnresolvedAddr()
    61    : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
    62    ::google::protobuf::internal::InitSCC(
    63        &protobuf_util_2funresolved_5faddr_2eproto::scc_info_UnresolvedAddr.base);
    64    SharedCtor();
    65    // @@protoc_insertion_point(constructor:cockroach.util.UnresolvedAddr)
    66  }
    67  UnresolvedAddr::UnresolvedAddr(const UnresolvedAddr& from)
    68    : ::google::protobuf::MessageLite(),
    69        _internal_metadata_(NULL),
    70        _has_bits_(from._has_bits_) {
    71    _internal_metadata_.MergeFrom(from._internal_metadata_);
    72    network_field_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    73    if (from.has_network_field()) {
    74      network_field_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.network_field_);
    75    }
    76    address_field_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    77    if (from.has_address_field()) {
    78      address_field_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.address_field_);
    79    }
    80    // @@protoc_insertion_point(copy_constructor:cockroach.util.UnresolvedAddr)
    81  }
    82  
    83  void UnresolvedAddr::SharedCtor() {
    84    network_field_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    85    address_field_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    86  }
    87  
    88  UnresolvedAddr::~UnresolvedAddr() {
    89    // @@protoc_insertion_point(destructor:cockroach.util.UnresolvedAddr)
    90    SharedDtor();
    91  }
    92  
    93  void UnresolvedAddr::SharedDtor() {
    94    network_field_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    95    address_field_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    96  }
    97  
    98  void UnresolvedAddr::SetCachedSize(int size) const {
    99    _cached_size_.Set(size);
   100  }
   101  const UnresolvedAddr& UnresolvedAddr::default_instance() {
   102    ::google::protobuf::internal::InitSCC(&protobuf_util_2funresolved_5faddr_2eproto::scc_info_UnresolvedAddr.base);
   103    return *internal_default_instance();
   104  }
   105  
   106  
   107  void UnresolvedAddr::Clear() {
   108  // @@protoc_insertion_point(message_clear_start:cockroach.util.UnresolvedAddr)
   109    ::google::protobuf::uint32 cached_has_bits = 0;
   110    // Prevent compiler warnings about cached_has_bits being unused
   111    (void) cached_has_bits;
   112  
   113    cached_has_bits = _has_bits_[0];
   114    if (cached_has_bits & 3u) {
   115      if (cached_has_bits & 0x00000001u) {
   116        network_field_.ClearNonDefaultToEmptyNoArena();
   117      }
   118      if (cached_has_bits & 0x00000002u) {
   119        address_field_.ClearNonDefaultToEmptyNoArena();
   120      }
   121    }
   122    _has_bits_.Clear();
   123    _internal_metadata_.Clear();
   124  }
   125  
   126  bool UnresolvedAddr::MergePartialFromCodedStream(
   127      ::google::protobuf::io::CodedInputStream* input) {
   128  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
   129    ::google::protobuf::uint32 tag;
   130    ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
   131        &_internal_metadata_);
   132    ::google::protobuf::io::StringOutputStream unknown_fields_output(
   133        unknown_fields_setter.buffer());
   134    ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
   135        &unknown_fields_output, false);
   136    // @@protoc_insertion_point(parse_start:cockroach.util.UnresolvedAddr)
   137    for (;;) {
   138      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
   139      tag = p.first;
   140      if (!p.second) goto handle_unusual;
   141      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
   142        case 1: {
   143          if (static_cast< ::google::protobuf::uint8>(tag) ==
   144              static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
   145            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   146                  input, this->mutable_network_field()));
   147          } else {
   148            goto handle_unusual;
   149          }
   150          break;
   151        }
   152  
   153        case 2: {
   154          if (static_cast< ::google::protobuf::uint8>(tag) ==
   155              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
   156            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   157                  input, this->mutable_address_field()));
   158          } else {
   159            goto handle_unusual;
   160          }
   161          break;
   162        }
   163  
   164        default: {
   165        handle_unusual:
   166          if (tag == 0) {
   167            goto success;
   168          }
   169          DO_(::google::protobuf::internal::WireFormatLite::SkipField(
   170              input, tag, &unknown_fields_stream));
   171          break;
   172        }
   173      }
   174    }
   175  success:
   176    // @@protoc_insertion_point(parse_success:cockroach.util.UnresolvedAddr)
   177    return true;
   178  failure:
   179    // @@protoc_insertion_point(parse_failure:cockroach.util.UnresolvedAddr)
   180    return false;
   181  #undef DO_
   182  }
   183  
   184  void UnresolvedAddr::SerializeWithCachedSizes(
   185      ::google::protobuf::io::CodedOutputStream* output) const {
   186    // @@protoc_insertion_point(serialize_start:cockroach.util.UnresolvedAddr)
   187    ::google::protobuf::uint32 cached_has_bits = 0;
   188    (void) cached_has_bits;
   189  
   190    cached_has_bits = _has_bits_[0];
   191    if (cached_has_bits & 0x00000001u) {
   192      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   193        1, this->network_field(), output);
   194    }
   195  
   196    if (cached_has_bits & 0x00000002u) {
   197      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   198        2, this->address_field(), output);
   199    }
   200  
   201    output->WriteRaw(_internal_metadata_.unknown_fields().data(),
   202                     static_cast<int>(_internal_metadata_.unknown_fields().size()));
   203    // @@protoc_insertion_point(serialize_end:cockroach.util.UnresolvedAddr)
   204  }
   205  
   206  size_t UnresolvedAddr::ByteSizeLong() const {
   207  // @@protoc_insertion_point(message_byte_size_start:cockroach.util.UnresolvedAddr)
   208    size_t total_size = 0;
   209  
   210    total_size += _internal_metadata_.unknown_fields().size();
   211  
   212    if (_has_bits_[0 / 32] & 3u) {
   213      if (has_network_field()) {
   214        total_size += 1 +
   215          ::google::protobuf::internal::WireFormatLite::StringSize(
   216            this->network_field());
   217      }
   218  
   219      if (has_address_field()) {
   220        total_size += 1 +
   221          ::google::protobuf::internal::WireFormatLite::StringSize(
   222            this->address_field());
   223      }
   224  
   225    }
   226    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   227    SetCachedSize(cached_size);
   228    return total_size;
   229  }
   230  
   231  void UnresolvedAddr::CheckTypeAndMergeFrom(
   232      const ::google::protobuf::MessageLite& from) {
   233    MergeFrom(*::google::protobuf::down_cast<const UnresolvedAddr*>(&from));
   234  }
   235  
   236  void UnresolvedAddr::MergeFrom(const UnresolvedAddr& from) {
   237  // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.util.UnresolvedAddr)
   238    GOOGLE_DCHECK_NE(&from, this);
   239    _internal_metadata_.MergeFrom(from._internal_metadata_);
   240    ::google::protobuf::uint32 cached_has_bits = 0;
   241    (void) cached_has_bits;
   242  
   243    cached_has_bits = from._has_bits_[0];
   244    if (cached_has_bits & 3u) {
   245      if (cached_has_bits & 0x00000001u) {
   246        set_has_network_field();
   247        network_field_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.network_field_);
   248      }
   249      if (cached_has_bits & 0x00000002u) {
   250        set_has_address_field();
   251        address_field_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.address_field_);
   252      }
   253    }
   254  }
   255  
   256  void UnresolvedAddr::CopyFrom(const UnresolvedAddr& from) {
   257  // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.util.UnresolvedAddr)
   258    if (&from == this) return;
   259    Clear();
   260    MergeFrom(from);
   261  }
   262  
   263  bool UnresolvedAddr::IsInitialized() const {
   264    return true;
   265  }
   266  
   267  void UnresolvedAddr::Swap(UnresolvedAddr* other) {
   268    if (other == this) return;
   269    InternalSwap(other);
   270  }
   271  void UnresolvedAddr::InternalSwap(UnresolvedAddr* other) {
   272    using std::swap;
   273    network_field_.Swap(&other->network_field_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   274      GetArenaNoVirtual());
   275    address_field_.Swap(&other->address_field_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   276      GetArenaNoVirtual());
   277    swap(_has_bits_[0], other->_has_bits_[0]);
   278    _internal_metadata_.Swap(&other->_internal_metadata_);
   279  }
   280  
   281  ::std::string UnresolvedAddr::GetTypeName() const {
   282    return "cockroach.util.UnresolvedAddr";
   283  }
   284  
   285  
   286  // @@protoc_insertion_point(namespace_scope)
   287  }  // namespace util
   288  }  // namespace cockroach
   289  namespace google {
   290  namespace protobuf {
   291  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::util::UnresolvedAddr* Arena::CreateMaybeMessage< ::cockroach::util::UnresolvedAddr >(Arena* arena) {
   292    return Arena::CreateInternal< ::cockroach::util::UnresolvedAddr >(arena);
   293  }
   294  }  // namespace protobuf
   295  }  // namespace google
   296  
   297  // @@protoc_insertion_point(global_scope)