class ByteStreamclass DjVmDir: public GPEnabled

Implements DjVu multipage document directory.

Inheritance:


Public Fields

[more] Changes the title of the file with ID void set_file_title(const char * id, const char * title);

Public Methods

[more] DjVmDir(void)
Class DjVmDir::File represents the directory records managed by class DjVmDir.
[more]void decode(ByteStream & stream)
Decodes the directory from the specified stream.
[more]void encode(ByteStream & stream) const
Encodes the directory into the specified stream.
[more]bool is_indirect(void) const
Tests if directory defines an indirect document.
[more]bool is_bundled(void) const
Tests if the directory defines a bundled document.
[more]GP<File> page_to_file(int page_num) const
Translates page numbers to file records.
[more]GP<File> name_to_file(const GString & name) const
Translates file names to file records.
[more]GP<File> id_to_file(const char * id) const
Translates file IDs to file records.
[more]GP<File> title_to_file(const char * title) const
Translates file shortcuts to file records.
[more]int get_file_pos(const File * f) const
Returns position of the file in the directory.
[more]int get_page_pos(int page_num) const
Returns position of the given page in the directory.
[more]GPList<File> get_files_list(void) const
Returns a copy of the list of file records.
[more]int get_files_num(void) const
Returns the number of file records.
[more]int get_pages_num(void) const
Returns the number of file records representing pages.
[more]GP<File> get_shared_anno_file(void) const
Returns back pointer to the file with SHARED_ANNO flag.


Inherited from GPEnabled:

Public Methods

oGPEnabled& operator=(const GPEnabled & obj)
oint get_count(void) const

Protected Fields

ovolatile int count


Documentation

Implements DjVu multipage document directory. There are currently two multipage DjVu formats supported: bundled and indirect. In the first format all component files composing a given document are packaged (or bundled) into one file, in the second one every page and component is stored in a separate file and there is one more file, which contains the list of all others.

The multipage document directory lists all component files composing the given document, helps to access every file, identify pages and maintain user-specified shortcuts. Every directory record describes a file composing the document. Each file is identified by a small string named the identifier (ID). Each file may also contain a file name and a title.

The DjVmDir class represents a multipage document directory. Its main purpose is to encode and decode the document directory when writing or reading the DIRM chunk. Normally you don't have to create this class yourself. It's done automatically when DjVmDoc class initializes itself. It may be useful though to be able to access records in the directory because some classes (like DjVuDocument and DjVmDoc) return a pointer to DjVmDir in some cases.

o DjVmDir(void)
Class DjVmDir::File represents the directory records managed by class DjVmDir.

ovoid decode(ByteStream & stream)
Decodes the directory from the specified stream.

ovoid encode(ByteStream & stream) const
Encodes the directory into the specified stream.

obool is_indirect(void) const
Tests if directory defines an indirect document.

obool is_bundled(void) const
Tests if the directory defines a bundled document.

oGP<File> page_to_file(int page_num) const
Translates page numbers to file records.

oGP<File> name_to_file(const GString & name) const
Translates file names to file records.

oGP<File> id_to_file(const char * id) const
Translates file IDs to file records.

oGP<File> title_to_file(const char * title) const
Translates file shortcuts to file records.

oint get_file_pos(const File * f) const
Returns position of the file in the directory.

oint get_page_pos(int page_num) const
Returns position of the given page in the directory.

oGPList<File> get_files_list(void) const
Returns a copy of the list of file records.

oint get_files_num(void) const
Returns the number of file records.

oint get_pages_num(void) const
Returns the number of file records representing pages.

oGP<File> get_shared_anno_file(void) const
Returns back pointer to the file with SHARED_ANNO flag. Note that there may be only one file with shared annotations in any multipage DjVu document.

o Changes the title of the file with ID void set_file_title(const char * id, const char * title);
Changes the title of the file with ID void set_file_title(const char * id, const char * title);


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.