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

#include <djv_profiles.h>

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

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 ()
 
- Public Member Functions inherited from Celartem::Referable
 Referable ()
 
void addRef () const
 
void releaseRef () const
 
size_t getReferenceCount () const
 

Static Public Member Functions

static AutoPtr< ProfileRepositoryloadRepository (const String &inProfileRepositoryUrl=NullString)
 
- Static Public Member Functions inherited from Celartem::Referable
static void dumpDbgAllRefCount ()
 

Detailed Description

ProfileRepository manages profiles installed on a machine.

Constructor & Destructor Documentation

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

Destructor.

Member Function Documentation

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

Helper method for backup on external file.

Parameters
inFileNameFile 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
inProfileNameName 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
outProfileNamesAn 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
inProfilePointer to a Profile instance.
inProfileNameName 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
inProfileNameName 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
inProfileNameName 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
inProfileRepositoryUrlReserved; 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
inProfileNameName of profile.
virtual void Celartem::DjVu::ProfileRepository::renameProfile ( const String inOldProfileName,
const String inNewProfileName 
)
pure virtual

Rename an existing profile in repository.

Parameters
inOldProfileNameExisting name of a profile.
inNewProfileNameNew 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:

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