gpg::ScoreSummary

#include <score_summary.h>

單一資料結構可讓您存取分數資訊的摘要,

摘要

建構函式和解構函式

ScoreSummary()
ScoreSummary(std::shared_ptr< const ScoreSummaryImpl > impl)
建構從 shared_ptrScoreSummaryImplScoreSummary
ScoreSummary(const ScoreSummary & copy_from)
建立現有 ScoreSummary 的副本。
ScoreSummary(ScoreSummary && move_from)
移動現有的 ScoreSummary
~ScoreSummary()

公用函式

ApproximateNumberOfScores() const
uint64_t
傳回分數頁面上的約略分數數。
Collection() const
傳回排行榜所屬的集合。
CurrentPlayerScore() const
const Score &
傳回目前登入玩家的分數。
LeaderboardId() const
const std::string &
傳回 Google Play 管理中心事先產生的專屬字串。
TimeSpan() const
傳回排行榜時間範圍。
Valid() const
bool
如果這個 ScoreSummary 已填入資料,則傳回 true。
operator=(const ScoreSummary & copy_from)
會從另一個 ScoreSummary 中複製此 。
operator=(ScoreSummary && move_from)
如要指派這個 ScoreSummary,請將其他項目移至該項目。

公用函式

ApproximateNumberOfScores

uint64_t ApproximateNumberOfScores() const 

傳回分數頁面上的約略分數數。

如果沒有要求分數,系統會傳回錯誤 (max_results = 0);如果數字過多,則會將數字限制在 25。

集合

LeaderboardCollection Collection() const 

傳回排行榜所屬的集合。

可能的值包括「PUBLIC」和「SOCIAL」。

CurrentPlayerScore

const Score & CurrentPlayerScore() const 

傳回目前登入玩家的分數。

LeaderboardId

const std::string & LeaderboardId() const 

傳回 Google Play 管理中心事先產生的專屬字串。

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

ScoreSummary

 ScoreSummary()

ScoreSummary

 ScoreSummary(
  std::shared_ptr< const ScoreSummaryImpl > impl
)

建構從 shared_ptrScoreSummaryImplScoreSummary

主要供 API 內部使用。

ScoreSummary

 ScoreSummary(
  const ScoreSummary & copy_from
)

建立現有 ScoreSummary 的副本。

ScoreSummary

 ScoreSummary(
  ScoreSummary && move_from
)

移動現有的 ScoreSummary

TimeSpan

LeaderboardTimeSpan TimeSpan() const 

傳回排行榜時間範圍。

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

有效

bool Valid() const 

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

必須為 ScoreSummary 物件 (LeaderboardIdTimeSpan 等...) 上的 getter 函式傳回 true,才能使用。

運算子=

ScoreSummary & operator=(
  const ScoreSummary & copy_from
)

會從另一個 ScoreSummary 中複製此 。

運算子=

ScoreSummary & operator=(
  ScoreSummary && move_from
)

如要指派這個 ScoreSummary,請將其他項目移至該項目。

概略值

 ~ScoreSummary()