Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
gpg::ScoreSummary
#include <score_summary.h>
Puan bilgilerinin özetine erişmenizi sağlayan tek bir veri yapısı.
Özet
Herkese açık işlevler
ApproximateNumberOfScores
uint64_t ApproximateNumberOfScores() const
Puan sayfasında yaklaşık puan sayısını döndürür.
Hiç puan istenmediyse bir hata döndürür (max_results = 0) ve çok sayıda puan varsa sayıyı 25'e sabitler.
Koleksiyon
LeaderboardCollection Collection() const
Skor tablosunun ait olduğu koleksiyonu döndürür.
Olası değerler PUBLIC ve SOSIAL'dir.
CurrentPlayerScore
const Score & CurrentPlayerScore() const
Oturumu açık olan oyuncunun puanını döndürür.
LeaderboardId
const std::string & LeaderboardId() const
Google Play Geliştirici Konsolu'nun önceden oluşturduğu benzersiz dizeyi döndürür.
Bunu, oyun istemcinizde bir skor tablosuna referans vermek için kullanın. Yalnızca Leaderboard::Valid() Doğru değerini döndürdüğünde çağrılabilir.
ScoreSummary
ScoreSummary()
ScoreSummary
ScoreSummary(
std::shared_ptr< const ScoreSummaryImpl > impl
)
shared_ptr
değerinden ScoreSummaryImpl
değerine bir ScoreSummary
oluşturur.
API tarafından dahili kullanım için tasarlanmıştır.
TimeSpan
LeaderboardTimeSpan TimeSpan() const
Skor tablosu zaman aralığını döndürür.
Olası değerler: DAILY, WEEKLY veya ALL_TIME.
Geçerli
bool Valid() const
Bu ScoreSummary
sütunu veriyle doldurulursa true değerini döndürür.
ScoreSummary
nesnesindeki (LeaderboardId
, TimeSpan
vb.) alıcı işlevlerinin kullanılabilir olması için doğru değerini döndürmelidir.
~Puan Özeti
~ScoreSummary()
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# gpg::ScoreSummary Class Reference\n\ngpg::ScoreSummary\n=================\n\n`#include \u003cscore_summary.h\u003e`\n\nA single data structure which allows you to access a summary of score information.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ScoreSummary](#classgpg_1_1_score_summary_1a899e0890b070d7260e35bb41db2a0518)`()` ||\n| [ScoreSummary](#classgpg_1_1_score_summary_1af4177fc02864bf1673621c724c4ff108)`(std::shared_ptr\u003c const ScoreSummaryImpl \u003e impl)` Constructs a [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) from a `shared_ptr` to a `ScoreSummaryImpl`. ||\n| [ScoreSummary](#classgpg_1_1_score_summary_1a838ce1b5e4d41a37a8742e6723be110c)`(const `[ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` & copy_from)` Creates a copy of an existing [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary). ||\n| [ScoreSummary](#classgpg_1_1_score_summary_1a3ba666ecd86f5086913aeb3f7935f370)`(`[ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` && move_from)` Moves an existing [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary). ||\n| [~ScoreSummary](#classgpg_1_1_score_summary_1aaf8c94d525e7c8ee047cf15bf390bd2a)`()` ||\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ApproximateNumberOfScores](#classgpg_1_1_score_summary_1a424212fa25f0b5f911fc4bdb9b43bf8b)`() const ` | `uint64_t` Returns the approximate number of scores on the score page. |\n| [Collection](#classgpg_1_1_score_summary_1a3e9182df695dce4c5c9f8f56e3c82e30)`() const ` | [LeaderboardCollection](/games/services/cpp/api/namespace/gpg#namespacegpg_1a747eafdfd2bd9c613e2425d3aae5d960) Returns the collection to which the leaderboard belongs. |\n| [CurrentPlayerScore](#classgpg_1_1_score_summary_1af9940fb6712154c084342177b03c8d6c)`() const ` | `const `[Score](/games/services/cpp/api/class/gpg/score#classgpg_1_1_score)` &` Returns the score for the currently signed-in player. |\n| [LeaderboardId](#classgpg_1_1_score_summary_1ad19915b7a26185f7e2a306a6f6ec6d2a)`() const ` | `const std::string &` Returns the unique string that the Google Play Developer Console generated beforehand. |\n| [TimeSpan](#classgpg_1_1_score_summary_1ad62dca768cc9cb68ff7de6a1a81e18e8)`() const ` | [LeaderboardTimeSpan](/games/services/cpp/api/namespace/gpg#namespacegpg_1a8e678dc5182b81fa91bde5ff2517bfa9) Returns the leaderboard timespan. |\n| [Valid](#classgpg_1_1_score_summary_1a2d016d52c79cd3ce5e767ff19b0ccb7d)`() const ` | `bool` Returns true if this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) is populated with data. |\n| [operator=](#classgpg_1_1_score_summary_1a1d5d63c85e0681d24e77db6275f2ed66)`(const `[ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` & copy_from)` | [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` &` Assigns this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) by copying from another one. |\n| [operator=](#classgpg_1_1_score_summary_1a174ffcc85e8fc59677aec0a2073c5650)`(`[ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` && move_from)` | [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary)` &` Assigns this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) by moving another one into it. |\n\nPublic functions\n----------------\n\n### ApproximateNumberOfScores\n\n```c++\nuint64_t ApproximateNumberOfScores() const \n``` \nReturns the approximate number of scores on the score page.\n\nReturns an error if no scores have been requested (max_results = 0), and clamps the number at 25 if there are an excessive number of them. \n\n### Collection\n\n```c++\nLeaderboardCollection Collection() const \n``` \nReturns the collection to which the leaderboard belongs.\n\nPossible values are PUBLIC and SOCIAL. \n\n### CurrentPlayerScore\n\n```c++\nconst Score & CurrentPlayerScore() const \n``` \nReturns the score for the currently signed-in player. \n\n### LeaderboardId\n\n```c++\nconst std::string & LeaderboardId() const \n``` \nReturns the unique string that the Google Play Developer Console generated beforehand.\n\nUse it to refer to a leaderboard in your game client. It can only be called when [Leaderboard::Valid()](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard_1a510984968ca31ed44aafb18dec22a159) returns true. \n\n### ScoreSummary\n\n```c++\n ScoreSummary()\n``` \n\n### ScoreSummary\n\n```c++\n ScoreSummary(\n std::shared_ptr\u003c const ScoreSummaryImpl \u003e impl\n)\n``` \nConstructs a [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) from a `shared_ptr` to a `ScoreSummaryImpl`.\n\nIntended for internal use by the API. \n\n### ScoreSummary\n\n```c++\n ScoreSummary(\n const ScoreSummary & copy_from\n)\n``` \nCreates a copy of an existing [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary). \n\n### ScoreSummary\n\n```c++\n ScoreSummary(\n ScoreSummary && move_from\n)\n``` \nMoves an existing [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary). \n\n### TimeSpan\n\n```c++\nLeaderboardTimeSpan TimeSpan() const \n``` \nReturns the leaderboard timespan.\n\nPossible values are DAILY, WEEKLY, or ALL_TIME. \n\n### Valid\n\n```c++\nbool Valid() const \n``` \nReturns true if this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) is populated with data.\n\nMust return true for the getter functions on the [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) object (`LeaderboardId`, `TimeSpan`, etc...) to be usable. \n\n### operator=\n\n```c++\nScoreSummary & operator=(\n const ScoreSummary & copy_from\n)\n``` \nAssigns this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) by copying from another one. \n\n### operator=\n\n```c++\nScoreSummary & operator=(\n ScoreSummary && move_from\n)\n``` \nAssigns this [ScoreSummary](/games/services/cpp/api/class/gpg/score-summary#classgpg_1_1_score_summary) by moving another one into it. \n\n### \\~ScoreSummary\n\n```c++\n ~ScoreSummary()\n```"]]