Logo Search packages:      
Sourcecode: djvulibre version File versions

DjVmDoc Class Reference

#include <DjVmDoc.h>

Inheritance diagram for DjVmDoc:

GPEnabled

List of all members.


Detailed Description

Read/Write DjVu multipage documents.

The "new" DjVu multipage documents can be of two types: {bundled} and {indirect}. In the first case all pages are packed into one file, which is very like an archive internally. In the second case every page is stored in a separate file. Plus there can be other components, included into one or more pages, which also go into separate files. In addition to pages and components, in the case of the {indirect} format there is one more top-level file with the document directory (see {DjVmDir}), which is basically an index file containing the list of all files composing the document.

This class can read documents of both formats and can save them under any format. It is therefore ideal for converting between {bundled} and {indirect} formats. It cannot be used however for reading obsolete formats. The best way to convert obsolete formats consists in reading them with class {DjVuDocument} class and saving them using {DjVuDocument::write} or {DjVuDocument::expand}.

This class can also be used to create and modify multipage documents at the low level without decoding every page or component (See {insert_file}() and {delete_file}()).

Definition at line 116 of file DjVmDoc.h.


Public Member Functions

void delete_file (const GUTF8String &id)
int get_count (void) const
GP< DataPoolget_data (const GUTF8String &id) const
void insert_file (const GP< DjVmDir::File > &f, GP< DataPool > data, int pos=-1)
void insert_file (const GP< DataPool > &pool, DjVmDir::File::FILE_TYPE file_type, const GUTF8String &name, const GUTF8String &id, const GUTF8String &title=GUTF8String(), int pos=-1)
void insert_file (ByteStream &data, DjVmDir::File::FILE_TYPE file_type, const GUTF8String &name, const GUTF8String &id, const GUTF8String &title=GUTF8String(), int pos=-1)
void expand (const GURL &codebase, const GUTF8String &idx_name)
GUTF8String save_file (const GURL &codebase, const DjVmDir::File &file, GMap< GUTF8String, GUTF8String > &incl, const GP< DataPool > &pool) const
void save_file (const GURL &codebase, const DjVmDir::File &file) const
void save_page (const GURL &codebase, const DjVmDir::File &file, GMap< GUTF8String, GUTF8String > &incl) const
void save_page (const GURL &codebase, const DjVmDir::File &file) const
void write (const GP< ByteStream > &str, const GMap< GUTF8String, void * > &reserved)
void write (const GP< ByteStream > &str)
void write_index (const GP< ByteStream > &str)
DjVmDoc.h
Files #"DjVmDoc.h"# and #"DjVmDoc.cpp"# contain implementation of the {DjVmDoc} class used to read and write new DjVu multipage documents.

DjVu multipage documents reader/writer.

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

GP< DjVmDirget_djvm_dir (void)
void read (const GURL &url)
void read (const GP< DataPool > &data_pool)
void read (ByteStream &str)

Static Public Member Functions

static GP< DjVmDoccreate (void)
 Creator.

Protected Member Functions

void init (void)

Protected Attributes

volatile int count
 The reference counter.

Private Member Functions

void save_file (const GURL &codebase, const DjVmDir::File &file, GMap< GUTF8String, GUTF8String > *incl) const

Static Private Member Functions

static void write (ByteStream *)
static void write_index (ByteStream *)

Private Attributes

GPMap< GUTF8String, DataPooldata
GP< DjVmDirdir

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

Generated by  Doxygen 1.6.0   Back to index