Public Member Functions | Static Public Member Functions

Celartem::DjVu::Profile Class Reference

#include <djv_profiles.h>

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

List of all members.

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 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 ()

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)

Detailed Description

A profile is a virtual file which stores encoding parameters (DjVuEncoder::Params structure). All the profiles are installed in profile repository and maintained by ProfileRepository class.
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.


Constructor & Destructor Documentation

virtual Celartem::DjVu::Profile::~Profile (  )  [inline, virtual]

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:
inNewProfileName Name for the newly created profile.
inNewDescription Description for the newly created profile.
inParams Parameters 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:
inNewProfileName Name 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:
inXmlFileName Output 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:
inXmlFileName Output 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.

static AutoPtr<Profile> Celartem::DjVu::Profile::importFromXml ( const String inXmlText  )  [static]

Import parameters from XML.

Parameters:
inXmlText Input 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:
inXmlFileName Input 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:
inDescription Description 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:
inParams Parameters to set.
virtual void Celartem::DjVu::Profile::setReadOnly ( bool  inReadOnly  )  [pure virtual]

Set read-only flag.

Parameters:
inReadOnly Set whether the profile is read-only (true) or not (false).

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:21.
Caminova Logo