संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
gpg::लीडरबोर्ड
#include <leaderboard.h>
सिंगल डेटा स्ट्रक्चर, आपको किसी खास लीडरबोर्ड की स्थिति का डेटा ऐक्सेस करने की सुविधा देता है. जैसे, लीडरबोर्ड का नाम और उसकी वैधता.
खास जानकारी
सार्वजनिक फ़ंक्शन
|
IconUrl() const
|
const std::string &
वह यूआरएल दिखाता है जो इस लीडरबोर्ड के आइकॉन की इमेज पर ले जाता है.
|
Id() const
|
const std::string &
वह खास स्ट्रिंग दिखाता है जिसे Google Play कंसोल से पहले जनरेट किया गया था.
|
Name() const
|
const std::string &
लीडरबोर्ड का छोटा नाम दिखाता है.
|
Order() const
|
यह जानकारी दिखाता है कि बढ़ते क्रम में कौनसा क्रम बेहतर है या घटते क्रम में.
|
Valid() const
|
bool
सही जवाब तब दिखता है, जब दिखाए गए लीडरबोर्ड में डेटा अपने-आप भर जाता है और इस जानकारी के साथ रिस्पॉन्स की स्थिति भी दिखती है; यह गलत, उपयोगकर्ता के बनाए गए ऐसे लीडरबोर्ड के लिए गलत है जो अपने-आप नहीं भरे हुए है या पहले वाले उपयोगकर्ता के लीडरबोर्ड पर जवाब नहीं दिया गया है.
|
operator=(const Leaderboard & copy_from)
|
किसी अन्य लीडरबोर्ड से इस लीडरबोर्ड की वैल्यू असाइन करने के लिए असाइनमेंट ऑपरेटर.
|
operator=(Leaderboard && move_from)
|
किसी अन्य लीडरबोर्ड से इस लीडरबोर्ड की वैल्यू असाइन करने के लिए असाइनमेंट ऑपरेटर.
|
सार्वजनिक फ़ंक्शन
IconUrl
const std::string & IconUrl() const
वह यूआरएल दिखाता है जो इस लीडरबोर्ड के आइकॉन की इमेज पर ले जाता है.
इसे सिर्फ़ तब कॉल किया जा सकता है, जब लीडरबोर्ड::Valid() वैल्यू 'सही' के तौर पर दिखे.
आईडी
const std::string & Id() const
वह खास स्ट्रिंग दिखाता है जिसे Google Play कंसोल से पहले जनरेट किया गया था.
अपने गेम क्लाइंट के लीडरबोर्ड के बारे में बताने के लिए इसका इस्तेमाल करें. इसे सिर्फ़ तब कॉल किया जा सकता है, जब लीडरबोर्ड::Valid() वैल्यू 'सही' के तौर पर दिखे.
लीडरबोर्ड
Leaderboard()
लीडरबोर्ड
Leaderboard(
std::shared_ptr< const LeaderboardImpl > impl
)
लीडरबोर्ड
Leaderboard(
const Leaderboard & copy_from
)
किसी मौजूदा लीडरबोर्ड को नए लीडरबोर्ड में कॉपी करने के लिए, कंस्ट्रक्टर को कॉपी करें.
लीडरबोर्ड
Leaderboard(
Leaderboard && move_from
)
मौजूदा लीडरबोर्ड को नए लीडरबोर्ड में ले जाने का कंस्ट्रक्टर.
r-value-reference वर्शन का इस्तेमाल करें.
नाम
const std::string & Name() const
लीडरबोर्ड का छोटा नाम दिखाता है.
ज़्यादा से ज़्यादा 100 वर्ण. इसे सिर्फ़ तब कॉल किया जा सकता है, जब Availablement::Valid() वैल्यू 'सही' के तौर पर दिखे.
क्रम
LeaderboardOrder Order() const
यह जानकारी दिखाता है कि बढ़ते क्रम में कौनसा क्रम बेहतर है या घटते क्रम में.
संभावित मान "LARGER_IS_BETTER" हैं या "SmallER_IS_BETTER". LARGER_IS_BETTER बड़े स्कोर सबसे ऊपर (घटते क्रम में) रखता है. smallER_IS_BETTER छोटे स्कोर शीर्ष पर (बढ़ते क्रम में) रखता है. इसे सिर्फ़ तब कॉल किया जा सकता है, जब Availablement::Valid() वैल्यू 'सही' के तौर पर दिखे.
वैध
bool Valid() const
सही जवाब तब दिखता है, जब दिखाए गए लीडरबोर्ड में डेटा अपने-आप भर जाता है और इस जानकारी के साथ रिस्पॉन्स की स्थिति भी दिखती है; गलत, उपयोगकर्ता के बनाए गए ऐसे लीडरबोर्ड के लिए गलत है जो अपने-आप नहीं भरे हुए है या पहले से मौजूद है और उस लीडरबोर्ड पर जवाब नहीं दिया गया है.
इस लीडरबोर्ड पर मौजूद गैटर फ़ंक्शन (आईडी, नाम, ब्यौरा वगैरह) का इस्तेमाल किया जा सके, इसके लिए यह सही होना चाहिए.
operator=
Leaderboard & operator=(
const Leaderboard & copy_from
)
किसी अन्य लीडरबोर्ड से इस लीडरबोर्ड की वैल्यू असाइन करने के लिए असाइनमेंट ऑपरेटर.
operator=
Leaderboard & operator=(
Leaderboard && move_from
)
किसी अन्य लीडरबोर्ड से इस लीडरबोर्ड की वैल्यू असाइन करने के लिए असाइनमेंट ऑपरेटर.
r-value-reference वर्शन का इस्तेमाल करें.
~लीडरबोर्ड
~Leaderboard()
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# gpg::Leaderboard Class Reference\n\ngpg::Leaderboard\n================\n\n`#include \u003cleaderboard.h\u003e`\n\nA single data structure allowing you to access data about the status of a specific leaderboard, such as its name and validity.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Leaderboard](#classgpg_1_1_leaderboard_1ae00cee7b5871b60ed0f8cf8ed2aeb4a6)`()` ||\n| [Leaderboard](#classgpg_1_1_leaderboard_1a9c87f8487ea39d307bea77c2f624387e)`(std::shared_ptr\u003c const LeaderboardImpl \u003e impl)` Explicit constructor. ||\n| [Leaderboard](#classgpg_1_1_leaderboard_1a943d7e864d459b1605794a6fabef1653)`(const `[Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` & copy_from)` Copy constructor for copying an existing leaderboard into a new one. ||\n| [Leaderboard](#classgpg_1_1_leaderboard_1a10a16a9c1fccb70e8f231813d093b3a2)`(`[Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` && move_from)` Constructor for moving an existing leaderboard into a new one. ||\n| [~Leaderboard](#classgpg_1_1_leaderboard_1aeeae550785fca1d79c8187ae12610123)`()` ||\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IconUrl](#classgpg_1_1_leaderboard_1a74076db7d71675e2e6228cb2f396e5c5)`() const ` | `const std::string &` Returns the URL leading to the image of the icon for this [Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard). |\n| [Id](#classgpg_1_1_leaderboard_1ab30ace9344a5443519b8d70bb4947085)`() const ` | `const std::string &` Returns the unique string that the Google Play Developer Console generated beforehand. |\n| [Name](#classgpg_1_1_leaderboard_1a237846a501cea52e6a9142ee892af697)`() const ` | `const std::string &` Returns the short name of the leaderboard. |\n| [Order](#classgpg_1_1_leaderboard_1a008e480040a730e6729368a9c694f717)`() const ` | [LeaderboardOrder](/games/services/cpp/api/namespace/gpg#namespacegpg_1a17d647fceb4fee77f693520405f75cb9) Returns whether ascending or descending order is better. |\n| [Valid](#classgpg_1_1_leaderboard_1a510984968ca31ed44aafb18dec22a159)`() const ` | `bool` Returns true when the returned leaderboard is populated with data and is accompanied by a successful response status; false for an unpopulated user-created leaderboard or for a populated one accompanied by an unsuccessful response status. |\n| [operator=](#classgpg_1_1_leaderboard_1a4e893a80cc728b346368ff002a9f10a1)`(const `[Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` & copy_from)` | [Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` &` Assignment operator for assigning this leaderboard's value from another leaderboard. |\n| [operator=](#classgpg_1_1_leaderboard_1a2c99314b97150d4e24a6b7b0a399139d)`(`[Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` && move_from)` | [Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard)` &` Assignment operator for assigning this leaderboard's value from another leaderboard. |\n\nPublic functions\n----------------\n\n### IconUrl\n\n```c++\nconst std::string & IconUrl() const \n``` \nReturns the URL leading to the image of the icon for this [Leaderboard](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard).\n\nIt can only be called when [Leaderboard::Valid()](/games/services/cpp/api/class/gpg/leaderboard#classgpg_1_1_leaderboard_1a510984968ca31ed44aafb18dec22a159) returns true. \n\n### Id\n\n```c++\nconst std::string & Id() 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### Leaderboard\n\n```c++\n Leaderboard()\n``` \n\n### Leaderboard\n\n```c++\n Leaderboard(\n std::shared_ptr\u003c const LeaderboardImpl \u003e impl\n)\n``` \nExplicit constructor. \n\n### Leaderboard\n\n```c++\n Leaderboard(\n const Leaderboard & copy_from\n)\n``` \nCopy constructor for copying an existing leaderboard into a new one. \n\n### Leaderboard\n\n```c++\n Leaderboard(\n Leaderboard && move_from\n)\n``` \nConstructor for moving an existing leaderboard into a new one.\n\nr-value-reference version. \n\n### Name\n\n```c++\nconst std::string & Name() const \n``` \nReturns the short name of the leaderboard.\n\nUp to 100 characters. It can only be called when [Achievement::Valid()](/games/services/cpp/api/class/gpg/achievement#classgpg_1_1_achievement_1aaabe36b88537ecef60d5eff48c98038c) returns true. \n\n### Order\n\n```c++\nLeaderboardOrder Order() const \n``` \nReturns whether ascending or descending order is better.\n\nPossible values are \"LARGER_IS_BETTER\" or \"SMALLER_IS_BETTER\". LARGER_IS_BETTER places larger scores at the top (descending). SMALLER_IS_BETTER places smaller scores at the top (ascending). It can only be called when [Achievement::Valid()](/games/services/cpp/api/class/gpg/achievement#classgpg_1_1_achievement_1aaabe36b88537ecef60d5eff48c98038c) returns true. \n\n### Valid\n\n```c++\nbool Valid() const \n``` \nReturns true when the returned leaderboard is populated with data and is accompanied by a successful response status; false for an unpopulated user-created leaderboard or for a populated one accompanied by an unsuccessful response status.\n\nIt must be true for the getter functions on this leaderboard (id, Name, Description, etc.) to be usable. \n\n### operator=\n\n```c++\nLeaderboard & operator=(\n const Leaderboard & copy_from\n)\n``` \nAssignment operator for assigning this leaderboard's value from another leaderboard. \n\n### operator=\n\n```c++\nLeaderboard & operator=(\n Leaderboard && move_from\n)\n``` \nAssignment operator for assigning this leaderboard's value from another leaderboard.\n\nr-value-reference version. \n\n### \\~Leaderboard\n\n```c++\n ~Leaderboard()\n```"]]