Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
gpg::ScoreSummary
#include <score_summary.h>
Eine einzelne Datenstruktur, mit der Sie auf eine Zusammenfassung der Punktzahlinformationen zugreifen können.
Zusammenfassung
Öffentliche Funktionen
|
ApproximateNumberOfScores() const
|
uint64_t
Gibt die ungefähre Anzahl der Punktzahlen auf der Punktzahlseite zurück.
|
Collection() const
|
Gibt die Sammlung zurück, zu der die Bestenliste gehört
|
CurrentPlayerScore() const
|
Gibt den Punktestand des aktuell angemeldeten Spielers zurück.
|
LeaderboardId() const
|
const std::string &
Gibt den eindeutigen String zurück, den die Google Play Developer Console zuvor generiert hat.
|
TimeSpan() const
|
Gibt die Zeitspanne für die Bestenliste zurück.
|
Valid() const
|
bool
Gibt „true“ zurück, wenn ScoreSummary mit Daten gefüllt ist.
|
operator=(const ScoreSummary & copy_from)
|
Weist diesem/dieser ScoreSummary durch Kopieren aus einem anderen zu.
|
operator=(ScoreSummary && move_from)
|
Weist diesem ScoreSummary zu, indem eine andere in die Datei verschoben wird.
|
Öffentliche Funktionen
ApproximateNumberOfScores
uint64_t ApproximateNumberOfScores() const
Gibt die ungefähre Anzahl der Punktzahlen auf der Punktzahlseite zurück.
Gibt einen Fehler zurück, wenn keine Punktzahlen angefordert wurden (max_results = 0) und schränkt die Zahl auf 25 ein, wenn eine übermäßige Anzahl vorhanden ist.
Sammlung
LeaderboardCollection Collection() const
Gibt die Sammlung zurück, zu der die Bestenliste gehört
Mögliche Werte sind PUBLIC und SOCIAL.
CurrentPlayerScore
const Score & CurrentPlayerScore() const
Gibt den Punktestand des aktuell angemeldeten Spielers zurück.
LeaderboardId
const std::string & LeaderboardId() const
Gibt den eindeutigen String zurück, den die Google Play Developer Console zuvor generiert hat.
Damit kannst du in deinem Spieleclient auf eine Bestenliste verweisen. Sie kann nur aufgerufen werden, wenn Leaderboard::Valid() "true" zurückgibt.
ScoreSummary
ScoreSummary()
ScoreSummary
ScoreSummary(
std::shared_ptr< const ScoreSummaryImpl > impl
)
Erstellt ein ScoreSummary
aus einem shared_ptr
zu einem ScoreSummaryImpl
.
Vorgesehen für die interne Verwendung durch die API.
TimeSpan
LeaderboardTimeSpan TimeSpan() const
Gibt die Zeitspanne für die Bestenliste zurück.
Mögliche Werte sind DAILY, WEEKLY oder ALL_TIME.
Gültig
bool Valid() const
Gibt „true“ zurück, wenn ScoreSummary
mit Daten gefüllt ist.
Damit die Getter-Funktionen im ScoreSummary
-Objekt (LeaderboardId
, TimeSpan
usw.) verwendet werden können, muss „true“ zurückgegeben werden.
~ScoreSummary
~ScoreSummary()
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[null,null,["Zuletzt aktualisiert: 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```"]]