cesium-native 0.46.0
Loading...
Searching...
No Matches
Cesium3DTilesSelection::ITwinRealityDataContentLoaderFactory Class Reference

A factory for creating a TilesetContentLoader from data from the iTwin Reality Management API. More...

#include <Cesium3DTilesSelection/ITwinRealityDataContentLoaderFactory.h>

Inheritance diagram for Cesium3DTilesSelection::ITwinRealityDataContentLoaderFactory:
Cesium3DTilesSelection::TilesetContentLoaderFactory

Public Types

using TokenRefreshCallback
 Callback to obtain a new access token for the iTwin API. Receives the previous access token as parameter.
 
- Public Types inherited from Cesium3DTilesSelection::TilesetContentLoaderFactory
using AuthorizationHeaderChangeListener
 The type of a callback called when the Authorization header used by a tileset loader has changed.
 

Public Member Functions

 ITwinRealityDataContentLoaderFactory (const std::string &realityDataId, const std::optional< std::string > &iTwinId, const std::string &iTwinAccessToken, TokenRefreshCallback &&tokenRefreshCallback)
 Creates a new factory for loading iTwin reality data.
 
virtual CesiumAsync::Future< Cesium3DTilesSelection::TilesetContentLoaderResult< Cesium3DTilesSelection::TilesetContentLoader > > createLoader (const TilesetExternals &externals, const TilesetOptions &tilesetOptions, const AuthorizationHeaderChangeListener &headerChangeListener) override
 Creates an instance of the loader corresponding to this factory.
 
virtual bool isValid () const override
 Returns true if a valid TilesetContentLoader can be constructed from this factory.
 
- Public Member Functions inherited from Cesium3DTilesSelection::TilesetContentLoaderFactory

Detailed Description

A factory for creating a TilesetContentLoader from data from the iTwin Reality Management API.

Definition at line 17 of file ITwinRealityDataContentLoaderFactory.h.

Member Typedef Documentation

◆ TokenRefreshCallback

Initial value:
std::function<CesiumAsync::Future<CesiumUtility::Result<std::string>>(
const std::string&)>

Callback to obtain a new access token for the iTwin API. Receives the previous access token as parameter.

Definition at line 24 of file ITwinRealityDataContentLoaderFactory.h.

Constructor & Destructor Documentation

◆ ITwinRealityDataContentLoaderFactory()

Cesium3DTilesSelection::ITwinRealityDataContentLoaderFactory::ITwinRealityDataContentLoaderFactory ( const std::string & realityDataId,
const std::optional< std::string > & iTwinId,
const std::string & iTwinAccessToken,
TokenRefreshCallback && tokenRefreshCallback )

Creates a new factory for loading iTwin reality data.

Parameters
realityDataIdThe ID of the reality data to load.
iTwinId

The ID of the iTwin this reality data is associated with.

As described in the iTwin Reality Management API documentation:

‍The iTwinId parameter is optional, but it is preferable to provide it, because the permissions used to access the container are determined from the iTwin. With no iTwin specified, the operation can succeed in some cases (e.g. the user is the reality data's owner), but we recommend to provide a iTwinId.

iTwinAccessTokenThe access token to use to access the API.
tokenRefreshCallbackCallback that will be called to obtain a new access token when the provided one has expired.

Member Function Documentation

◆ createLoader()

virtual CesiumAsync::Future< Cesium3DTilesSelection::TilesetContentLoaderResult< Cesium3DTilesSelection::TilesetContentLoader > > Cesium3DTilesSelection::ITwinRealityDataContentLoaderFactory::createLoader ( const TilesetExternals & externals,
const TilesetOptions & tilesetOptions,
const AuthorizationHeaderChangeListener & headerChangeListener )
overridevirtual

Creates an instance of the loader corresponding to this factory.

Parameters
externalsThe TilesetExternals.
tilesetOptionsThe TilesetOptions.
headerChangeListenerA callback that will be called when the Authorization header used by the tileset loader has changed.
Returns
A future that resolves to a TilesetContentLoaderResult.

Implements Cesium3DTilesSelection::TilesetContentLoaderFactory.

◆ isValid()

virtual bool Cesium3DTilesSelection::ITwinRealityDataContentLoaderFactory::isValid ( ) const
overridevirtual

Returns true if a valid TilesetContentLoader can be constructed from this factory.

Implements Cesium3DTilesSelection::TilesetContentLoaderFactory.


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