Пример #1
0
::google::protobuf::uint8* MFNHashFileSaltedProtobuf::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional uint32 hash_length_bytes = 1;
  if (has_hash_length_bytes()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->hash_length_bytes(), target);
  }
  
  // optional uint32 salt_length_bytes = 2;
  if (has_salt_length_bytes()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->salt_length_bytes(), target);
  }
  
  // repeated .MFNHashFileSaltedProtobuf.SaltedHash salted_hash_value = 3;
  for (int i = 0; i < this->salted_hash_value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        3, this->salted_hash_value(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}
Пример #2
0
int MFNHashFilePlainProtobuf::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional uint32 hash_length_bytes = 1;
    if (has_hash_length_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->hash_length_bytes());
    }
    
  }
  // repeated string hash_value = 2;
  total_size += 1 * this->hash_value_size();
  for (int i = 0; i < this->hash_value_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->hash_value(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
Пример #3
0
void MFNHashFilePlainProtobuf::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional uint32 hash_length_bytes = 1;
  if (has_hash_length_bytes()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->hash_length_bytes(), output);
  }
  
  // repeated bytes hash_value = 2;
  for (int i = 0; i < this->hash_value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      2, this->hash_value(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}
Пример #4
0
::google::protobuf::uint8* MFNHashFilePlainProtobuf::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional uint32 hash_length_bytes = 1;
  if (has_hash_length_bytes()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->hash_length_bytes(), target);
  }
  
  // repeated bytes hash_value = 2;
  for (int i = 0; i < this->hash_value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(2, this->hash_value(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}
Пример #5
0
void MFNHashFileSaltedProtobuf::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional uint32 hash_length_bytes = 1;
  if (has_hash_length_bytes()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->hash_length_bytes(), output);
  }
  
  // optional uint32 salt_length_bytes = 2;
  if (has_salt_length_bytes()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->salt_length_bytes(), output);
  }
  
  // repeated .MFNHashFileSaltedProtobuf.SaltedHash salted_hash_value = 3;
  for (int i = 0; i < this->salted_hash_value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->salted_hash_value(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}