gpg::ParticipantResults

#include <participant_results.h>

डेटा स्ट्रक्चर, जिसमें TurnBasedMatch के लिए, मीटिंग में हिस्सा लेने वाले हर व्यक्ति से मिले नतीजों का डेटा शामिल होता है.

खास जानकारी

कंस्ट्रक्टर और डिस्ट्रक्टर

ParticipantResults()
ParticipantResults(std::shared_ptr< const ParticipantResultsImpl > impl)
shared_ptr से ParticipantResultsImpl में, ParticipantResults ऑब्जेक्ट बनाता है.
ParticipantResults(const ParticipantResults & copy_from)
मौजूदा ParticipantResults ऑब्जेक्ट की कॉपी बनाता है.
ParticipantResults(ParticipantResults && move_from)
किसी मौजूदा ParticipantResults ऑब्जेक्ट को ले जाता है.

सार्वजनिक फ़ंक्शन

HasResultsForParticipant(const std::string & participant_id) const
bool
अगर इस ParticipantResults ऑब्जेक्ट के लिए, दिए गए MultiplayerParticipant के लिए कोई नतीजा मिलता है, तो 'सही' दिखाता है.
MatchResultForParticipant(const std::string & participant_id) const
TurnBasedMatch में बताए गए व्यक्ति के लिए MatchResult दिखाता है.
PlaceForParticipant(const std::string & participant_id) const
uint32_t
यह फ़ंक्शन दिखाता है कि TurnBasedMatch में, किस व्यक्ति को शामिल किया गया है.
Valid() const
bool
अगर इस ParticipantResults ऑब्जेक्ट में डेटा अपने-आप भर जाता है, तो 'सही' दिखाता है.
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 के लिए कोई नतीजा मिलता है, तो 'सही' दिखाता है.

इस फ़ंक्शन को इस्तेमाल करने के लिए, मान्य वैल्यू 'सही' होनी चाहिए.

MatchResultForParticipant

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

TurnBasedMatch में बताए गए व्यक्ति के लिए MatchResult दिखाता है.

ध्यान दें कि यह ज़रूरी नहीं है कि सभी हिस्सा लेने वालों के पास Matchनतीजे हो; अगर HasResultsForParticipant के नतीजे 'सही' नहीं हैं, तो यह फ़ंक्शन MatchResult::NONE दिखाएगा. इस फ़ंक्शन को इस्तेमाल करने के लिए, मान्य वैल्यू 'सही' होनी चाहिए.

ParticipantResults

 ParticipantResults()

ParticipantResults

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

shared_ptr से ParticipantResultsImpl में, ParticipantResults ऑब्जेक्ट बनाता है.

इसे एपीआई की टीम के अंदर इस्तेमाल करने के लिए बनाया गया है.

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 के नतीजे 'सही' के तौर पर नहीं दिखते हैं, तो यह फ़ंक्शन उस प्लेयर के लिए 0 दिखाएगा जिसे अभी तक रैंक नहीं किया गया है. इस फ़ंक्शन को इस्तेमाल करने के लिए, मान्य वैल्यू 'सही' होनी चाहिए.

वैध

bool Valid() const 

अगर इस ParticipantResults ऑब्जेक्ट में डेटा अपने-आप भर जाता है, तो 'सही' दिखाता है.

इस ParticipantResults ऑब्जेक्ट पर गैटर फ़ंक्शन (PlaceForParticipant, MatchResultForParticipant वगैरह...) को इस्तेमाल करने लायक बनाने के लिए, सही होना चाहिए.

WithResult

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

ऐसा नया ParticipantResults बनाता है जिसमें सभी मौजूदा नतीजे और इस फ़ंक्शन में पास किया जाने वाला अन्य नतीजों का डेटा शामिल होता है.

ध्यान दें कि नतीजा, मीटिंग में हिस्सा लेने वाले हर व्यक्ति के लिए सिर्फ़ एक बार सेट किया जा सकता है. एक से ज़्यादा नतीजे सेट करने पर, गड़बड़ी का मैसेज दिखेगा. साथ ही, ParticipantResults में कोई बदलाव नहीं होगा. इस फ़ंक्शन को इस्तेमाल करने के लिए, मान्य वैल्यू 'सही' होनी चाहिए.

ब्यौरा
पैरामीटर
participant_id
वह MultiplayerParticipant जिसके लिए नतीजा जोड़ना है.
placing
मैच में हिस्सा लेने वाले व्यक्ति की जगह.
result
मैच में हिस्सा लेने वाले व्यक्ति के लिए MatchResult.

operator=

ParticipantResults & operator=(
  const ParticipantResults & copy_from
)

इस ParticipantResults ऑब्जेक्ट को किसी दूसरे ऑब्जेक्ट से असाइन करता है.

operator=

ParticipantResults & operator=(
  ParticipantResults && move_from
)

यह ParticipantResults ऑब्जेक्ट को असाइन करता है. इसके लिए, ऑब्जेक्ट में किसी अन्य ऑब्जेक्ट को ले जाएं.