LuciadCPillar 2023.1.04
luciad::IDataLoader Class Referenceabstract

Interface for loading data from a path into memory. More...

#include <luciad/loaders/IDataLoader.h>

Public Member Functions

virtual ~IDataLoader ()=default
 
virtual luciad::expected< DataEntity, ErrorInfoload (const std::string &path, const CancellationToken &token)=0
 Returns the data resource loaded from the given path. More...
 

Detailed Description

Interface for loading data from a path into memory.

See related article for an example on how to customize 3D tiles data loading.

Since
2022.1

Constructor & Destructor Documentation

◆ ~IDataLoader()

virtual luciad::IDataLoader::~IDataLoader ( )
virtualdefault

Member Function Documentation

◆ load()

virtual luciad::expected< DataEntity, ErrorInfo > luciad::IDataLoader::load ( const std::string &  path,
const CancellationToken token 
)
pure virtual

Returns the data resource loaded from the given path.

The download process can be canceled by the means of the cancellation token. It is up to the implementer to verify that the cancellation token state is set to true during the operation. When set to true this indicates that a resource is no longer needed. The return value then can be an ErrorInfo object with the error code Canceled.

Parameters
pathPath to the resource.
tokenCancellation token. This is optional and can be a nulltpr.
Returns
the data resource as DataEntity, error information otherwise.