Public Member Functions | Static Public Member Functions | List of all members
Celartem::DjVu::StorageData Class Reference

#include <djv_data.h>

Inheritance diagram for Celartem::DjVu::StorageData:
Inheritance graph

Public Member Functions

virtual size_t getSize () const
virtual AutoPtr< StoragegetReadOnlyStorage () const
AutoPtr< StoragegetBaseStorage ()
virtual AutoPtr< Dataduplicate (bool inCompaction=false) const
virtual void compact ()
virtual void lock () const
virtual void unlock () const
- Public Member Functions inherited from Celartem::DjVu::Data
void decompressToMemory (SimpleArray< u8 > &outBuffer) const
- Public Member Functions inherited from Celartem::Referable
 Referable ()
void addRef () const
void releaseRef () const
size_t getReferenceCount () const

Static Public Member Functions

static AutoPtr< StorageDatacreate (Storage *inStorage, uint64_t inOffset, size_t inSize)
static AutoPtr< StorageDatacreate (Storage *inStorage)
- Static Public Member Functions inherited from Celartem::Referable
static void dumpDbgAllRefCount ()

Detailed Description

This implementation provides Storage based data structure.

Member Function Documentation

virtual void Celartem::DjVu::StorageData::compact ( )

Minimize the memory usage by removing reserved area.

Implements Celartem::DjVu::Data.

static AutoPtr<StorageData> Celartem::DjVu::StorageData::create ( Storage inStorage,
uint64_t  inOffset,
size_t  inSize 

Creates a StorageData instance on an existing Storage.

inStorageStorage to load data from.
inOffsetAbsolute data offset from the storage top.
inSizeSize of the data. It could be 0 for empty data.

Referenced by duplicate().

static AutoPtr<StorageData> Celartem::DjVu::StorageData::create ( Storage inStorage)

Creates a StorageData instance on an existing Storage.
Please note that StorageData instance always rewind the storage before making the client access the data.

inStorageStorage to load data from.
virtual AutoPtr<Data> Celartem::DjVu::StorageData::duplicate ( bool  inCompaction = false) const

Duplicate the Data instance.

inCompactionWhether the duplication process also does compaction of memory usage or not.
Pointer to the newly created Data instance.

Implements Celartem::DjVu::Data.

AutoPtr<Storage> Celartem::DjVu::StorageData::getBaseStorage ( )

Get the base Storage instance.

Pointer to the base Storage instance.
virtual AutoPtr<Storage> Celartem::DjVu::StorageData::getReadOnlyStorage ( ) const

Get readonly Storage access to the actual data.
The caller should not write to the stream but only reads the data from it. The Storage should be rewound to the beginning position.

Pointer to the Storage instance.

Implements Celartem::DjVu::Data.

virtual size_t Celartem::DjVu::StorageData::getSize ( ) const

Get the size of the data.

The size of the data.

Implements Celartem::DjVu::Data.

virtual void Celartem::DjVu::StorageData::lock ( ) const

Locks the instance.
This method provides a synchronization mechanism for processing the instance between threads.
If you plan to use the instance in multi-threaded program, it's recommended to lock the instance before accessing the data.

See Also
unlock, Locker, Lockable

Implements Celartem::DjVu::Data.

virtual void Celartem::DjVu::StorageData::unlock ( ) const

Releases the lock on the instance.

See Also
lock, Locker, Lockable

Implements Celartem::DjVu::Data.

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