ArcGIS Procedural Runtime  3.2.10650
List of all members | Public Member Functions
prtx::ResolveMapProvider Class Referenceabstract

#include <ResolveMapProvider.h>

Inheritance diagram for prtx::ResolveMapProvider:
[legend]

Public Member Functions

virtual prt::ResolveMap const * createResolveMap (prtx::URIPtr uri) const =0
 
virtual prt::ContentType getContentType () const final override
 
virtual prtx::Extension::ExtensionType getExtensionType () const final override
 
- Public Member Functions inherited from prtx::Extension
 Extension (const Extension &)=delete
 
Extensionoperator= (const Extension &)=delete
 

Additional Inherited Members

- Public Types inherited from prtx::Extension
enum  ExtensionType {
  ET_UNDEFINED,
  ET_STREAM_ADAPTOR,
  ET_RESOLVEMAP_PROVIDER,
  ET_ENCODER,
  ET_DECODER,
  ET_COUNT
}
 
- Static Public Member Functions inherited from prtx::Extension
static prt::ContentType toContentType (const std::wstring &ctStr)
 
static ExtensionType toExtensionType (const std::wstring &etStr)
 
static const std::wstring & toString (const ExtensionType &et)
 
static const std::wstring & toString (const prt::ContentType &ct)
 

Detailed Description

A ResolveMapProvider scans a resource identified by a prtx::URI and creates a prt::ResolveMap of "embedded" resources. The resulting ResolveMap will contain composite URIs addressing the individual embedded resources.

A typical use case is to scan for embedded textures within a self-contained asset format like GLB (GLTF) or USDZ.

Generally, a ResolveMapProvider is used with a corresponding prtx::Adaptor which can open an input stream from a composite URI. See prtx::ResolveMapProvider::createResolveMap for examples of the two most typical forms of composite URIs.

Member Function Documentation

◆ createResolveMap()

virtual prt::ResolveMap const* prtx::ResolveMapProvider::createResolveMap ( prtx::URIPtr  uri) const
pure virtual

Scans the resource tree specified by uri and populates a resolve map with the found keys and URIs.

Typically, a zip-like container "foo" would produce entries like: assets/resource.foo/internal/path/file.ext -> foo:file:/abs/path/assets/resource.foo!/internal/path/file.ext

A resource "bar" with sequential buffers would produce entries like: assets/resource.bar/file_1.ext -> bar:file:/abs/path/assets/resource.bar!/<off>/<len>/file_1.ext

  • off = offset in bytes from start of resource
  • len = size in bytes of the corresponding buffer
Returns
Returns a new resolve map which must be destroyed by the caller. A nullptr return value indicates an error.
See also
prt::ResolveMap
Parameters
uriThe root of the resource tree.

◆ getContentType()

virtual prt::ContentType prtx::ResolveMapProvider::getContentType ( ) const
inlinefinaloverridevirtual

The content type of a ResolveMap Provider is undefined, it can decode into multiple possible content objects.

Returns
Always returns prt::CT_UNDEFINED.
See also
prtx::Content

Implements prtx::Extension.

◆ getExtensionType()

virtual prtx::Extension::ExtensionType prtx::ResolveMapProvider::getExtensionType ( ) const
inlinefinaloverridevirtual

Fixates the extension type to ET_RESOLVEMAP_PROVIDER.

Returns
Always returns prtx::Extension::ET_RESOLVEMAP_PROVIDER.
See also
prtx::Extension

Implements prtx::Extension.


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