קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
gpg::אירוע
#include <event.h>
מבנה נתונים יחיד שמכיל נתונים על הסטטוס של אירוע ספציפי.
סיכום
הנתונים מורכבים משני סוגים: ספציפיים למשתמש (למשל, אם המשתמש ביטל את הנעילה של האירוע) וגלובלי (למשל, שם האירוע).
פונקציות ציבוריות
|
Count() const
|
uint64_t
הפונקציה מחזירה את מספר הפעמים שהאירוע הועלה.
|
Description() const
|
const std::string &
מחזירה את תיאור האירוע.
|
Id() const
|
const std::string &
מחזירה את המחרוזת הייחודית שנוצרה מראש ב-Google Play Console.
|
ImageUrl() const
|
const std::string &
מחזירה את כתובת ה-URL שמובילה לתמונת הסמל של האירוע הזה.
|
Name() const
|
const std::string &
הפונקציה מחזירה את השם המקוצר של האירוע.
|
Valid() const
|
bool
הפונקציה מחזירה true אם האירוע הזה מאוכלס בנתונים ולצידו מופיע סטטוס תגובה מוצלח. FALSE עבור אירוע שנוצר על ידי משתמש שלא מאוכלס או עבור אירוע מאוכלס שמלווה בסטטוס התגובה נכשלה.
|
Visibility() const
|
הפונקציה מחזירה את מצב האירוע: HIDDEN או REVEALED .
|
operator=(const Event & copy_from)
|
הקצאת Event זה על ידי העתקה מתפקיד אחר.
|
operator=(Event && move_from)
|
הקצאה של Event על ידי העברת נכס אחר פנימה.
|
פונקציות ציבוריות
כמות
uint64_t Count() const
הפונקציה מחזירה את מספר הפעמים שהאירוע הועלה.
כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך של Event::Valid()
חייב להיות True.
תיאור
const std::string & Description() const
מחזירה את תיאור האירוע.
אפשר לקרוא לפונקציה רק אם הפונקציה Event::Valid()
מחזירה True.
אירוע
Event()
אירוע
Event(
std::shared_ptr< const EventImpl > impl
)
הפונקציה בונה Event
מ-shared_ptr
ל-EventImpl
.
מיועד לשימוש פנימי של ה-API.
אירוע
Event(
const Event & copy_from
)
יצירת עותק של Event
קיים.
אירוע
Event(
Event && move_from
)
Id
const std::string & Id() const
מחזירה את המחרוזת הייחודית שנוצרה מראש ב-Google Play Console.
אפשר להשתמש בו כדי להתייחס לאירוע בלקוח המשחק שלכם. אפשר לקרוא לפונקציה רק אם הערך של Event::Valid()
יחזיר את הערך True.
ImageUrl
const std::string & ImageUrl() const
מחזירה את כתובת ה-URL שמובילה לתמונת הסמל של האירוע הזה.
כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך של Event::Valid()
חייב להיות True.
שם
const std::string & Name() const
הפונקציה מחזירה את השם המקוצר של האירוע.
עד 100 תווים. אפשר לקרוא לפונקציה רק אם הפונקציה Event::Valid()
מחזירה True.
נתונים תקפים
bool Valid() const
הפונקציה מחזירה true אם האירוע הזה מאוכלס בנתונים ולצידו סטטוס תגובה מוצלחת. FALSE עבור אירוע שנוצר על ידי משתמש שלא מאוכלס או עבור אירוע מאוכלס שמלווה בסטטוס התגובה נכשלה.
הוא חייב להיות נכון כדי שניתן יהיה להשתמש בפונקציות getter באירוע הזה (id
, Name
, Description
וכו').
חשיפה
EventVisibility Visibility() const
הפונקציה מחזירה את מצב האירוע: HIDDEN
או REVEALED
.
כדי שאפשר יהיה להשתמש בפונקציה הזו, הערך של Event::Valid()
חייב להיות True.
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```"]]