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 लौटाता है.

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

वैध

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.

ऑपरेटर=

ParticipantResults & operator=(
  const ParticipantResults & copy_from
)

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

ऑपरेटर=

ParticipantResults & operator=(
  ParticipantResults && move_from
)

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