HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_CompressedBlockIndex Class Reference

#include <UT_CompressedBlockIndex.h>

+ Inheritance diagram for UT_CompressedBlockIndex:

Public Member Functions

 UT_CompressedBlockIndex ()
 
 ~UT_CompressedBlockIndex ()
 
void setBlockSize (exint blockSize, exint lastBlockSize)
 
void append (BlockLocationType entry)
 Adds entry to the end of the index. More...
 
void removeLast ()
 Removes the last entry. More...
 
exint getTotalUncompressedSize ()
 Get's the total uncompressed size of the stream with this block index. More...
 
BlockLocationType getCompressedBlockOffset (exint uncompressedOffset)
 
BlockLocationType getCompressedBlockOffsetFromEnd (exint uncompressedOffsetFromEnd)
 
exint getBlockNumberCompressedOffset (BlockLocationType compressedOffset)
 Get the block number given offset in compressed file. More...
 
int64 getLength ()
 Get the length in the file of the entire index section (for seeking) More...
 
exint getBlockSize ()
 Get the block size of the compressed blocks. More...
 
exint getLastBlockSize ()
 Get the size of the last compressed block. More...
 
void writeToStream (std::ostream *out)
 Write index to stream. More...
 
void readFromStream (UT_IStream *in, int64 indexLength)
 Read index from stream. More...
 
void dump (const char *msg="") const
 Dump information. More...
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< UT_CompressedBlockIndex >
SYS_FORCE_INLINE UT_IntrusiveRefCounter ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< UT_CompressedBlockIndex >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Definition at line 22 of file UT_CompressedBlockIndex.h.

Constructor & Destructor Documentation

UT_CompressedBlockIndex::UT_CompressedBlockIndex ( )
UT_CompressedBlockIndex::~UT_CompressedBlockIndex ( )

Member Function Documentation

void UT_CompressedBlockIndex::append ( BlockLocationType  entry)

Adds entry to the end of the index.

void UT_CompressedBlockIndex::dump ( const char *  msg = "") const

Dump information.

exint UT_CompressedBlockIndex::getBlockNumberCompressedOffset ( BlockLocationType  compressedOffset)

Get the block number given offset in compressed file.

exint UT_CompressedBlockIndex::getBlockSize ( )

Get the block size of the compressed blocks.

BlockLocationType UT_CompressedBlockIndex::getCompressedBlockOffset ( exint  uncompressedOffset)

Retrieves the location of the start of the block containing the given offset in uncompressed file

BlockLocationType UT_CompressedBlockIndex::getCompressedBlockOffsetFromEnd ( exint  uncompressedOffsetFromEnd)

Retrieves the location of the start of the block containing the given offset (given from the end of the file) in uncompressed file

exint UT_CompressedBlockIndex::getLastBlockSize ( )

Get the size of the last compressed block.

int64 UT_CompressedBlockIndex::getLength ( )

Get the length in the file of the entire index section (for seeking)

exint UT_CompressedBlockIndex::getTotalUncompressedSize ( )

Get's the total uncompressed size of the stream with this block index.

void UT_CompressedBlockIndex::readFromStream ( UT_IStream in,
int64  indexLength 
)

Read index from stream.

void UT_CompressedBlockIndex::removeLast ( )

Removes the last entry.

void UT_CompressedBlockIndex::setBlockSize ( exint  blockSize,
exint  lastBlockSize 
)

Sets the blocksize and the size of the last block. Last block size used for end of stream calculations.

void UT_CompressedBlockIndex::writeToStream ( std::ostream *  out)

Write index to stream.


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