cesium-native 0.55.0
Loading...
Searching...
No Matches
CesiumUtility::CreditSource Class Reference

Represents a source of credits, such as a tileset or raster overlay, provided to a CreditSystem. More...

#include <CesiumUtility/CreditSystem.h>

Public Member Functions

 CreditSource (CreditSystem &creditSystem) noexcept
 Constructs a new credit source associated with a given credit system.
 
 CreditSource (const std::shared_ptr< CreditSystem > &pCreditSystem) noexcept
 Constructs a new credit source associated with a given credit system.
 
CreditSystemgetCreditSystem () noexcept
 Gets the CreditSystem associated with this source.
 
const CreditSystemgetCreditSystem () const noexcept
 Gets the CreditSystem associated with this source.
 

Friends

class CreditSystem
 

Detailed Description

Represents a source of credits, such as a tileset or raster overlay, provided to a CreditSystem.

While the CreditSystem does not directly map credit source instances to tilesets or raster overlays (or vice-versa), a tileset or raster overlay can be queried for its credit source instance and that instance can be compared against one known to the credit system.

When the last reference to a credit source is released, all credits associated with that source are invalidated as well.

Definition at line 91 of file CreditSystem.h.

Constructor & Destructor Documentation

◆ CreditSource() [1/2]

CesiumUtility::CreditSource::CreditSource ( CreditSystem & creditSystem)
noexcept

Constructs a new credit source associated with a given credit system.

Parameters
creditSystemThe credit system to associate with this source.

◆ CreditSource() [2/2]

CesiumUtility::CreditSource::CreditSource ( const std::shared_ptr< CreditSystem > & pCreditSystem)
noexcept

Constructs a new credit source associated with a given credit system.

Parameters
pCreditSystemThe credit system to associate with this source. This is allowed to be nullptr in order to enable simpler client code when working with an optional credit system.

Member Function Documentation

◆ getCreditSystem() [1/2]

const CreditSystem * CesiumUtility::CreditSource::getCreditSystem ( ) const
noexcept

Gets the CreditSystem associated with this source.

This may be nullptr if this source was never associated with a credit system, or if the credit system has been destroyed.

◆ getCreditSystem() [2/2]

CreditSystem * CesiumUtility::CreditSource::getCreditSystem ( )
noexcept

Gets the CreditSystem associated with this source.

This may be nullptr if this source was never associated with a credit system, or if the credit system has been destroyed.

Friends And Related Symbol Documentation

◆ CreditSystem

friend class CreditSystem
friend

Definition at line 131 of file CreditSystem.h.


The documentation for this class was generated from the following file: