Provides a way to reference a set of credits in a CreditSystem so that the references can easily be released later.
More...
#include <CesiumUtility/CreditReferencer.h>
|
| | CreditReferencer () noexcept |
| | Constructs a new credit referencer without a credit system.
|
| |
| | CreditReferencer (const std::shared_ptr< CreditSystem > &pCreditSystem) noexcept |
| | Constructs a new credit referencer.
|
| |
| | CreditReferencer (const CreditReferencer &rhs) noexcept |
| | Copies an instance, increasing the credit references on the CreditSystem accordingly.
|
| |
| | CreditReferencer (CreditReferencer &&rhs) noexcept |
| | Moves an instance. After the move, the rhs will not own any references, so this operation does not affect the total number of credit references on the CreditSystem.
|
| |
|
| ~CreditReferencer () noexcept |
| | Destroys this instance, releasing all of its references.
|
| |
| CreditReferencer & | operator= (const CreditReferencer &rhs) noexcept |
| | Copy-assigns another instance to this one. The rhs references are copied to this instance and then all credit references previously owned by this instance are released.
|
| |
| CreditReferencer & | operator= (CreditReferencer &&rhs) noexcept |
| | Move-assigns another instance to this one. The rhs references are moved to this instance and then all credit references previously owned by this instance are released.
|
| |
|
const std::shared_ptr< CreditSystem > & | getCreditSystem () const noexcept |
| | Gets the credit system that this instance references.
|
| |
| void | setCreditSystem (const std::shared_ptr< CreditSystem > &pCreditSystem) noexcept |
| | Sets the credit system that this instance references.
|
| |
| void | addCreditReference (Credit credit) noexcept |
| | Adds a reference to a credit.
|
| |
|
void | releaseAllReferences () noexcept |
| | Releases all references that have been added to this instance.
|
| |
Provides a way to reference a set of credits in a CreditSystem so that the references can easily be released later.
Multiple CreditReferencers may be used on the same credit system to track separate sets of references – e.g., two sets of credits from different frames.
Definition at line 20 of file CreditReferencer.h.
◆ CreditReferencer() [1/4]
| CesiumUtility::CreditReferencer::CreditReferencer |
( |
| ) |
|
|
noexcept |
Constructs a new credit referencer without a credit system.
The methods on this instance will have no effect before the credit system is set by calling setCreditSystem.
◆ CreditReferencer() [2/4]
| CesiumUtility::CreditReferencer::CreditReferencer |
( |
const std::shared_ptr< CreditSystem > & | pCreditSystem | ) |
|
|
noexcept |
Constructs a new credit referencer.
- Parameters
-
| pCreditSystem | The credit system that owns the referenced credits. This may be nullptr, but methods on this instance will have no effect before the credit system is set. |
◆ CreditReferencer() [3/4]
| CesiumUtility::CreditReferencer::CreditReferencer |
( |
const CreditReferencer & | rhs | ) |
|
|
noexcept |
Copies an instance, increasing the credit references on the CreditSystem accordingly.
- Parameters
-
◆ CreditReferencer() [4/4]
Moves an instance. After the move, the rhs will not own any references, so this operation does not affect the total number of credit references on the CreditSystem.
- Parameters
-
◆ addCreditReference()
| void CesiumUtility::CreditReferencer::addCreditReference |
( |
Credit | credit | ) |
|
|
noexcept |
Adds a reference to a credit.
- Parameters
-
| credit | The credit to reference. |
◆ operator=() [1/2]
Copy-assigns another instance to this one. The rhs references are copied to this instance and then all credit references previously owned by this instance are released.
- Parameters
-
- Returns
- A reference to this instance.
◆ operator=() [2/2]
Move-assigns another instance to this one. The rhs references are moved to this instance and then all credit references previously owned by this instance are released.
- Parameters
-
- Returns
- A reference to this instance.
◆ setCreditSystem()
| void CesiumUtility::CreditReferencer::setCreditSystem |
( |
const std::shared_ptr< CreditSystem > & | pCreditSystem | ) |
|
|
noexcept |
Sets the credit system that this instance references.
If the specified credit system is different from the current one, this method will clear all current credit references.
- Parameters
-
| pCreditSystem | The new credit system. |
The documentation for this class was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumUtility/include/CesiumUtility/CreditReferencer.h