OpendTect
7.0
|
Public Member Functions | |
ReadCache (file_size_type knownsize=0) | |
~ReadCache () | |
void | clearData () override |
file_size_type | getAt (FilePosType, BufType *, file_size_type) const |
bool | isAvailable (FilePosType, file_size_type) const |
bool | setData (FileChunkType, const BufType *) |
if fail, memory was full; now the cache is cleared More... | |
void | setMinCacheSize (file_size_type) override |
FileChunkSetType | stillNeededDataFor (FilePosType, ChunkSizeType) const |
Public Member Functions inherited from Network::FileCache | |
virtual | ~FileCache () |
block_idx_type | blockIdx (FilePosType) const |
BlockSizeType | blockSize (block_idx_type) const |
BufType * | getBlock (block_idx_type) |
const BufType * | getBlock (block_idx_type) const |
bool | isEmpty () const |
bool | isLiveBlock (block_idx_type) const |
file_size_type | size () const |
bool | validBlockIdx (block_idx_type bidx) const |
Protected Member Functions | |
void | handleNewLiveBlock (block_idx_type) override |
Protected Member Functions inherited from Network::FileCache | |
FileCache (file_size_type) | |
void | clearBlocks () |
void | dismissBlock (block_idx_type) |
Block * | gtBlk (block_idx_type) const |
FilePosType | lastBlockPos () const |
FilePosType | lastFilePos () const |
Protected Attributes | |
TypeSet< block_idx_type > | liveblockidxs_ |
block_idx_type | maxnrliveblocks_ |
Protected Attributes inherited from Network::FileCache | |
ObjectSet< Block > | blocks_ |
const file_size_type | knownfilesize_ |
const BlockSizeType | lastblocksz_ |
Additional Inherited Members | |
Public Types inherited from Network::FileCache | |
typedef ObjectSet< Block >::size_type | block_idx_type |
typedef Block::SizeType | BlockSizeType |
typedef unsigned char | BufType |
typedef int | ChunkSizeType |
typedef od_stream_Count | file_size_type |
typedef TypeSet< FileChunkType > | FileChunkSetType |
typedef Interval< FilePosType > | FileChunkType |
typedef od_stream_Pos | FilePosType |
Static Public Member Functions inherited from Network::FileCache | |
static FilePosType | blockStart (block_idx_type) |
<>Write Cache.
When writing, we need a buffer to write data to. To allow jumping around a bit, we'll have to retain the first block (so a header can be updated later), and a couple of blocks before the last block. Therefore, the cache assumes writing steadily on, with maybe going back to the first block, or one of the near previous ones. Random jumping around may lead to bad stuff.
Network::ReadCache::ReadCache | ( | file_size_type | knownsize = 0 | ) |
Network::ReadCache::~ReadCache | ( | ) |
|
overridevirtual |
Implements Network::FileCache.
file_size_type Network::ReadCache::getAt | ( | FilePosType | , |
BufType * | , | ||
file_size_type | |||
) | const |
|
overrideprotectedvirtual |
Reimplemented from Network::FileCache.
bool Network::ReadCache::isAvailable | ( | FilePosType | , |
file_size_type | |||
) | const |
bool Network::ReadCache::setData | ( | FileChunkType | , |
const BufType * | |||
) |
if fail, memory was full; now the cache is cleared
|
overridevirtual |
Implements Network::FileCache.
FileChunkSetType Network::ReadCache::stillNeededDataFor | ( | FilePosType | , |
ChunkSizeType | |||
) | const |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024