Public Member Functions | Static Public Member Functions

Celartem::DjVu::ProfileRepository Class Reference

#include <djv_profiles.h>

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

List of all members.

Public Member Functions

virtual void reload ()=0
virtual bool sync ()=0
virtual bool isModified () const =0
virtual void backupSave (const String &inFileName) const =0
virtual bool isModifiedExternally () const =0
virtual void enumProfiles (SimpleArray< String > &outProfileNames) const =0
virtual AutoPtr< const ProfileloadProfile (const String &inProfileName) const =0
virtual AutoPtr< ProfileloadProfile (const String &inProfileName)=0
virtual void installProfile (Profile *inProfile, const String &inProfileName=NullString)=0
virtual void removeProfile (const String &inProfileName)=0
virtual bool doesExist (const String &inProfileName) const =0
virtual void renameProfile (const String &inOldProfileName, const String &inNewProfileName)=0
virtual ~ProfileRepository ()

Static Public Member Functions

static AutoPtr< ProfileRepositoryloadRepository (const String &inProfileRepositoryUrl=NullString)

Detailed Description

ProfileRepository manages profiles installed on a machine.


Constructor & Destructor Documentation

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

Destructor.


Member Function Documentation

virtual void Celartem::DjVu::ProfileRepository::backupSave ( const String inFileName  )  const [pure virtual]

Helper method for backup on external file.

Parameters:
inFileName File name to save the repository content to.
virtual bool Celartem::DjVu::ProfileRepository::doesExist ( const String inProfileName  )  const [pure virtual]

Determine whether a profile by the name exists or not.

Parameters:
inProfileName Name of profile.
Returns:
true if a profile by the name already exists; otherwise false.
virtual void Celartem::DjVu::ProfileRepository::enumProfiles ( SimpleArray< String > &  outProfileNames  )  const [pure virtual]

Enumerate installed profiles.

Parameters:
outProfileNames An array which receives the list of profile names.
virtual void Celartem::DjVu::ProfileRepository::installProfile ( Profile inProfile,
const String inProfileName = NullString 
) [pure virtual]

Install a new profile to repository.
If the repository is read-only, this method will fail and throw an exception.

Parameters:
inProfile Pointer to a Profile instance.
inProfileName Name of profile. It should not exist on the repository.
If this is NULL, this method use the profile's name to install the profile.
virtual bool Celartem::DjVu::ProfileRepository::isModified (  )  const [pure virtual]

Determine whether the repository is modified (not synchronized) or not.

Returns:
true if modified; otherwise false.
virtual bool Celartem::DjVu::ProfileRepository::isModifiedExternally (  )  const [pure virtual]

This method determines whether the repository is modified out of the program or not.
This method is useful when running several repository editors.

Returns:
true if the repository is externally modified; otherwise false.
virtual AutoPtr<const Profile> Celartem::DjVu::ProfileRepository::loadProfile ( const String inProfileName  )  const [pure virtual]

Load a profile.
This method is for read-only purpose.

Parameters:
inProfileName Name of profile. This is not a file name but one of the names obtained by enumProfiles method.
Returns:
Pointer to the loaded Profile instance.
virtual AutoPtr<Profile> Celartem::DjVu::ProfileRepository::loadProfile ( const String inProfileName  )  [pure virtual]

Load a profile.
If the profile or the repository is read-only, this method will fail and throw an exception; you should use read-only version of this method.

Parameters:
inProfileName Name of profile. This is not a file name but one of the names obtained by enumProfiles method.
Returns:
Pointer to the loaded Profile instance.
static AutoPtr<ProfileRepository> Celartem::DjVu::ProfileRepository::loadRepository ( const String inProfileRepositoryUrl = NullString  )  [static]

Load profile repository.

Parameters:
inProfileRepositoryUrl Reserved; should be NullString for normal purpose.
Returns:
Pointer to ProfileRepository instance.
virtual void Celartem::DjVu::ProfileRepository::reload (  )  [pure virtual]

Reload the repository.
This method reloads the repository to memory.

virtual void Celartem::DjVu::ProfileRepository::removeProfile ( const String inProfileName  )  [pure virtual]

Remove an existing profile from repository

Parameters:
inProfileName Name of profile.
virtual void Celartem::DjVu::ProfileRepository::renameProfile ( const String inOldProfileName,
const String inNewProfileName 
) [pure virtual]

Rename an existing profile in repository.

Parameters:
inOldProfileName Existing name of a profile.
inNewProfileName New name of the profile; it should not exist.
virtual bool Celartem::DjVu::ProfileRepository::sync (  )  [pure virtual]

Synchronize the repository.
This method confirms that the repository is synchronizes with the instance (the memory instance is written out to the storage.)

Returns:
The synchronization status.

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