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

#include <ExtensionManager.h>

Public Member Functions

virtual void addFactory (prtx::ExtensionFactory *factory)=0
 
virtual DecoderPtr createDecoder (prt::ContentType ct, const prtx::URIPtr &uri) const =0
 
virtual DecoderPtr createDecoder (const std::wstring &id) const =0
 
virtual prt::DecoderInfo const * createDecoderInfo (const std::wstring &id) const =0
 
virtual EncoderPtr createEncoder (const std::wstring &id, const prt::AttributeMap *options, prt::Callbacks *const callbacks) const =0
 
virtual prt::EncoderInfo const * createEncoderInfo (const std::wstring &id) const =0
 
virtual ResolveMapProviderPtr createResolveMapProvider (const prtx::URIPtr &uri) const =0
 
virtual StreamAdaptorPtr createStreamAdaptor (const prtx::URIPtr &uri) const =0
 
 ExtensionManager (const ExtensionManager &)=delete
 
virtual void init (const wchar_t *const *prtPlugins, size_t prtPluginsCount)=0
 
virtual void listDecoderIds (std::vector< std::wstring > &result) const =0
 
virtual void listEncoderIds (std::vector< std::wstring > &result) const =0
 
ExtensionManageroperator= (const ExtensionManager &)=delete
 

Static Public Member Functions

static ExtensionManagerinstance ()
 
static void setInstance (ExtensionManager *theInstance)
 

Detailed Description

The PRT plugin (extension) manager. This class is used as a singleton, see instance(). Its main use case is the creation of StreamAdaptors, ResolveMapProviders, Decoders and Encoders based on their extension IDs and URIs.

See also
prtx::Extension
prtx::Encoder
prtx::Decoder
prtx::StreamAdaptor
prtx::ResolveMapProvider

Member Function Documentation

◆ addFactory()

virtual void prtx::ExtensionManager::addFactory ( prtx::ExtensionFactory factory)
pure virtual

Registers an extension factory class. Use this member function to register any custom extensions. Factories will be released on PRT shutdown (i.e. on destruction of the PRT license handle, see prt::init).

Parameters
factoryThe instance of the factory to register. Ownership is transferred to the ExtensionManager.

◆ createDecoder() [1/2]

virtual DecoderPtr prtx::ExtensionManager::createDecoder ( prt::ContentType  ct,
const prtx::URIPtr uri 
) const
pure virtual

Creates a decoder instance which matches the content type and can handle a specific URI. If multiple compatible decoders are available the one with the highest merit is returned.

Parameters
[in]ctThe content type of the desired decoder instance.
[in]uriThe URI which the decoder must be able to handle.
Returns
A shared pointer to a new decoder instance.
See also
prtx::Extension::getMerit()

◆ createDecoder() [2/2]

virtual DecoderPtr prtx::ExtensionManager::createDecoder ( const std::wstring &  id) const
pure virtual

Create a decoder directly by its identifier. See listDecoderIds().

Returns
A shared pointer to the new decoder instance.

◆ createDecoderInfo()

virtual prt::DecoderInfo const* prtx::ExtensionManager::createDecoderInfo ( const std::wstring &  id) const
pure virtual

Creates a decoder info object based on an decoder ID.

Parameters
[in]idThe ID of the new decoder info instance.
Returns
A new DecoderInfo instance. Must be destroyed by the caller.

◆ createEncoder()

virtual EncoderPtr prtx::ExtensionManager::createEncoder ( const std::wstring &  id,
const prt::AttributeMap options,
prt::Callbacks *const  callbacks 
) const
pure virtual

Creates an encoder instance based on its identifier. See listEncoderIds().

Returns
A shared pointer to the new encoder instance.
Parameters
[in]idThe ID of the encoder to be instantiated.
[in]optionsEncoder options for the new instance.
[in]callbacksCallbacks to be used by the new encoder instance.

◆ createEncoderInfo()

virtual prt::EncoderInfo const* prtx::ExtensionManager::createEncoderInfo ( const std::wstring &  id) const
pure virtual

Creates an encoder info object based on an encoder ID. Throws prtx::StatusException if the id is unknown or if the corresponding EncoderFactory is not setup properly.

Parameters
[in]idThe ID of the new info instance.
Returns
A new EncoderInfo instance. Must be destroyed by the caller.

◆ createResolveMapProvider()

virtual ResolveMapProviderPtr prtx::ExtensionManager::createResolveMapProvider ( const prtx::URIPtr uri) const
pure virtual

Create a resolve map provider which matches the URI. If multiple resolve map providers can handle the URI the one with the highest merit is returned.

Parameters
[in]uriThe uri which the resolve map provider must be able to handle.
Returns
A shared pointer to the new resolve map provider instance.

◆ createStreamAdaptor()

virtual StreamAdaptorPtr prtx::ExtensionManager::createStreamAdaptor ( const prtx::URIPtr uri) const
pure virtual

Create a stream adaptor which matches the URI. If multiple stream adaptors can handle the URI the one with the highest merit is returned.

Parameters
[in]uriThe uri which the stream adaptor must be able to handle.
Returns
A shared pointer to the new stream adaptor instance.

◆ instance()

static ExtensionManager& prtx::ExtensionManager::instance ( )
static

Access to the ExtensionManager singleton

◆ listDecoderIds()

virtual void prtx::ExtensionManager::listDecoderIds ( std::vector< std::wstring > &  result) const
pure virtual

List all registered extensions of type prtx::Extension::ET_DECODER.

◆ listEncoderIds()

virtual void prtx::ExtensionManager::listEncoderIds ( std::vector< std::wstring > &  result) const
pure virtual

List all registered extensions of type prtx::Extension::ET_ENCODER.


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