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

#include <StreamAdaptor.h>

Inheritance diagram for prtx::StreamAdaptor:
[legend]

Public Member Functions

virtual std::istream * createStream (prtx::URIPtr uri) const =0
 
virtual void destroyStream (std::istream *stream) const =0
 
virtual prt::ContentType getContentType () const final override
 
virtual prtx::Extension::ExtensionType getExtensionType () const final override
 
virtual void resolve (ContentPtrVector &results, prt::Cache *cache, const std::wstring &key, prt::ContentType ct, prtx::ResolveMap const *resolveMap, std::wstring &warnings) const final
 
- 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

Base class for byte stream adaptors. Subclasses implement how a byte stream is extracted based from a certain kind of URIs. Typically, there is more or less one stream adaptor for each supported URI scheme.

See also
prtx::URI

Member Function Documentation

◆ createStream()

virtual std::istream* prtx::StreamAdaptor::createStream ( prtx::URIPtr  uri) const
pure virtual

Implements the logic how to create a byte stream for a specific URI.

Returns
Returns a new instance of std::istream or subclass. Must be destroyed with destroyStream.

◆ destroyStream()

virtual void prtx::StreamAdaptor::destroyStream ( std::istream *  stream) const
pure virtual

Destroys the stream created by createStream. The stream must be created with createStream.

◆ getContentType()

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

The content type of a Stream Adpator 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::StreamAdaptor::getExtensionType ( ) const
inlinefinaloverridevirtual

Fixates the extension type to ET_STREAM_ADAPTOR.

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

Implements prtx::Extension.

◆ resolve()

virtual void prtx::StreamAdaptor::resolve ( ContentPtrVector &  results,
prt::Cache cache,
const std::wstring &  key,
prt::ContentType  ct,
prtx::ResolveMap const *  resolveMap,
std::wstring &  warnings 
) const
finalvirtual

The URI specified by resolveMap and corresponding key is read and decoded into prtx::Content based object(s) using the stream create by createStream.

See also
prt::ResolveMap
Parameters
resultsReceives the decoded objects.
cacheCache for nested calls to prtx::DataBackend.
keyResource key into resolve map.
ctOnly decoders with ContentType ct will be tried.
resolveMapThe available URIs.
warningsReceives any resolve/decode warnings generated by the call.

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