class File: public GPEnabled

Class File represents the directory records managed by class DjVmDir.

Inheritance:


Public Classes

[more]enum FILE_TYPE
File type.

Public Fields

[more]GString name
File name.
[more]GString id
File identifier.
[more]GString title
File title.
[more]int offset
Offset of the file data in a bundled DJVM file.
[more]int size
Size of the file data in a bundled DJVM file.

Public Methods

[more]static bool is_legal_id(const char *id)
Tests whether a file ID is legal.
[more]bool is_page(void) const
Tests if this file represents a page of the document.
[more]bool is_include(void) const
Returns TRUE if this file is included into some other files of this document
[more]bool is_thumbnails(void) const
Returns TRUE if this file contains thumbnails for the document pages.
[more]bool is_shared_anno(void) const
Returns the page number of this file.
[more] File(void)
Default constructor.
[more] File(const char *name, const char *id, const char *title, FILE_TYPE file_type)
Full constructor.


Documentation

Class File represents the directory records managed by class DjVmDir.
oenum FILE_TYPE
File type. Possible file types are:
PAGE
This is a top level page file. It may include other INCLUDEd files, which may in turn be shared between different pages.
INCLUDE
This file is included into some other file inside this document.
THUMBNAILS
This file contains thumbnails for the document pages.
SHARED_ANNO
This file contains annotations shared by all the pages. It's supposed to be included into every page for the annotations to take effect. There may be only one file with shared annotations in a document.

oGString name
File name. The optional file name must be unique and is assigned either by encoder or by user when the document is composed. In the case of an indirect document, this is the relative URL of the file. By keeping the name in bundled document we guarantee, that it can be expanded later into indirect document and files will still have the same names.

oGString id
File identifier. The encoder assigns a unique identifier to each file in a multipage document. Indirection chunks in other files ("INCL" chunks) may refer to another file using its identifier.

oGString title
File title. The file title is assigned by the user and may be used as a shortcut for viewing a particular page. Names like "chapter1" or "appendix" are appropriate.

oint offset
Offset of the file data in a bundled DJVM file. This number is relevant in the bundled case only when everything is packed into one single file.

oint size
Size of the file data in a bundled DJVM file. This number is relevant in the bundled case only when everything is packed into one single file.

ostatic bool is_legal_id(const char *id)
Tests whether a file ID is legal. This function only checks that It does not check for duplicate file IDs in a directory.

obool is_page(void) const
Tests if this file represents a page of the document.

obool is_include(void) const
Returns TRUE if this file is included into some other files of this document

obool is_thumbnails(void) const
Returns TRUE if this file contains thumbnails for the document pages.

obool is_shared_anno(void) const
Returns the page number of this file. This function returns -1 if this file does not represent a page of the document.

o File(void)
Default constructor.

o File(const char *name, const char *id, const char *title, FILE_TYPE file_type)
Full constructor.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of AT&T.
All other products mentioned are registered trademarks or trademarks of their respective companies.