ArcGIS Procedural Runtime  3.2.10650
Functions
prtx::DataBackend Namespace Reference

Description

Provides a number of functions to resolve symbolic names to actual resources.

This includes the steps: (1) resolve the key to an URI (2) load content pointed at by the URI and (3) decode the content.

All calls are thread-safe.

Functions

bool isCached (prt::Cache *cache, prt::ContentType ct, const prtx::URIPtr &uri)
 
void readURI (const prtx::URIPtr &uri, BinaryVector &data)
 
BinaryVectorPtr resolveBinaryData (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 
CGBPtr resolveCGB (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr)
 
GeometryPtr resolveGeometry (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 
void resolveMaterial (prt::Cache *cache, MaterialPtrVector &materials, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 
TablePtr resolveTable (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 
CTStringPtr resolveText (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 
TexturePtr resolveTexture (prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
 

Function Documentation

◆ isCached()

bool prtx::DataBackend::isCached ( prt::Cache cache,
prt::ContentType  ct,
const prtx::URIPtr uri 
)

Checks whether the passed uri is in the passed cache.

Parameters
cacheCache to use.
ctContent type of resource.
uriURI to query.
Returns
true if the resource described by uri and ct is in the cache, false otherwise.

◆ readURI()

void prtx::DataBackend::readURI ( const prtx::URIPtr uri,
BinaryVector data 
)

[DEPRECATED, use resolveBinaryData()] Reads and returns the content pointed at by the URI. Throws an exception on error.

Parameters
uriURI to read from.
[out]dataVector to return a copy of the content.

◆ resolveBinaryData()

BinaryVectorPtr prtx::DataBackend::resolveBinaryData ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolves (reads) generic binary data from an URI (or optionally via key and resolveMap).

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, the key will be interpreted as an URI.
[out]warningsOptional pointer to a std::wstring to add warnings.
Returns
valid BinaryVectorPtr or throws an exception.

◆ resolveCGB()

CGBPtr prtx::DataBackend::resolveCGB ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr 
)

Resolve a CGB.

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, it is tried to interpret the key as an URI.
Returns
valid CGBPtr or throws an exception.

◆ resolveGeometry()

GeometryPtr prtx::DataBackend::resolveGeometry ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolve a geometry.

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, the function tries to interpret the key as an URI.
[out]warningsOptional pointer to a wstring to add warnings.
Returns
valid GeometryPtr or throws an exception.

◆ resolveMaterial()

void prtx::DataBackend::resolveMaterial ( prt::Cache cache,
MaterialPtrVector materials,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolves materials

Parameters
cacheCache to use. Set to nullptr for no cache.
materials[OUT] Vector to which 0, 1 or several MaterialPtrs are added.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, it is tried to interpret the key as an URI.
[out]warningsOptional pointer to a wstring to add warnings.

◆ resolveTable()

TablePtr prtx::DataBackend::resolveTable ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolves table.

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, the key will be interpreted as an URI.
[out]warningsOptional pointer to a std::wstring to add warnings.
Returns
valid BinaryVectorPtr or throws an exception.

◆ resolveText()

CTStringPtr prtx::DataBackend::resolveText ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolves text.

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, the key will be interpreted as an URI.
[out]warningsOptional pointer to a std::wstring to add warnings.
Returns
valid BinaryVectorPtr or throws an exception.

◆ resolveTexture()

TexturePtr prtx::DataBackend::resolveTexture ( prt::Cache cache,
const std::wstring &  key,
const prtx::ResolveMap resolveMap = nullptr,
std::wstring *  warnings = nullptr 
)

Resolve a texture.

Parameters
cacheCache to use. Set to nullptr for no cache.
keyKey (i.e. symbolic name) into resolveMap.
resolveMapResolveMap for key-to-URI lookup. If resolveMap is nullptr or key is not found, it is tried to interpret the key as an URI.
[out]warningsOptional pointer to a wstring to add warnings.
Returns
valid TexturePtr or throws an exception.