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

#include <Decoder.h>

Inheritance diagram for prtx::Decoder:
[legend]

Public Member Functions

virtual void decode (ContentPtrVector &results, std::istream &stream, prt::Cache *cache, const std::wstring &key, prtx::ResolveMap const *resolveMap, std::wstring &warnings)=0
 
virtual ExtensionType getExtensionType () const final override
 
- Public Member Functions inherited from prtx::Extension
 Extension (const Extension &)=delete
 
virtual prt::ContentType getContentType () const =0
 
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 all decoders. A decoder accepts a byte stream and constructs one or more Content subclass objects from it. Typically the byte stream is created by a StreamAdaptor from an URI (e.g. a file). A decoder then parses the stream (e.g. a text stream from a Wavefront OBJ file) and creates the corresponding prtx::Geometry objects.

For a list of built-in decoders, consult the Built-In Codecs Reference.

Member Function Documentation

◆ decode()

virtual void prtx::Decoder::decode ( ContentPtrVector &  results,
std::istream &  stream,
prt::Cache cache,
const std::wstring &  key,
prtx::ResolveMap const *  resolveMap,
std::wstring &  warnings 
)
pure virtual

Accepts a byte stream and creates corresponding objects from Content derived classes. It is legal to defer parts of the stream to nested decoders or calling the DataBackend on dependent URIs.

See also
Content
StreamAdaptor
ResolveMap
Parameters
[in,out]resultsReceives the created content objects.
[in]streamThe input byte stream, typically created by a StreamAdaptor.
[in]cacheCache object potentially necessary for nested calls to the DataBackend.
[in]keyKeys into resolveMap to retrieve the URI on which the stream is based.
[in]resolveMapSee key.
[in,out]warningsDecoders may append any warnings encountered during decoding to this string. The warnings will be collected and forwarded to the DataBackend.

◆ getExtensionType()

virtual ExtensionType prtx::Decoder::getExtensionType ( ) const
inlinefinaloverridevirtual

Fixates the extension types of all subclasses to prtx::Extension::ET_DECODER.

Returns
Always returns prtx::Extension::ET_DECODER;

Implements prtx::Extension.


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