Celartem::MemoryStorage Class Reference

#include <cel_storage.h>

Inheritance diagram for Celartem::MemoryStorage:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual SimpleArray< u8 > & getArray ()=0
virtual void setAllocationUnit (size_t inAllocationUnitInBytes)=0
virtual void setReadOnly (bool inReadOnly)=0

Static Public Member Functions

static AutoPtr< MemoryStoragecreate (SimpleArray< u8 > &inMemory)
static AutoPtr< MemoryStoragecreate ()
static AutoPtr< MemoryStoragecreate (const void *inData, size_t inDataSize, Endian inEndian=endianHost)


Detailed Description

This class provides the feature of creating writable storage upon SimpleArray <u8> instance.
See also:
storages, RomStorage

Definition at line 653 of file cel_storage.h.


Member Function Documentation

static AutoPtr<MemoryStorage> Celartem::MemoryStorage::create ( SimpleArray< u8 > &  inMemory  )  [static]

This method creates Memory Based R/W Storage.

Parameters:
inMemory A memory to access with the storage to create.
Returns:
Pointer to the newly created storage.

static AutoPtr<MemoryStorage> Celartem::MemoryStorage::create (  )  [static]

This method creates Memory Based R/W Storage. It creates an SimpleArray <u8> instance internally and you can obtain it by getArray function.

Returns:
Pointer to the newly created storage.

Referenced by Celartem::DjVu::MemoryData::getReadOnlyDataStream(), and Celartem::DjVu::MemoryData::getStorage().

static AutoPtr<MemoryStorage> Celartem::MemoryStorage::create ( const void *  inData,
size_t  inDataSize,
Endian  inEndian = endianHost 
) [static]

This method creates Memory Based R/W Storage. It creates an SimpleArray <u8> instance internally using the specified buffer (duplicate the buffer data) and you can obtain it by getArray function.

Parameters:
inData Pointer to the buffer of the initial data.
inDataSize The size of the buffer.
inEndian The endianness of the specified buffer.
Returns:
Pointer to the newly created storage.

virtual SimpleArray<u8>& Celartem::MemoryStorage::getArray (  )  [pure virtual]

This method returns the array which is used in this MemoryStorage instance.

Returns:
Reference to the SimpleArray <u8> instance.

virtual void Celartem::MemoryStorage::setAllocationUnit ( size_t  inAllocationUnitInBytes  )  [pure virtual]

This method is to set the memory allocation unit. It controls the memory effeciency and the speed. A large value results in the good speed but the drawback is the bad memory effeciency.

Parameters:
inAllocationUnitInBytes The memory allocation unit in bytes.
See also:
SimpleArray::setAllocationUnit

virtual void Celartem::MemoryStorage::setReadOnly ( bool  inReadOnly  )  [pure virtual]

This method makes the storage read-only.

Parameters:
inReadOnly true to make the storage read-only; otherwise the storage can be writable.


The documentation for this class was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:21 2008.