int SetRobotMaintenance::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required uint32 robot_number = 1; if (has_robot_number()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::UInt32Size( this->robot_number()); } // required bool maintenance = 3; if (has_maintenance()) { total_size += 1 + 1; } // required .llsf_msgs.Team team_color = 4; if (has_team_color()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->team_color()); } } 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; }
void SetRobotMaintenance::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // required uint32 robot_number = 1; if (has_robot_number()) { ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->robot_number(), output); } // required bool maintenance = 3; if (has_maintenance()) { ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->maintenance(), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } }
::google::protobuf::uint8* SetRobotMaintenance::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // required uint32 robot_number = 1; if (has_robot_number()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->robot_number(), target); } // required bool maintenance = 3; if (has_maintenance()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->maintenance(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target; }