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,才能使用。

運算子=

ScorePage & operator=(
  const ScorePage & copy_from
)

從其他分數頁面指派此分數頁面值的指派運算子。

運算子=

ScorePage & operator=(
  ScorePage && move_from
)

從其他分數頁面指派此分數頁面值的指派運算子。

r-value-reference 版本。

~分數頁面

 ~ScorePage()