Public Types | Public Member Functions | Static Public Member Functions | List of all members
Celartem::DjVu::Profile Class Referenceabstract

#include <djv_profiles.h>

Inheritance diagram for Celartem::DjVu::Profile:
Inheritance graph
[legend]

Public Types

enum  { Version_Jb2Ver2 = 28543, Version_Current = Version_Jb2Ver2 }
 

Public Member Functions

virtual const DjVuEncoder::ParamsgetParams () const =0
 
virtual void setParams (const DjVuEncoder::Params &inParams)=0
 
virtual void setReadOnly (bool inReadOnly)=0
 
virtual bool isInstalled () const =0
 
virtual bool isReadOnly () const =0
 
virtual bool isModified () const =0
 
virtual size_t geVersion () const =0
 
virtual String getProfileName () const =0
 
virtual String getDescription () const =0
 
virtual void setDescription (const String &inDescription)=0
 
virtual void exportToXmlFile (const String &inXmlFileName) const =0
 
virtual String exportToXml () const =0
 
virtual AutoPtr< Profileduplicate (const String &inNewProfileName) const =0
 
virtual ~Profile ()
 
- Public Member Functions inherited from Celartem::Referable
 Referable ()
 
void addRef () const
 
void releaseRef () const
 
size_t getReferenceCount () const
 

Static Public Member Functions

static AutoPtr< Profilecreate (const String &inNewProfileName, const String &inNewDescription=NullString, const DjVuEncoder::Params *inParams=NULL)
 
static AutoPtr< ProfileimportFromXmlFile (const String &inXmlFileName)
 
static AutoPtr< ProfileimportFromXml (const String &inXmlText)
 
- Static Public Member Functions inherited from Celartem::Referable
static void dumpDbgAllRefCount ()
 

Detailed Description

    A %profile is a virtual file which stores encoding parameters
    (\ref DjVuEncoder::Params structure). All the profiles are installed in
    profile repository and maintained by \ref ProfileRepository class.\n
    The following code illustrates how to load a profile:
AutoPtr<ProfileRepository> repo = ProfileRepository::loadRepository();
AutoPtr<Profile> profile = repo->loadProfile("Default Profile");
const Params& params = profile->getParams();
...

For more information about profiles, see DjVu Encoder Profiles.

Member Enumeration Documentation

anonymous enum
Enumerator
Version_Jb2Ver2 

Version, which introduces new JB2 encoder.

This version introduces new JB2 encoder; which accepts match-threshold directly.

Version_Current 

Current profile version.

Constructor & Destructor Documentation

virtual Celartem::DjVu::Profile::~Profile ( )
inlinevirtual

Destructor.

Member Function Documentation

static AutoPtr<Profile> Celartem::DjVu::Profile::create ( const String inNewProfileName,
const String inNewDescription = NullString,
const DjVuEncoder::Params inParams = NULL 
)
static

Create a new profile.

Parameters
inNewProfileNameName for the newly created profile.
inNewDescriptionDescription for the newly created profile.
inParamsParameters on which a new profile is created.
This can be NULL and then the profile is created using default parameters.
Returns
Pointer to a newly created Profile instance.
virtual AutoPtr<Profile> Celartem::DjVu::Profile::duplicate ( const String inNewProfileName) const
pure virtual

Duplicate this profile.

Parameters
inNewProfileNameName for the newly created profile.
Returns
Pointer to the newly created profile.
virtual String Celartem::DjVu::Profile::exportToXml ( ) const
pure virtual

Export the current parameters of this instance.

Parameters
inXmlFileNameOutput XML file name. Please note that this method outputs the status of this "instance" not the profile on the repository.
See Also
importFromXmlFile, exportToXmlFile, importFromXml
virtual void Celartem::DjVu::Profile::exportToXmlFile ( const String inXmlFileName) const
pure virtual

Export the current parameters of this instance.

Parameters
inXmlFileNameOutput XML file name. Please note that this method outputs the status of this "instance" not the profile on the repository.
See Also
exportToXml, importFromXmlFile, importFromXml
virtual String Celartem::DjVu::Profile::getDescription ( ) const
pure virtual

Get profile description.

Returns
The profile description.
virtual const DjVuEncoder::Params& Celartem::DjVu::Profile::getParams ( ) const
pure virtual

Load parameters from the profile.

Returns
Read only Param structure instance.
virtual String Celartem::DjVu::Profile::getProfileName ( ) const
pure virtual

Get profile name.
If the profile is not installed to the repository by ProfileRepository::installProfile method, this method will fail and throw an exception.

Returns
The name of this profile.

To modify the name of a profile, use ProfileRepository::renameProfile method.

virtual size_t Celartem::DjVu::Profile::geVersion ( ) const
pure virtual

Get the loaded profile version.

Returns
The loaded profile version.
static AutoPtr<Profile> Celartem::DjVu::Profile::importFromXml ( const String inXmlText)
static

Import parameters from XML.

Parameters
inXmlTextInput XML text data.
Returns
Pointer to a newly created Profile instance.
See Also
exportToXml, exportToXmlFile, importFromXmlFile
static AutoPtr<Profile> Celartem::DjVu::Profile::importFromXmlFile ( const String inXmlFileName)
static

Import parameters from XML file.

Parameters
inXmlFileNameInput repository XML file name.
The file name optionally contains profile name within the XML file in the following syntax: XML_FILENAME:PROFILE_FILENAME
Returns
Pointer to a newly created Profile instance.
See Also
exportToXml, exportToXmlFile, importFromXml
virtual bool Celartem::DjVu::Profile::isInstalled ( ) const
pure virtual

Determine whether this profile is installed on the system or not.

Returns
true if this profile is installed; otherwise false.
virtual bool Celartem::DjVu::Profile::isModified ( ) const
pure virtual

Determine whether this instance is modified from the loaded configuration or not.

Returns
true if this profile is modified; otherwise false.
virtual bool Celartem::DjVu::Profile::isReadOnly ( ) const
pure virtual

Determine whether this profile is read-only or not.

Returns
true if this profile is read-only; otherwise false.
virtual void Celartem::DjVu::Profile::setDescription ( const String inDescription)
pure virtual

Set profile description.

Parameters
inDescriptionDescription for this profile.
virtual void Celartem::DjVu::Profile::setParams ( const DjVuEncoder::Params inParams)
pure virtual

Set parameters to the profile.
If the profile is read-only, this method throws an exception.

Parameters
inParamsParameters to set.
virtual void Celartem::DjVu::Profile::setReadOnly ( bool  inReadOnly)
pure virtual

Set read-only flag.

Parameters
inReadOnlySet whether the profile is read-only (true) or not (false).

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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo