gpg:: 参加者の結果
#include <participant_results.h>
TurnBasedMatch
の参加者ごとの結果に関するデータを含むデータ構造。
まとめ
コンストラクタとデストラクタ |
|
---|---|
ParticipantResults()
|
|
ParticipantResults(std::shared_ptr< const ParticipantResultsImpl > impl)
|
|
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 オブジェクトを別のオブジェクトに移動して、割り当てます。 |
パブリック関数
HasResultsFor 参加者
bool HasResultsForParticipant( const std::string & participant_id ) const
この ParticipantResults
オブジェクトが、指定された MultiplayerParticipant
に対する結果を持っている場合、true を返します。
この関数を使用するには、Valid が true を返す必要があります。
MatchResultFor 参加者
MatchResult MatchResultForParticipant( const std::string & participant_id ) const
TurnBasedMatch
内の指定された参加者の MatchResult
を返します。
すべての参加者が MatchResult を持つとは限りません。HasResultsFor 参加者が true を返さない場合、この関数は MatchResult::NONE
を返します。この関数を使用するには、Valid が true を返す必要があります。
参加者の結果
ParticipantResults()
参加者の結果
ParticipantResults( std::shared_ptr< const ParticipantResultsImpl > impl )
shared_ptr
から ParticipantResultsImpl
への ParticipantResults
オブジェクトを作成します。
API による内部使用向け。
参加者の結果
ParticipantResults( const ParticipantResults & copy_from )
既存の ParticipantResults
オブジェクトのコピーを作成します。
PlaceFor 参加者
uint32_t PlaceForParticipant( const std::string & participant_id ) const
TurnBasedMatch
内の指定した参加者の配置を返します。
すべての参加者が結果を取得できるとは限りません。HasResultsFor 参加者が true を返さない場合、この関数はまだランキングが完了していないプレーヤーに対して 0 を返します。この関数を使用するには、Valid が true を返す必要があります。
有効
bool Valid() const
この ParticipantResults
オブジェクトにデータが入力されている場合、true を返します。
この ParticipantResults
オブジェクトのゲッター関数(PlaceForParticipant
、MatchResultForParticipant
など)を使用できるようにするには、true にする必要があります。
WithResult
ParticipantResults WithResult( const std::string & participant_id, uint32_t placing, MatchResult result ) const
すべての既存の結果と、この関数に渡される追加の結果データを含む ParticipantResults
を新しく作成します。
結果は、参加者 1 人につき 1 回のみ設定できます。複数の結果を設定しようとすると、エラーがログに記録され、ParticipantResults
は変更されません。この関数を使用するには、Valid が true を返す必要があります。
詳細 | |||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
operator=
ParticipantResults & operator=( const ParticipantResults & copy_from )
この ParticipantResults
オブジェクトを別のオブジェクトから割り当てます。
operator=
ParticipantResults & operator=( ParticipantResults && move_from )
この ParticipantResults
オブジェクトを別のオブジェクトに移動して、割り当てます。