gpg::ScorePage

#include <score_page.h>

可讓您存取分數資料的單一資料結構。

摘要

資料包括排行榜 ID、開始、時間範圍、收集、先前的分數頁面符記、下一個分數頁符記,以及所有分數項目的向量。

建構函式和解構函式

ScorePage()
ScorePage(std::shared_ptr< const ScorePageImpl > impl)
明確的建構函式。
ScorePage(const ScorePage & copy_from)
將現有分數頁面複製到新分數頁面的建構函式。
ScorePage(ScorePage && move_from)
將現有分數頁面的移動至新分數頁面的建構函式。
~ScorePage()

公開函式

Collection() const
傳回排行榜是「PUBLIC」或「SOCIAL」。
Entries() const
const std::vector< ScorePage::Entry > &
所有得分項目的向量。
HasNextScorePage() const
bool
如果計分板有後續的得分頁面,此有效。
HasPreviousScorePage() const
bool
如果計分板有先前的得分頁面,則為有效。
LeaderboardId() const
const std::string &
傳回 Google Play 開發人員控制台事先產生的專屬字串。
NextScorePageToken() const
傳回下一頁的計分頁符記。
PreviousScorePageToken() const
傳回上一頁的計分頁符記。
Start() const
傳回排行榜最初是否查詢最高得分或目前玩家附近的得分。
TimeSpan() const
傳回排行榜的時間範圍。
Valid() const
bool
如果這個 ScorePage 填入資料,則傳回 true。
operator=(const ScorePage & copy_from)
用於指派其他分數頁面值的作業運算子。
operator=(ScorePage && move_from)
用於指派其他分數頁面值的作業運算子。

類別

gpg::ScorePage::Entry

可在分數頁面上建立項目的類別。

gpg::ScorePage::ScorePageToken

這種資料結構幾乎不透明類型,代表 ScorePage (或空白) 的查詢。

公開函式

集合

LeaderboardCollection Collection() const 

傳回排行榜是「PUBLIC」或「SOCIAL」。

資料

const std::vector< ScorePage::Entry > & Entries() const 

所有得分項目的向量。

HasNextScorePage

bool HasNextScorePage() const 

如果計分板有後續的得分頁面,此有效。

HasPreviousScorePage

bool HasPreviousScorePage() const 

如果計分板有先前的得分頁面,則為有效。

LeaderboardId

const std::string & LeaderboardId() const 

傳回 Google Play 開發人員控制台事先產生的專屬字串。

並用來指出遊戲用戶端中的排行榜。只有在 Leaderboard::Valid() 傳回 true 時,才能呼叫此方法。

NextScorePageToken

ScorePage::ScorePageToken NextScorePageToken() const 

傳回下一頁的計分頁符記。

PreviousScorePageToken

ScorePage::ScorePageToken PreviousScorePageToken() const 

傳回上一頁的計分頁符記。

ScorePage

 ScorePage()

ScorePage

 ScorePage(
  std::shared_ptr< const ScorePageImpl > impl
)

明確的建構函式。

ScorePage

 ScorePage(
  const ScorePage & copy_from
)

將現有分數頁面複製到新分數頁面的建構函式。

ScorePage

 ScorePage(
  ScorePage && move_from
)

將現有分數頁面的移動至新分數頁面的建構函式。

r-value-reference 版本。

開始

LeaderboardStart Start() const 

傳回排行榜最初是否查詢最高得分或目前玩家附近的得分。

可能的值為 TOP_SCORES 和 Player_CENTERED。

TimeSpan

LeaderboardTimeSpan TimeSpan() const 

傳回排行榜的時間範圍。

可能的值包括 DAILY、WEEKLY 和 ALL_TIME。

有效

bool Valid() const 

如果這個 ScorePage 填入資料,則傳回 true。

針對 ScorePage 物件 (LeaderboardIdStart 等) 中的 getter 函式,必須傳回 true。

operator=

ScorePage & operator=(
  const ScorePage & copy_from
)

用於指派其他分數頁面值的作業運算子。

operator=

ScorePage & operator=(
  ScorePage && move_from
)

用於指派其他分數頁面值的作業運算子。

r-value-reference 版本。

~ScorePage

 ~ScorePage()