kviewshell
DjVmDir0 Class Reference
Directory of all-in-one-file DjVu documents (also known as DjVm documents). More...
#include <DjVmDir0.h>
Classes | |
class | FileRec |
Describes a file record inside a DjVm document (archive). More... | |
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) |
GP< FileRec > | get_file (int file_num) |
GP< FileRec > | get_file (const GUTF8String &name) |
int | get_size (void) const |
virtual | ~DjVmDir0 (void) |
DjVmDir0.h | |
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.
| |
DjVmDir0 (const DjVmDir0 &d) | |
int | get_files_num (void) const |
Static Public Member Functions | |
static GP< DjVmDir0 > | create (void) |
Protected Member Functions | |
DjVmDir0 (void) |
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.
Constructor & Destructor Documentation
DjVmDir0::DjVmDir0 | ( | void | ) | [inline, protected] |
DjVmDir0::DjVmDir0 | ( | const DjVmDir0 & | d | ) | [inline] |
virtual DjVmDir0::~DjVmDir0 | ( | void | ) | [inline, virtual] |
Definition at line 126 of file DjVmDir0.h.
Member Function Documentation
void DjVmDir0::add_file | ( | const GUTF8String & | name, | |
bool | iff_file, | |||
int | offset = -1 , |
|||
int | size = -1 | |||
) |
Creates a new file record with name name# at offset offset# and size size#, which is in IFF format if iff_file# is TRUE#.
Definition at line 148 of file DjVmDir0.cpp.
Definition at line 124 of file DjVmDir0.h.
void DjVmDir0::decode | ( | ByteStream & | bs | ) |
Decodes the directory from DIR0# chunk from the specified {ByteStream}.
Definition at line 114 of file DjVmDir0.cpp.
void DjVmDir0::encode | ( | ByteStream & | bs | ) |
Encodes the directory in DIR0# chunk into the specified {ByteStream}.
Definition at line 97 of file DjVmDir0.cpp.
GP< DjVmDir0::FileRec > DjVmDir0::get_file | ( | int | file_num | ) |
GP< DjVmDir0::FileRec > DjVmDir0::get_file | ( | const GUTF8String & | name | ) |
int DjVmDir0::get_files_num | ( | void | ) | const [inline] |
int DjVmDir0::get_size | ( | void | ) | const |
Returns the size of the directory if it were encoded in DIR0# chunk.
Definition at line 77 of file DjVmDir0.cpp.
The documentation for this class was generated from the following files: