gpg:: ParticipantResults
#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)
|
|
パブリック関数
HasResultsForParticipant
bool HasResultsForParticipant( const std::string & participant_id ) const
この ParticipantResults オブジェクトに指定された MultiplayerParticipant の結果が含まれている場合は true を返します。
この関数を使用できるようにするには、Valid が true を返す必要があります。
MatchResultForParticipant
MatchResult MatchResultForParticipant( const std::string & participant_id ) const
TurnBasedMatch 内の指定された参加者の MatchResult を返します。
すべての参加者に MatchResult が存在するとは限りません。HasResultsForParticipant が true を返さない場合、この関数は MatchResult::NONE を返します。この関数を使用できるようにするには、Valid が true を返す必要があります。
ParticipantResults
ParticipantResults()
ParticipantResults
ParticipantResults( std::shared_ptr< const ParticipantResultsImpl > impl )
shared_ptr から ParticipantResultsImpl に ParticipantResults オブジェクトを構築します。
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 を返します。この関数を使用できるようにするには、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 回のみ設定できます。複数の結果を設定しようとすると、エラーがログに記録され、ParticipantResults は変更されません。この関数を使用できるようにするには、Valid が true を返す必要があります。
| 詳細 | |||||||
|---|---|---|---|---|---|---|---|
| パラメータ |
|
||||||
operator=
ParticipantResults & operator=( const ParticipantResults & copy_from )
この ParticipantResults オブジェクトを別のオブジェクトから割り当てます。
operator=
ParticipantResults & operator=( ParticipantResults && move_from )
別の ParticipantResults オブジェクトをこの ParticipantResults オブジェクトに移動して、この ParticipantResults オブジェクトを割り当てます。