LuciadCPillar 2024.0.08
luciad::IMultilevelTiledAttributionProvider Class Referenceabstract

This interface provides methods to retrieve the attributions for a given multilevel tiled raster layer. More...

#include <luciad/models/rasters/IMultilevelTiledAttributionProvider.h>

Public Member Functions

virtual ~IMultilevelTiledAttributionProvider ()=default
 
virtual DataAttribution getAttribution (std::vector< MultilevelTileInfo > tiles, const CancellationToken &cancellationToken)=0
 Get the current attribution. More...
 

Static Public Member Functions

static std::shared_ptr< IMultilevelTiledAttributionProvidercreate (std::function< DataAttribution(std::vector< MultilevelTileInfo > tiles, const CancellationToken &cancellationToken)> getAttributionFunction)
 Creates a IMultilevelTiledAttributionProvider instance that delegates events to the given function. More...
 

Detailed Description

This interface provides methods to retrieve the attributions for a given multilevel tiled raster layer.

Since
2024.0

Constructor & Destructor Documentation

◆ ~IMultilevelTiledAttributionProvider()

virtual luciad::IMultilevelTiledAttributionProvider::~IMultilevelTiledAttributionProvider ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< IMultilevelTiledAttributionProvider > luciad::IMultilevelTiledAttributionProvider::create ( std::function< DataAttribution(std::vector< MultilevelTileInfo > tiles, const CancellationToken &cancellationToken)>  getAttributionFunction)
static

Creates a IMultilevelTiledAttributionProvider instance that delegates events to the given function.

This is a convenience method that allows you to reduce boiler plate code, and use a lambda.

Parameters
getAttributionFunctionthe function that is called by IMultilevelTiledAttributionProvider::getAttribution.
Returns
an IMultilevelTiledAttributionProvider instance based on the given function.
Exceptions
NullArgumentExceptionwhen the function is nullptr.

◆ getAttribution()

virtual DataAttribution luciad::IMultilevelTiledAttributionProvider::getAttribution ( std::vector< MultilevelTileInfo tiles,
const CancellationToken cancellationToken 
)
pure virtual

Get the current attribution.

If the given cancellation token is cancelled, the returned attribution will be ignored. For slow implementations, it is recommended to poll the cancellationToken and return as soon as possible if it is cancelled. For convenience, you may use DataAttribution::empty to return an empty attribution.

This method must be thread-safe, as it can be called from any thread.

Parameters
tilesthe tiles that are currently drawn.
cancellationTokena cancellation token.
Returns
The attribution.