gpg::MultiplayerParticipant

#include <multiplayer_participant.h>

מבנה נתונים שמכיל נתונים על משתתף במשחק רב-משתתפים.

סיכום

בנייה

MultiplayerParticipant()
MultiplayerParticipant(std::shared_ptr< const MultiplayerParticipantImpl > impl)
הפונקציה בונה MultiplayerParticipant מ-shared_ptr ל-MultiplayerParticipantImpl.
MultiplayerParticipant(const MultiplayerParticipant & copy_from)
יצירת עותק של MultiplayerParticipant קיים.
MultiplayerParticipant(MultiplayerParticipant && move_from)
העברת MultiplayerParticipant קיים.
~MultiplayerParticipant()

פונקציות ציבוריות

AvatarUrl(ImageResolution resolution) const
const std::string &
הפונקציה מחזירה את כתובת ה-URL שבה נמצאת התמונה של הדמות של MultiplayerParticipant.
DisplayName() const
const std::string &
השם המוצג של הMultiplayerParticipant הזה.
HasMatchResult() const
bool
האם לנוכח/ת יש תוצאה עבור ההתאמה הזו.
HasPlayer() const
bool
אם נגן משויך לMultiplayerParticipant הזה.
Id() const
const std::string &
Id של הMultiplayerParticipant הזה.
IsConnectedToRoom() const
bool
האם המשתתף הזה מחובר ל-RealTimeRoom.
MatchRank() const
uint32_t
הדירוג של הMultiplayerParticipant במסגרת ההתאמה שלו.
MatchResult() const
תוצאת ההתאמה של MultiplayerParticipant.
Player() const
הנגן שמשויך לMultiplayerParticipant הזה.
Status() const
הסטטוס של הMultiplayerParticipant ביחס להתאמה.
Valid() const
bool
הפונקציה מחזירה true אם MultiplayerParticipant הזה מאוכלס בנתונים.
operator=(const MultiplayerParticipant & copy_from)
הקצאת MultiplayerParticipant זה על ידי העתקה מתפקיד אחר.
operator=(MultiplayerParticipant && move_from)
הקצאה של MultiplayerParticipant על ידי העברת נכס אחר פנימה.

פונקציות ציבוריות

AvatarUrl

const std::string & AvatarUrl(
  ImageResolution resolution
) const 

הפונקציה מחזירה את כתובת ה-URL שבה נמצאת התמונה של הדמות של MultiplayerParticipant.

הפרמטר ImageResolution מציין את הרזולוציה של התמונה שמוחזרת. מציינים ICON או HI_RES לרזולוציה. כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True.

DisplayName

const std::string & DisplayName() const 

השם המוצג של הMultiplayerParticipant הזה.

כדי שאפשר יהיה להשתמש בפונקציה תקינה, הפונקציה צריכה להחזיר את הערך True.

HasMatchResult

bool HasMatchResult() const 

האם לנוכח/ת יש תוצאה עבור ההתאמה הזו.

אם הערך הוא False, התוצאות MatchResult ו-MatchRank לא מחזירות נתונים חוקיים. כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True.

HasPlayer

bool HasPlayer() const 

אם נגן משויך לMultiplayerParticipant הזה.

כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True.

Id

const std::string & Id() const 

Id של הMultiplayerParticipant הזה.

הפרמטרים Id תקפים רק במסגרת התאמה יחידה, והם שונים מאלה של Player::Id(). כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True.

IsConnectedToRoom

bool IsConnectedToRoom() const 

האם המשתתף הזה מחובר ל-RealTimeRoom.

תמיד FALSE אם מדובר במשתתף מ-TurnBasedMatch.

MatchRank

uint32_t MatchRank() const 

הדירוג של הMultiplayerParticipant במסגרת ההתאמה שלו.

כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True. אם HasMatchResult() לא מחזירה True, הפונקציה הזו מחזירה 0.

MatchResult

gpg::MatchResult MatchResult() const 

תוצאת ההתאמה של MultiplayerParticipant.

כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True. אם הפונקציה HasMatchResult() לא מחזירה True, הפונקציה הזו מחזירה MatchResult::None.

MultiplayerParticipant

 MultiplayerParticipant()

MultiplayerParticipant

 MultiplayerParticipant(
  std::shared_ptr< const MultiplayerParticipantImpl > impl
)

הפונקציה בונה MultiplayerParticipant מ-shared_ptr ל-MultiplayerParticipantImpl.

מיועד לשימוש פנימי של ה-API.

MultiplayerParticipant

 MultiplayerParticipant(
  const MultiplayerParticipant & copy_from
)

יצירת עותק של MultiplayerParticipant קיים.

MultiplayerParticipant

 MultiplayerParticipant(
  MultiplayerParticipant && move_from
)

העברת MultiplayerParticipant קיים.

שחקן

gpg::Player Player() const 

הנגן שמשויך לMultiplayerParticipant הזה.

כדי שאפשר יהיה להשתמש בפונקציה הזו, גם הערך Valid וגם HasPlayer חייבים להחזיר את הערך True.

סטטוס

ParticipantStatus Status() const 

הסטטוס של הMultiplayerParticipant ביחס להתאמה.

כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך תקף צריך להחזיר את הערך True.

נתונים תקפים

bool Valid() const 

הפונקציה מחזירה true אם MultiplayerParticipant הזה מאוכלס בנתונים.

חייב להיות True כדי שניתן יהיה להשתמש בפונקציות getter (DisplayName, AvatarUrl, Id וכו') ב-MultiplayerParticipant הזה.

operator=

MultiplayerParticipant & operator=(
  const MultiplayerParticipant & copy_from
)

הקצאת MultiplayerParticipant זה על ידי העתקה מתפקיד אחר.

operator=

MultiplayerParticipant & operator=(
  MultiplayerParticipant && move_from
)

הקצאה של MultiplayerParticipant על ידי העברת נכס אחר פנימה.

~משתתף רב-משתתפים

 ~MultiplayerParticipant()