संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
gpg::इवेंट
#include <event.h>
सिंगल डेटा स्ट्रक्चर, जिसमें किसी खास इवेंट की स्थिति के बारे में डेटा होता है.
खास जानकारी
डेटा दो तरह के होते हैं: किसी खास उपयोगकर्ता के लिए (जैसे कि उपयोगकर्ता ने इवेंट को अनलॉक किया है या नहीं) और ग्लोबल (जैसे कि इवेंट का नाम).
सार्वजनिक फ़ंक्शन
|
Count() const
|
uint64_t
इवेंट में बढ़ोतरी किए जाने की संख्या दिखाता है.
|
Description() const
|
const std::string &
इवेंट का ब्यौरा दिखाता है.
|
Id() const
|
const std::string &
वह खास स्ट्रिंग दिखाता है जिसे Google Play कंसोल से पहले जनरेट किया गया था.
|
ImageUrl() const
|
const std::string &
इस इवेंट के आइकॉन की इमेज पर ले जाने वाला यूआरएल दिखाता है.
|
Name() const
|
const std::string &
यह इवेंट का छोटा नाम दिखाता है.
|
Valid() const
|
bool
अगर इस इवेंट में डेटा अपने-आप भर जाता है और उस इवेंट के जवाब की स्थिति भी सही होती है, तो 'सही' दिखाता है; यह गलत, उपयोगकर्ता के बनाए गए ऐसे इवेंट के लिए गलत है जो अपने-आप नहीं भरे हुए है या ऐसे इवेंट के लिए गलत है जिसका जवाब नहीं भेजा जा सका.
|
Visibility() const
|
इवेंट की स्थिति दिखाता है: HIDDEN या REVEALED .
|
operator=(const Event & copy_from)
|
किसी अन्य इमेज से कॉपी करके, इस Event को असाइन करता है.
|
operator=(Event && move_from)
|
किसी अन्य Event को इसमें ले जाकर, इसे असाइन करता है.
|
सार्वजनिक फ़ंक्शन
गिनती
uint64_t Count() const
इवेंट में बढ़ोतरी किए जाने की संख्या दिखाता है.
इस फ़ंक्शन को इस्तेमाल करने के लिए, Event::Valid()
से सही वैल्यू मिलना ज़रूरी है.
ब्यौरा
const std::string & Description() const
इवेंट का ब्यौरा दिखाता है.
इसे सिर्फ़ तब कॉल किया जा सकता है, जब Event::Valid()
'सही' वैल्यू दिखाता है.
इवेंट
Event()
इवेंट
Event(
std::shared_ptr< const EventImpl > impl
)
shared_ptr
से EventImpl
तक Event
बनाता है.
इसे एपीआई की मदद से अंदरूनी इस्तेमाल के लिए बनाया गया है.
इवेंट
Event(
const Event & copy_from
)
मौजूदा Event
की कॉपी बनाता है.
इवेंट
Event(
Event && move_from
)
मौजूदा Event
को ले जाता है.
आईडी
const std::string & Id() const
वह खास स्ट्रिंग दिखाता है जिसे Google Play कंसोल से पहले जनरेट किया गया था.
अपने गेम क्लाइंट में किसी इवेंट के बारे में बताने के लिए इसका इस्तेमाल करें. इसे सिर्फ़ तब कॉल किया जा सकता है, जब Event::Valid()
'सही' वैल्यू दिखाता है.
ImageUrl
const std::string & ImageUrl() const
इस इवेंट के आइकॉन की इमेज पर ले जाने वाला यूआरएल दिखाता है.
इस फ़ंक्शन को इस्तेमाल करने के लिए, Event::Valid()
से सही वैल्यू मिलना ज़रूरी है.
नाम
const std::string & Name() const
यह इवेंट का छोटा नाम दिखाता है.
ज़्यादा से ज़्यादा 100 वर्ण. इसे सिर्फ़ तब कॉल किया जा सकता है, जब Event::Valid()
'सही' वैल्यू दिखाता है.
वैध
bool Valid() const
अगर इस इवेंट में डेटा अपने-आप भर जाता है और उस इवेंट के जवाब की स्थिति भी सही होती है, तो 'सही' दिखाता है; यह गलत, उपयोगकर्ता के बनाए गए ऐसे इवेंट के लिए गलत है जो अपने-आप नहीं भरे हुए है या ऐसे इवेंट के लिए गलत है जिसका जवाब नहीं भेजा जा सका.
इस इवेंट पर गैटर फ़ंक्शन (id
, Name
, Description
वगैरह) के इस्तेमाल करने लायक होने के लिए यह सही होना चाहिए.
किसको दिखाई दे
EventVisibility Visibility() const
इवेंट की स्थिति दिखाता है: HIDDEN
या REVEALED
.
इस फ़ंक्शन को इस्तेमाल करने के लिए, Event::Valid()
से सही वैल्यू मिलना ज़रूरी है.
operator=
Event & operator=(
const Event & copy_from
)
किसी अन्य इमेज से कॉपी करके, इस Event
को असाइन करता है.
operator=
Event & operator=(
Event && move_from
)
किसी अन्य Event
को इसमें ले जाकर, इसे असाइन करता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# gpg::Event Class Reference\n\ngpg::Event\n==========\n\n`#include \u003cevent.h\u003e`\n\nA single data structure containing data about the status of a specific event.\n\nSummary\n-------\n\nData comprise two types: user-specific (e.g., whether the user has unlocked the event), and global (e.g., event name).\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Event](#classgpg_1_1_event_1a62fd9e25eef0cfb63671b32c15b63de7)`()` ||\n| [Event](#classgpg_1_1_event_1a1cd0e63978cdc2ad42154db032f33afd)`(std::shared_ptr\u003c const EventImpl \u003e impl)` Constructs an [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) from a `shared_ptr` to an `EventImpl`. ||\n| [Event](#classgpg_1_1_event_1a2b7169ab4771a6bea14b7695ddb462bc)`(const `[Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` & copy_from)` Creates a copy of an existing [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event). ||\n| [Event](#classgpg_1_1_event_1aba344e939c30bb607368c273f2b426b4)`(`[Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` && move_from)` Moves an existing [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event). ||\n| [~Event](#classgpg_1_1_event_1ac0b9230499fdda8eface3326b99ef166)`()` ||\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Count](#classgpg_1_1_event_1a4eb8c54247277e4c8f617dcd2b748880)`() const ` | `uint64_t` Returns the number of times the event has been incremented. |\n| [Description](#classgpg_1_1_event_1a01d8ce7e40655babf5afd968c2a1c0bc)`() const ` | `const std::string &` Returns the description of the event. |\n| [Id](#classgpg_1_1_event_1aa267791e0e672bee41b7f2504059577d)`() const ` | `const std::string &` Returns the unique string that the Google Play Developer Console generated beforehand. |\n| [ImageUrl](#classgpg_1_1_event_1a2e6f44a2ddf6b00b9306ca7bf1b9f953)`() const ` | `const std::string &` Returns the URL leading to the image of the icon for this event. |\n| [Name](#classgpg_1_1_event_1a9a47a1e62994acafb15afb02de337ab1)`() const ` | `const std::string &` Returns the short name of the event. |\n| [Valid](#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec)`() const ` | `bool` Returns true if this event is populated with data and is accompanied by a successful response status; false for an unpopulated user-created event or for a populated one accompanied by an unsuccessful response status. |\n| [Visibility](#classgpg_1_1_event_1ad59342d5735fafb6050f2277318c8c3c)`() const ` | [EventVisibility](/games/services/cpp/api/namespace/gpg#namespacegpg_1aa87a4b2e8a01c80e2155286d4bdb9942) Returns the event state: `HIDDEN` or `REVEALED`. |\n| [operator=](#classgpg_1_1_event_1ab795a0f5221cb5b9f30934dfcb5c73d3)`(const `[Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` & copy_from)` | [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` &` Assigns this [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) by copying from another one. |\n| [operator=](#classgpg_1_1_event_1a2de54c196b31ab58160066c750c28cbf)`(`[Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` && move_from)` | [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event)` &` Assigns this [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) by moving another one into it. |\n\nPublic functions\n----------------\n\n### Count\n\n```c++\nuint64_t Count() const \n``` \nReturns the number of times the event has been incremented.\n\n[Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) must return true for this function to be usable. \n\n### Description\n\n```c++\nconst std::string & Description() const \n``` \nReturns the description of the event.\n\nIt can only be called when [Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) returns true. \n\n### Event\n\n```c++\n Event()\n``` \n\n### Event\n\n```c++\n Event(\n std::shared_ptr\u003c const EventImpl \u003e impl\n)\n``` \nConstructs an [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) from a `shared_ptr` to an `EventImpl`.\n\nIntended for internal use by the API. \n\n### Event\n\n```c++\n Event(\n const Event & copy_from\n)\n``` \nCreates a copy of an existing [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event). \n\n### Event\n\n```c++\n Event(\n Event && move_from\n)\n``` \nMoves an existing [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event). \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 an event in your game client. It can only be called when [Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) returns true. \n\n### ImageUrl\n\n```c++\nconst std::string & ImageUrl() const \n``` \nReturns the URL leading to the image of the icon for this event.\n\n[Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) must return true for this function to be usable. \n\n### Name\n\n```c++\nconst std::string & Name() const \n``` \nReturns the short name of the event.\n\nUp to 100 characters. It can only be called when [Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) returns true. \n\n### Valid\n\n```c++\nbool Valid() const \n``` \nReturns true if this event is populated with data and is accompanied by a successful response status; false for an unpopulated user-created event or for a populated one accompanied by an unsuccessful response status.\n\nIt must be true for the getter functions on this event (`id`, `Name`, `Description`, etc.) to be usable. \n\n### Visibility\n\n```c++\nEventVisibility Visibility() const \n``` \nReturns the event state: `HIDDEN` or `REVEALED`.\n\n[Event::Valid()](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event_1a4cb4348adc0bbdc1d1f7a20d0c9e2bec) must return true for this function to be usable. \n\n### operator=\n\n```c++\nEvent & operator=(\n const Event & copy_from\n)\n``` \nAssigns this [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) by copying from another one. \n\n### operator=\n\n```c++\nEvent & operator=(\n Event && move_from\n)\n``` \nAssigns this [Event](/games/services/cpp/api/class/gpg/event#classgpg_1_1_event) by moving another one into it. \n\n### \\~Event\n\n```c++\n ~Event()\n```"]]