Пример #1
0
int DriverStation::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required bool enabled = 1;
    if (has_enabled()) {
      total_size += 1 + 1;
    }

    // required .gazebo.msgs.DriverStation.State state = 2;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
    }

  }
  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;
}
Пример #2
0
::google::protobuf::uint8* tictacpacket::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:tictac.tictacpacket)
  // required int32 Ipv4 = 1;
  if (has_ipv4()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->ipv4(), target);
  }

  // required .tictac.tictacpacket.MsgType msgType = 2;
  if (has_msgtype()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->msgtype(), target);
  }

  // optional string playerName = 3;
  if (has_playername()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->playername().data(), this->playername().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "playername");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->playername(), target);
  }

  // optional string state = 4;
  if (has_state()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->state().data(), this->state().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "state");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->state(), target);
  }

  // optional int32 Ipv4Opp = 5;
  if (has_ipv4opp()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->ipv4opp(), target);
  }

  // optional .tictac.tictacpacket.EndType endType = 6;
  if (has_endtype()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      6, this->endtype(), target);
  }

  // optional int32 nPos = 7;
  if (has_npos()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->npos(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tictac.tictacpacket)
  return target;
}
Пример #3
0
void RemoveFriendResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required .message.RemoveFriendResponse.State state = 1;
  if (has_state()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->state(), output);
  }

}
Пример #4
0
void tictacpacket::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:tictac.tictacpacket)
  // required int32 Ipv4 = 1;
  if (has_ipv4()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->ipv4(), output);
  }

  // required .tictac.tictacpacket.MsgType msgType = 2;
  if (has_msgtype()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->msgtype(), output);
  }

  // optional string playerName = 3;
  if (has_playername()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->playername().data(), this->playername().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "playername");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->playername(), output);
  }

  // optional string state = 4;
  if (has_state()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->state().data(), this->state().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "state");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->state(), output);
  }

  // optional int32 Ipv4Opp = 5;
  if (has_ipv4opp()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->ipv4opp(), output);
  }

  // optional .tictac.tictacpacket.EndType endType = 6;
  if (has_endtype()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      6, this->endtype(), output);
  }

  // optional int32 nPos = 7;
  if (has_npos()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->npos(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:tictac.tictacpacket)
}
Пример #5
0
int RemoveFriendResponse::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required .message.RemoveFriendResponse.State state = 1;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
Пример #6
0
void DriverStation::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required bool enabled = 1;
  if (has_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output);
  }

  // required .gazebo.msgs.DriverStation.State state = 2;
  if (has_state()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->state(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}
Пример #7
0
::google::protobuf::uint8* DriverStation::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required bool enabled = 1;
  if (has_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target);
  }

  // required .gazebo.msgs.DriverStation.State state = 2;
  if (has_state()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->state(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}
Пример #8
0
void tictacpacket::Clear() {
  if (_has_bits_[0 / 32] & 127) {
    ipv4_ = 0;
    msgtype_ = 1;
    if (has_playername()) {
      if (playername_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        playername_->clear();
      }
    }
    if (has_state()) {
      if (state_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        state_->clear();
      }
    }
    ipv4opp_ = 0;
    endtype_ = 1;
    npos_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}
Пример #9
0
int tictacpacket::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 Ipv4 = 1;
    if (has_ipv4()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->ipv4());
    }

    // required .tictac.tictacpacket.MsgType msgType = 2;
    if (has_msgtype()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->msgtype());
    }

    // optional string playerName = 3;
    if (has_playername()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->playername());
    }

    // optional string state = 4;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->state());
    }

    // optional int32 Ipv4Opp = 5;
    if (has_ipv4opp()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->ipv4opp());
    }

    // optional .tictac.tictacpacket.EndType endType = 6;
    if (has_endtype()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->endtype());
    }

    // optional int32 nPos = 7;
    if (has_npos()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->npos());
    }

  }
  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;
}