gpg::ParticipantResults

#include <participant_results.h>

TurnBasedMatch의 참여자별 결과에 대한 데이터가 포함된 데이터 구조입니다.

요약

생성자 및 소멸자

ParticipantResults()
ParticipantResults(std::shared_ptr< const ParticipantResultsImpl > impl)
shared_ptr에서 ParticipantResultsImplParticipantResults 객체를 구성합니다.
ParticipantResults(const ParticipantResults & copy_from)
기존 ParticipantResults 객체의 사본을 만듭니다.
ParticipantResults(ParticipantResults && move_from)
기존 ParticipantResults 객체를 이동합니다.

공개 함수

HasResultsForParticipant(const std::string & participant_id) const
bool
ParticipantResults 객체에 지정된 MultiplayerParticipant의 결과가 있으면 true를 반환합니다.
MatchResultForParticipant(const std::string & participant_id) const
TurnBasedMatch 내 지정된 참가자의 MatchResult를 반환합니다.
PlaceForParticipant(const std::string & participant_id) const
uint32_t
TurnBasedMatch 내에서 지정된 참가자의 위치를 반환합니다.
Valid() const
bool
ParticipantResults 객체가 데이터로 채워지면 true를 반환합니다.
WithResult(const std::string & participant_id, uint32_t placing, MatchResult result) const
모든 기존 결과와 이 함수에 전달된 추가 결과 데이터를 포함하는 새 ParticipantResults를 만듭니다.
operator=(const ParticipantResults & copy_from)
다른 객체에서 이 ParticipantResults 객체를 할당합니다.
operator=(ParticipantResults && move_from)
다른 객체를 이 객체로 이동하여 이 ParticipantResults 객체를 할당합니다.

공개 함수

HasResultsForParticipant

bool HasResultsForParticipant(
  const std::string & participant_id
) const 

ParticipantResults 객체에 지정된 MultiplayerParticipant의 결과가 있으면 true를 반환합니다.

이 함수를 사용하려면 유효한 항목이 true를 반환해야 합니다.

MatchResultForParticipant

MatchResult MatchResultForParticipant(
  const std::string & participant_id
) const 

TurnBasedMatch 내 지정된 참가자의 MatchResult를 반환합니다.

일부 참가자에게 MatchResult가 없는 경우도 있습니다. HasResultsForParticipant가 true를 반환하지 않으면 이 함수는 MatchResult::NONE를 반환합니다. 이 함수를 사용하려면 유효한 항목이 true를 반환해야 합니다.

ParticipantResults

 ParticipantResults()

ParticipantResults

 ParticipantResults(
  std::shared_ptr< const ParticipantResultsImpl > impl
)

shared_ptr에서 ParticipantResultsImplParticipantResults 객체를 구성합니다.

API의 내부용으로 사용됩니다.

ParticipantResults

 ParticipantResults(
  const ParticipantResults & copy_from
)

기존 ParticipantResults 객체의 사본을 만듭니다.

ParticipantResults

 ParticipantResults(
  ParticipantResults && move_from
)

기존 ParticipantResults 객체를 이동합니다.

PlaceForParticipant

uint32_t PlaceForParticipant(
  const std::string & participant_id
) const 

TurnBasedMatch 내에서 지정된 참가자의 위치를 반환합니다.

일부 참가자만 결과를 얻을 수 있습니다. HasResultsForParticipant가 true를 반환하지 않으면 이 함수는 아직 순위가 지정되지 않은 플레이어에 0을 반환합니다. 이 함수를 사용하려면 유효한 항목이 true를 반환해야 합니다.

유효

bool Valid() const 

ParticipantResults 객체가 데이터로 채워지면 true를 반환합니다.

ParticipantResults 객체의 getter 함수 (PlaceForParticipant, MatchResultForParticipant 등)를 사용하려면 true여야 합니다.

WithResult

ParticipantResults WithResult(
  const std::string & participant_id,
  uint32_t placing,
  MatchResult result
) const 

모든 기존 결과와 이 함수에 전달된 추가 결과 데이터를 포함하는 새 ParticipantResults를 만듭니다.

결과는 참여자당 한 번만 설정할 수 있습니다. 결과를 두 개 이상 설정하려고 하면 오류가 로깅되고 ParticipantResults이 수정되지 않은 상태로 유지됩니다. 이 함수를 사용하려면 유효한 항목이 true를 반환해야 합니다.

세부정보
매개변수
participant_id
결과를 추가할 MultiplayerParticipant입니다.
placing
경기에서 참가자의 자리입니다.
result
경기 내 참가자의 MatchResult입니다.

연산자=

ParticipantResults & operator=(
  const ParticipantResults & copy_from
)

다른 객체에서 이 ParticipantResults 객체를 할당합니다.

연산자=

ParticipantResults & operator=(
  ParticipantResults && move_from
)

다른 객체를 이 객체로 이동하여 이 ParticipantResults 객체를 할당합니다.