예제 #1
0
int UpdateUserInfo::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional uint32 level = 1;
    if (has_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->level());
    }

    // optional uint32 experience = 2;
    if (has_experience()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->experience());
    }

    // optional uint32 winCount = 3 [default = 1];
    if (has_wincount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->wincount());
    }

    // optional float winRate = 4 [default = 1];
    if (has_winrate()) {
      total_size += 1 + 4;
    }

    // optional uint32 successionWinCount = 5;
    if (has_successionwincount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->successionwincount());
    }

    // optional int32 incomGolds = 6;
    if (has_incomgolds()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->incomgolds());
    }

    // optional int32 bureauExperience = 7;
    if (has_bureauexperience()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->bureauexperience());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
예제 #2
0
void UpdateUserInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional uint32 level = 1;
  if (has_level()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->level(), output);
  }

  // optional uint32 experience = 2;
  if (has_experience()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->experience(), output);
  }

  // optional uint32 winCount = 3 [default = 1];
  if (has_wincount()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->wincount(), output);
  }

  // optional float winRate = 4 [default = 1];
  if (has_winrate()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->winrate(), output);
  }

  // optional uint32 successionWinCount = 5;
  if (has_successionwincount()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->successionwincount(), output);
  }

  // optional int32 incomGolds = 6;
  if (has_incomgolds()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->incomgolds(), output);
  }

  // optional int32 bureauExperience = 7;
  if (has_bureauexperience()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->bureauexperience(), output);
  }

}
예제 #3
0
void UserBasicInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string uid = 1;
  if (has_uid()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->uid(), output);
  }

  // optional string name = 2;
  if (has_name()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->name(), output);
  }

  // optional uint32 level = 3 [default = 1];
  if (has_level()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->level(), output);
  }

  // optional uint32 style = 4;
  if (has_style()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->style(), output);
  }

  // optional uint32 winCount = 5;
  if (has_wincount()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->wincount(), output);
  }

  // optional uint32 loseCount = 6;
  if (has_losecount()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->losecount(), output);
  }

  // optional float winRate = 7;
  if (has_winrate()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->winrate(), output);
  }

  // optional .message.UserBasicInfo.EffectData effect = 8;
  if (has_effect()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      8, this->effect(), output);
  }

  // optional uint32 iconId = 9 [default = 6000];
  if (has_iconid()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->iconid(), output);
  }

  // optional uint32 successionWinCount = 10;
  if (has_successionwincount()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->successionwincount(), output);
  }

  // optional uint32 onceLong = 11;
  if (has_oncelong()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->oncelong(), output);
  }

  // optional uint64 maximum = 12;
  if (has_maximum()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(12, this->maximum(), output);
  }

  // optional uint64 totalTime = 13;
  if (has_totaltime()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(13, this->totaltime(), output);
  }

  // optional uint32 roundsPlayed = 14;
  if (has_roundsplayed()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(14, this->roundsplayed(), output);
  }

  // optional uint32 throwStones = 15;
  if (has_throwstones()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(15, this->throwstones(), output);
  }

  // optional uint32 thrownStones = 16;
  if (has_thrownstones()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(16, this->thrownstones(), output);
  }

  // optional uint32 colorCats = 17;
  if (has_colorcats()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(17, this->colorcats(), output);
  }

  // optional uint32 consumeGolds = 18;
  if (has_consumegolds()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(18, this->consumegolds(), output);
  }

  // optional uint32 consumeItems1 = 19;
  if (has_consumeitems1()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(19, this->consumeitems1(), output);
  }

  // optional uint32 consumeItems2 = 20;
  if (has_consumeitems2()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(20, this->consumeitems2(), output);
  }

  // optional uint32 consumeItems3 = 21;
  if (has_consumeitems3()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(21, this->consumeitems3(), output);
  }

  // optional uint32 consumeItems4 = 22;
  if (has_consumeitems4()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(22, this->consumeitems4(), output);
  }

  // optional uint32 golds = 23;
  if (has_golds()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(23, this->golds(), output);
  }

  // optional uint32 experience = 24;
  if (has_experience()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(24, this->experience(), output);
  }

  // optional uint32 maxExperience = 25 [default = 1];
  if (has_maxexperience()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(25, this->maxexperience(), output);
  }

  // repeated uint32 buyEquipFrame = 26;
  for (int i = 0; i < this->buyequipframe_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      26, this->buyequipframe(i), output);
  }

}
예제 #4
0
int RceUpdateProfile::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .MsgTransaction transaction = 1;
    if (has_transaction()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->transaction());
    }
    
    // optional string sku = 2;
    if (has_sku()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->sku());
    }
    
    // optional int32 value = 3;
    if (has_value()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->value());
    }
    
    // optional string key = 4;
    if (has_key()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->key());
    }
    
    // optional int32 planetId = 5;
    if (has_planetid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->planetid());
    }
    
    // optional string action = 6;
    if (has_action()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->action());
    }
    
    // optional int32 level = 7;
    if (has_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->level());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}
예제 #5
0
int UserBasicInfo::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string uid = 1;
    if (has_uid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->uid());
    }

    // optional string name = 2;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional uint32 level = 3 [default = 1];
    if (has_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->level());
    }

    // optional uint32 style = 4;
    if (has_style()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->style());
    }

    // optional uint32 winCount = 5;
    if (has_wincount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->wincount());
    }

    // optional uint32 loseCount = 6;
    if (has_losecount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->losecount());
    }

    // optional float winRate = 7;
    if (has_winrate()) {
      total_size += 1 + 4;
    }

    // optional .message.UserBasicInfo.EffectData effect = 8;
    if (has_effect()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->effect());
    }

  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional uint32 iconId = 9 [default = 6000];
    if (has_iconid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->iconid());
    }

    // optional uint32 successionWinCount = 10;
    if (has_successionwincount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->successionwincount());
    }

    // optional uint32 onceLong = 11;
    if (has_oncelong()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->oncelong());
    }

    // optional uint64 maximum = 12;
    if (has_maximum()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->maximum());
    }

    // optional uint64 totalTime = 13;
    if (has_totaltime()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->totaltime());
    }

    // optional uint32 roundsPlayed = 14;
    if (has_roundsplayed()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->roundsplayed());
    }

    // optional uint32 throwStones = 15;
    if (has_throwstones()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->throwstones());
    }

    // optional uint32 thrownStones = 16;
    if (has_thrownstones()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->thrownstones());
    }

  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    // optional uint32 colorCats = 17;
    if (has_colorcats()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->colorcats());
    }

    // optional uint32 consumeGolds = 18;
    if (has_consumegolds()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->consumegolds());
    }

    // optional uint32 consumeItems1 = 19;
    if (has_consumeitems1()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->consumeitems1());
    }

    // optional uint32 consumeItems2 = 20;
    if (has_consumeitems2()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->consumeitems2());
    }

    // optional uint32 consumeItems3 = 21;
    if (has_consumeitems3()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->consumeitems3());
    }

    // optional uint32 consumeItems4 = 22;
    if (has_consumeitems4()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->consumeitems4());
    }

    // optional uint32 golds = 23;
    if (has_golds()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->golds());
    }

    // optional uint32 experience = 24;
    if (has_experience()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->experience());
    }

  }
  if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    // optional uint32 maxExperience = 25 [default = 1];
    if (has_maxexperience()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->maxexperience());
    }

  }
  // repeated uint32 buyEquipFrame = 26;
  {
    int data_size = 0;
    for (int i = 0; i < this->buyequipframe_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->buyequipframe(i));
    }
    total_size += 2 * this->buyequipframe_size() + data_size;
  }

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}