Creates and manages Credit
objects. Avoids repetitions and tracks which credits should be shown and which credits should be removed this frame.
More...
#include <CesiumUtility/CreditSystem.h>
|
Credit | createCredit (std::string &&html, bool showOnScreen=false) |
| Inserts a credit string.
|
|
Credit | createCredit (const std::string &html, bool showOnScreen=false) |
| Inserts a credit string.
|
|
bool | shouldBeShownOnScreen (Credit credit) const noexcept |
| Gets whether or not the credit should be shown on screen.
|
|
void | setShowOnScreen (Credit credit, bool showOnScreen) noexcept |
| Sets whether or not the credit should be shown on screen.
|
|
const std::string & | getHtml (Credit credit) const noexcept |
| Get the HTML string for this credit.
|
|
void | addCreditReference (Credit credit) |
| Adds a reference to a credit, incrementing its reference count. The referenced credit will be shown until its reference count goes back down to zero.
|
|
void | removeCreditReference (Credit credit) |
| Removes a reference from a credit, decrementing its reference count. When the reference count goes to zero, this credit will no longer be shown.
|
|
const CreditsSnapshot & | getSnapshot () noexcept |
| Gets a snapshot of the credits. The returned instance is only valid until the next call to this method.
|
|
Creates and manages Credit
objects. Avoids repetitions and tracks which credits should be shown and which credits should be removed this frame.
Definition at line 57 of file CreditSystem.h.
◆ addCreditReference()
void CesiumUtility::CreditSystem::addCreditReference |
( |
Credit | credit | ) |
|
Adds a reference to a credit, incrementing its reference count. The referenced credit will be shown until its reference count goes back down to zero.
- Parameters
-
credit | The credit to reference. |
◆ createCredit() [1/2]
Credit CesiumUtility::CreditSystem::createCredit |
( |
const std::string & | html, |
|
|
bool | showOnScreen = false ) |
Inserts a credit string.
- Returns
- If this string already exists, returns a Credit handle to the existing entry. Otherwise returns a Credit handle to a new entry.
◆ createCredit() [2/2]
Credit CesiumUtility::CreditSystem::createCredit |
( |
std::string && | html, |
|
|
bool | showOnScreen = false ) |
Inserts a credit string.
- Returns
- If this string already exists, returns a Credit handle to the existing entry. Otherwise returns a Credit handle to a new entry.
◆ getSnapshot()
Gets a snapshot of the credits. The returned instance is only valid until the next call to this method.
The snapshot will include a sorted list of credits that are currently active, as well as a list of credits that have been removed since the last snapshot.
◆ removeCreditReference()
void CesiumUtility::CreditSystem::removeCreditReference |
( |
Credit | credit | ) |
|
Removes a reference from a credit, decrementing its reference count. When the reference count goes to zero, this credit will no longer be shown.
- Parameters
-
credit | The credit from which to remove a reference. |
◆ CreditReferencer
The documentation for this class was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumUtility/include/CesiumUtility/CreditSystem.h