• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

DjVmDir0 Class Reference

Directory of all-in-one-file DjVu documents (also known as DjVm documents). More...

#include <DjVmDir0.h>

Inheritance diagram for DjVmDir0:

Inheritance graph
[legend]

List of all members.


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.

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


 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]

Default constructor.

Definition at line 119 of file DjVmDir0.h.

DjVmDir0::DjVmDir0 ( const DjVmDir0 &  d  )  [inline]

Copy constructor.

Definition at line 203 of file DjVmDir0.h.

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.

static GP<DjVmDir0> DjVmDir0::create ( void   )  [inline, static]

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  ) 

Returns the file record number file_num#.

Definition at line 141 of file DjVmDir0.cpp.

GP< DjVmDir0::FileRec > DjVmDir0::get_file ( const GUTF8String &  name  ) 

Returns the file record with name name#.

Definition at line 133 of file DjVmDir0.cpp.

int DjVmDir0::get_files_num ( void   )  const [inline]

Returns the number of files in the DjVm archive.

Definition at line 197 of file DjVmDir0.h.

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:
  • DjVmDir0.h
  • DjVmDir0.cpp

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal