#include <ExtensionFactory.h>
This is the base class for all extension factories. Usually it should not be sub-classed directly, use StreamAdaptorFactory, ResolveMapProviderFactory, DecoderFactory, or EncoderFactory for your own extensions.
All ExtensionFactory subclasses must be used as singletons and are typically directly passed into prtx::ExtensionManager::addFactory.
ExtensionFactories and subclasses must be immutable.
- See also
- prtx::ExtensionManager
-
prtx::ClassUtils::Singleton
◆ canHandleURI()
virtual bool prtx::ExtensionFactory::canHandleURI |
( |
prtx::URIPtr |
uri | ) |
const |
|
pure virtual |
◆ create()
virtual Extension* prtx::ExtensionFactory::create |
( |
| ) |
const |
|
pure virtual |
Subclasses must override this member function to create an instance of the corresponding extension.
◆ getContentType()
◆ getDefaultMerit()
static float prtx::ExtensionFactory::getDefaultMerit |
( |
| ) |
|
|
static |
Returns the default merit for all extensions (1.0).
◆ getDescription()
virtual const std::wstring& prtx::ExtensionFactory::getDescription |
( |
| ) |
const |
|
pure virtual |
◆ getExtensionType()
◆ getID()
virtual const std::wstring& prtx::ExtensionFactory::getID |
( |
| ) |
const |
|
pure virtual |
Returns the unique ID of the extension instances this factory will create.
Implemented in prtx::EncoderFactory.
◆ getMerit()
virtual float prtx::ExtensionFactory::getMerit |
( |
| ) |
const |
|
inlinevirtual |
An extension can override and increase getMerit to influence the resolve order of an URI. Extensions with higher merits have higher priority.
◆ getName()
virtual const std::wstring& prtx::ExtensionFactory::getName |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: