Celartem::DocFactory Class Reference

#include <pxl_docfactory.h>

Inheritance diagram for Celartem::DocFactory:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual AutoPtr< Docload (Storage *inStorage, CredentialProvider *inCredentialProvider=NULL, HttpManager *inManager=NULL)=0
virtual AutoPtr< DocloadAlternativeDoc (Storage *inStorage)=0
virtual void registerDocLoader (DocLoaderFunc inDocLoader)=0
virtual void registerDefaultDocLoaders ()=0
virtual AutoPtr< PixelLiveSystemgetPixelLiveSystem () const =0
virtual AutoPtr< DocFactoryduplicate () const =0


Detailed Description

DocFactory manages several image formats and load a file.
In usual case, you don't have to create a new instance of this class but use PixelLiveSystem::load or PixelLiveSystem::getDefaultDocFactory.
Although the DocFactory instance obtained by PixelLiveSystem::getDefaultDocFactory is already capable of loading image formats that is natively supported by PixelLive SDK, the DocFactory instance created with PixelLiveSystem::create is not capable of loading any image formats. You should register the image loader to the DocFactory instance by calling either of the following functions:

or you can also use registerDefaultDocLoaders of this class.

DocFactory is also designed to deal with the files that requires authentication before loading it, for more information, see Open the Image Files that Requires Authentication.

You can also load PFZ thumbnail and metadata information by loadAlternativeDoc function.

See also:
registerDefaultDocLoaders, registerVFZDocLoader, registerMrSIDDocLoader, registerTIFFDocLoader, registerPNGDocLoader, registerJPEGDocLoader, registerBMPDocLoader

Definition at line 75 of file pxl_docfactory.h.


Member Function Documentation

virtual AutoPtr<Doc> Celartem::DocFactory::load ( Storage inStorage,
CredentialProvider inCredentialProvider = NULL,
HttpManager inManager = NULL 
) [pure virtual]

This function load an Doc instance from the specified Storage instance.

Parameters:
inStorage The storage which contains images.
inCredentialProvider If some authentication process is required to open the file, this instance provides the required credential information for it. For more information, see Open the Image Files that Requires Authentication.
inManager If the authentication process requires network connection, it should be specified. If no HttpManager instance is specified and the authentication requires network connection, this function create a HttpManager instance automatically.
Returns:
Pointer to the newly created Doc instance.
See also:
loadAlternativeDoc, PixelLiveSystem::load, DocFactory, Doc

CredentialProvider, HttpManager

virtual AutoPtr<Doc> Celartem::DocFactory::loadAlternativeDoc ( Storage inStorage  )  [pure virtual]

This function load an alternative Doc instance from the specified Storage instance if available. The function is usually used with PFZ files (or secure storage files) that contains unprotected information (that can be obtained without authentication).
Currently, only PFZ 2.4 files are supported and if the specified Storage instance does not contain PFZ file, this function throws an exception.

Parameters:
inStorage The storage which contains images.
Returns:
Pointer to the newly created Doc instance.
See also:
load, PixelLiveSystem::load, DocFactory, Doc

virtual void Celartem::DocFactory::registerDocLoader ( DocLoaderFunc  inDocLoader  )  [pure virtual]

This function registers the specified image format loader function to this DocFactory instance.
Re-registration of the same DocLoaderFunc is accepted and it does not throw any errors.

Parameters:
inDocLoader Pointer to the image format loader function.
See also:
DocLoaderFunc

virtual void Celartem::DocFactory::registerDefaultDocLoaders (  )  [pure virtual]

This function registers all the system defined image format loaders. Currently, PixelLive SDK supports the following formats by default:

virtual AutoPtr<PixelLiveSystem> Celartem::DocFactory::getPixelLiveSystem (  )  const [pure virtual]

This function returns the PixelLiveSystem instance that is associated with this DocFactory instance.

Returns:
Pointer to the PixelLiveSystem instance.

virtual AutoPtr<DocFactory> Celartem::DocFactory::duplicate (  )  const [pure virtual]

This function duplicates the DocFactory instance.

Returns:
Pointer to the newly created copy of the DocFactory.


The documentation for this class was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:11 2008.