Logo Search packages:      
Sourcecode: djvulibre version File versions

DjVmDir0 Class Reference

#include <DjVmDir0.h>

Inheritance diagram for DjVmDir0:


List of all members.

Detailed Description

Directory of all-in-one-file DjVu documents (also known as DjVm documents). This class can read and write the directory (table of contents, in other words) of a DjVm document. This table of contents lists all { files} included into the document, not { pages} like {DjVuNavDir} does. It is normally stored in the document inside { DIR0} chunk where { "0"} refers to the version number.

An object of this class can be created either as a result of the decoding of an existing DjVm file, or manually by calling the default constructor and adding later directory entries by means of {add_file}() function.

You normally will not want to create or decode this directory manually. {DjVmFile} class will do it for you.

Definition at line 109 of file DjVmDir0.h.

Public Member Functions

void add_file (const GUTF8String &name, bool iff_file, int offset=-1, int size=-1)
void decode (ByteStream &bs)
void encode (ByteStream &bs)
int get_count (void) const
GP< FileRecget_file (int file_num)
 Returns the file record number file_num#.
GP< FileRecget_file (const GUTF8String &name)
 Returns the file record with name name#.
int get_size (void) const
 Returns the size of the directory if it were encoded in DIR0# chunk.
Files #"DjVmDir0.h"# and #"DjVmDir0.cpp"# contain implementation of {DjVmDir0} class responsible for reading and writing the directory of a multipage all-in-one-file DjVu document (usually referred to as { DjVm} document.

This is { not} a navigation directory, which lists all the pages in a multipage document. The navigation directory is supported by class {DjVuNavDir}. This is the directory of a DjVm archive.

Directory of DjVu all-in-one-file DjVu documents.

Andrei Erofeev <eaf@geocities.com>
DjVmDir0.h,v 1.8 2003/11/07 22:08:20 leonb Exp

 DjVmDir0 (const DjVmDir0 &d)
 Copy constructor.
int get_files_num (void) const
 Returns the number of files in the DjVm archive.

Static Public Member Functions

static GP< DjVmDir0create (void)

Protected Member Functions

 DjVmDir0 (void)
 Default constructor.

Protected Attributes

volatile int count
 The reference counter.

Private Attributes

GMap< GUTF8String, GP< FileRec > > name2file
GPArray< FileRecnum2file


class  FileRec

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

Generated by  Doxygen 1.6.0   Back to index