Public Member Functions | Static Public Member Functions | List of all members
Celartem::DjVu::ChunkRedirector Class Referenceabstract

#include <djv_chunks.h>

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

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
 
- Public Member Functions inherited from Celartem::DjVu::Chunk
virtual String getId () const =0
 
virtual const DatagetData () const =0
 
virtual void setData (const Data *inData)=0
 
virtual const ArraygetChildren () const =0
 
virtual ArraygetChildren ()=0
 
virtual size_t find (const String &inIdentifier, size_t inPrevPos=(size_t) 0-1, bool inOnlyAvailable=false) const =0
 
virtual size_t find (const String &inId1, const String &inId2, size_t inPrevPos=(size_t) 0-1, bool inOnlyAvailable=false) const =0
 
virtual bool isIncluded () const =0
 
virtual bool isAvailable () const =0
 
virtual bool isCollection () const =0
 
virtual void preload (OnChunkCallback inOnChunkCallback=NULL, void *inContext=NULL)=0
 
virtual void prepareForMerger (const Chunk *inChunkMergeTo, std::map< String, String > *outNameRemappings=NULL, bool inDoingAutoNavmAnnoRemapping=true, RenameFunc inRenameFunc=NULL, void *inRenameContext=NULL)=0
 
virtual void compact ()=0
 
virtual void disconnectFromOriginalSources (DisconnectMethod inDisconnectMethod=dm_OnTempFile, OnChunkCallback inOnChunkCallback=NULL, void *inContext=NULL, Storage *inTemporaryStorage=NULL)=0
 
virtual void setSecurityProvider (const SecurityProvider *inSecProv)=0
 
virtual const SecurityProvidergetSecurityProvider () const =0
 
virtual void lock () const =0
 
virtual void unlock () const =0
 
virtual ChunkgetDirectPointer ()=0
 
virtual String getName () const =0
 
- Public Member Functions inherited from Celartem::Referable
 Referable ()
 
void addRef () const
 
void releaseRef () const
 
size_t getReferenceCount () const
 

Static Public Member Functions

static AutoPtr< ChunkRedirectorcreate (Chunk *inChunk)
 
static AutoPtr< ChunkRedirectorcreate (Chunk *inChunk, const String &inChunkName)
 
- Static Public Member Functions inherited from Celartem::DjVu::Chunk
static AutoPtr< Chunkcreate (const String &inIdentifier)
 
static AutoPtr< Chunkcreate (const String &inIdentifier, const void *inData, size_t inDataSize)
 
static AutoPtr< Chunkcreate (const String &inIdentifier, Stream *inDataStream)
 
static AutoPtr< ChunkcreateCollection (const String &inIdentifier)
 
- Static Public Member Functions inherited from Celartem::Referable
static void dumpDbgAllRefCount ()
 

Additional Inherited Members

- Public Types inherited from Celartem::DjVu::Chunk
enum  DisconnectMethod { dm_OnMemory = 0, dm_OnTempFile = 1, dm_AllOnTempFile = 2 }
 
typedef SimpleArray< AutoPtr
< Chunk > > 
Array
 
typedef void(* OnChunkCallback )(void *inContext, Chunk *inChunkLoaded)
 
typedef String(* RenameFunc )(void *inContext, const String &inOldName, const Chunk *inTarget, size_t inTrial)
 

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
inChunkPointer 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
inChunkPointer to a Chunk instance.
inChunkNameName 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<Chunk> Celartem::DjVu::ChunkRedirector::getRedirectionTarget ( )
pure virtual

Get pointer to the redirection target Chunk instance.

Returns
Pointer to the redirection target Chunk instance.
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 void Celartem::DjVu::ChunkRedirector::setRedirectionId ( const String inRedirectionId)
pure virtual

Set the redirection identifier.

Parameters
inRedirectionIdThe 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
inChunkPointer to the redirection target Chunk instance.

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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo