gpg:: 排行榜
#include <leaderboard.h>
單一資料結構可讓您存取特定排行榜的狀態資料,例如名稱和有效性。
摘要
建構函式和解構函式 |
|
---|---|
Leaderboard()
|
|
Leaderboard(std::shared_ptr< const LeaderboardImpl > impl)
明確的建構函式。
|
|
Leaderboard(const Leaderboard & copy_from)
複製現有排行榜的建構函式,將其複製到新排行榜。
|
|
Leaderboard(Leaderboard && move_from)
將現有排行榜移至新排行榜的建構函式。
|
|
~Leaderboard()
|
公用函式 |
|
---|---|
IconUrl() const
|
const std::string &
傳回此 Leaderboard 圖示圖片的網址。
|
Id() const
|
const std::string &
傳回 Google Play 管理中心事先產生的專屬字串。
|
Name() const
|
const std::string &
傳回排行榜的簡稱。
|
Order() const
|
傳回更好的遞增或遞減順序。
|
Valid() const
|
bool
如果傳回的排行榜已填入資料,並且伴隨成功的回應狀態,則傳回 true;如果是未填入的使用者建立的排行榜,或是已填入的排行榜 (包含失敗回應狀態) 則為 false。
|
operator=(const Leaderboard & copy_from)
|
可從其他排行榜指派此排行榜值的指派運算子。
|
operator=(Leaderboard && move_from)
|
可從其他排行榜指派此排行榜值的指派運算子。
|
公用函式
IconUrl
const std::string & IconUrl() const
傳回此 Leaderboard 圖示圖片的網址。
只有在 Leaderboard::Valid() 傳回 true 時才能呼叫這個方法。
ID
const std::string & Id() const
傳回 Google Play 管理中心事先產生的專屬字串。
用來指稱遊戲用戶端中的排行榜。只有在 Leaderboard::Valid() 傳回 true 時才能呼叫這個方法。
排行榜
Leaderboard()
排行榜
Leaderboard( std::shared_ptr< const LeaderboardImpl > impl )
明確的建構函式。
名稱
const std::string & Name() const
傳回排行榜的簡稱。
最多 100 個半形字元。只有在 Achievement::Valid() 傳回 true 時才能呼叫此方法。
訂購
LeaderboardOrder Order() const
傳回更好的遞增或遞減順序。
可能的值為「LARGER_IS_BETTER」或「SMALLER_IS_BETTER」。LARGER_IS_BETTER 會將較大的分數置於頂端 (遞減)。SMALLER_IS_BETTER 會將較小的分數置於頂端 (遞增)。只有在 Achievement::Valid() 傳回 true 時才能呼叫此方法。
有效
bool Valid() const
如果傳回的排行榜已填入資料,並且伴隨成功的回應狀態,則傳回 true;如果是未填入的使用者建立的排行榜,或是已填入的排行榜 (包含失敗回應狀態) 則為 false。
這個排行榜中的 getter 函式 (ID、名稱、說明等) 必須設為 true 才能使用。
運算子=
Leaderboard & operator=( Leaderboard && move_from )
可從其他排行榜指派此排行榜值的指派運算子。
r-value-reference 版本。
~超級橫幅廣告
~Leaderboard()