Public Member Functions | Static Public Member Functions

Celartem::DjVu::ChunkRedirector Class Reference

#include <djv_chunks.h>

Inheritance diagram for Celartem::DjVu::ChunkRedirector:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual AutoPtr< ChunkgetRedirectionTarget ()=0
virtual AutoPtr< const ChunkgetRedirectionTarget () const =0
virtual void setRedirectionTarget (const Chunk *inChunk)=0
virtual String getRedirectionId () const =0
virtual void setRedirectionId (const String &inRedirectionId)=0

Static Public Member Functions

static AutoPtr< ChunkRedirectorcreate (Chunk *inChunk)
static AutoPtr< ChunkRedirectorcreate (Chunk *inChunk, const String &inChunkName)

Detailed Description

ChunkRedirector is used for representing INCL chunk used in DjVu file.
ChunkRedirector behaves as if it were a normal chunk and usually, the user of ChunkRedirector don't have to know it's a special "redirector" of the Chunk instance. In other words, without dynamic_cast<ChunkRedirector>, the user cannot determine that it's a ChunkRedirector.
The DjVu serializers treats ChunkRedirector as a special chunk and it automatically checks whether a redirection target is shared by multiple 'redirector' chunks or not. And if a redirection target is shared by multiple chunks, the serializers inserts INCL and DJVI automatically; otherwise ChunkRedirector is removed on the serialization phase and the output DjVu file uses no INCL chunk.


Member Function Documentation

static AutoPtr<ChunkRedirector> Celartem::DjVu::ChunkRedirector::create ( Chunk inChunk  )  [static]

Create a ChunkRedirector instance which redirects method calls to a specified instance.

Parameters:
inChunk Pointer to a Chunk instance.
Returns:
Pointer to the newly created ChunkRedirector instance.
static AutoPtr<ChunkRedirector> Celartem::DjVu::ChunkRedirector::create ( Chunk inChunk,
const String inChunkName 
) [static]

Create a ChunkRedirector instance which redirects method calls to a specified instance.

Parameters:
inChunk Pointer to a Chunk instance.
inChunkName Name of the chunk.
Note that all the top-level chunks in a DjVu file is located by its own name and name duplication may result in serious problem. So you should keep the uniqueness of the chunks in a file. For normal use, you had better use the other create(Chunk*) method which automatically adopts a name based on GUID mechanism.
Returns:
Pointer to the newly created ChunkRedirector instance.
virtual String Celartem::DjVu::ChunkRedirector::getRedirectionId (  )  const [pure virtual]

Get the redirection identifier.

Returns:
The identifier used by DIRM to identify this chunk.
See also:
IFF::Layout
virtual AutoPtr<const Chunk> Celartem::DjVu::ChunkRedirector::getRedirectionTarget (  )  const [pure virtual]

Get pointer to the redirection target Chunk instance.

Returns:
Pointer to the redirection target Chunk instance.
virtual AutoPtr<Chunk> Celartem::DjVu::ChunkRedirector::getRedirectionTarget (  )  [pure virtual]

Get pointer to the redirection target Chunk instance.

Returns:
Pointer to the redirection target Chunk instance.
virtual void Celartem::DjVu::ChunkRedirector::setRedirectionId ( const String inRedirectionId  )  [pure virtual]

Set the redirection identifier.

Parameters:
inRedirectionId The identifier used by DIRM to identify this chunk.
See also:
IFF::Layout
virtual void Celartem::DjVu::ChunkRedirector::setRedirectionTarget ( const Chunk inChunk  )  [pure virtual]

Set pointer to the redirection target Chunk instance.

Parameters:
inChunk Pointer to the redirection target Chunk instance.

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:19.
Caminova Logo