OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
This is a utility class used by the BlockStreamBuffer. More...
#include <BlockStreamBuffer.h>
Public Member Functions | |
BlockBufInfo () | |
ossim_int64 | getBlockIndex (ossim_int64 pos) |
Returns the index of a block. More... | |
bool | isWithinWindow (ossim_int64 pos) const |
This just tests if the given abolute position is within a block window. More... | |
bool | isWithinValidWindow (ossim_int64 pos) const |
This just tests if the given abolute position is within a valid window. More... | |
ossim_int64 | getEndByte () const |
Convenient method to get the absolute byte position of the end byte. More... | |
const char * | getBufferStart (ossim_int64 absolutePosition) const |
Get the starting address in the buffer of the absolute position. More... | |
const char * | getBuffer () const |
char * | getBuffer () |
bool | isLoaded () const |
void | setBuffer (char *bufPtr, ossim_uint32 blockSize) |
Will set the buffer and then reset the loaded flag to be false. More... | |
Public Attributes | |
ossim_int64 | m_startByte |
Is the starting absolute byte offset for the buffer. More... | |
ossim_int64 | m_blockSize |
Is the size of the buffer. More... | |
ossim_int64 | m_validSize |
is the valid size of the buffer. More... | |
char * | m_blockBufferPtr |
Starting address of the block. More... | |
bool | m_blockLoaded |
Variable used to invalidate a block or specify whether the block is loaded. More... | |
This is a utility class used by the BlockStreamBuffer.
This class will hold information regarding the block that is currently loaded. It holds the start byte and the valid size and the block size of the buffer. The valid size is used because if we are at the end of a stream we could have a partial block.
Definition at line 18 of file BlockStreamBuffer.h.
|
inline |
Definition at line 20 of file BlockStreamBuffer.h.
|
inline |
Returns the index of a block.
pos | Is the aboslute byte position |
Definition at line 36 of file BlockStreamBuffer.h.
|
inline |
Definition at line 103 of file BlockStreamBuffer.h.
|
inline |
Definition at line 110 of file BlockStreamBuffer.h.
|
inline |
Get the starting address in the buffer of the absolute position.
absolutePosition | The absolute byte position |
Definition at line 91 of file BlockStreamBuffer.h.
|
inline |
Convenient method to get the absolute byte position of the end byte.
Definition at line 80 of file BlockStreamBuffer.h.
|
inline |
Definition at line 118 of file BlockStreamBuffer.h.
|
inline |
This just tests if the given abolute position is within a valid window.
A valid window represents partial blocks.
pos | Absolute position |
Definition at line 68 of file BlockStreamBuffer.h.
|
inline |
This just tests if the given abolute position is within a block window.
We will usually call
pos | Absolute position |
Definition at line 54 of file BlockStreamBuffer.h.
|
inline |
Will set the buffer and then reset the loaded flag to be false.
bufPtr | is the starting address of the block buffer |
blockSize | is the size of the buffer |
Definition at line 127 of file BlockStreamBuffer.h.
char* ossim::BlockBufInfo::m_blockBufferPtr |
Starting address of the block.
This is not managed by this class and will not be deleted.
Definition at line 155 of file BlockStreamBuffer.h.
Referenced by ossim::BlockStreamBuffer::BlockStreamBuffer().
bool ossim::BlockBufInfo::m_blockLoaded |
Variable used to invalidate a block or specify whether the block is loaded.
Definition at line 160 of file BlockStreamBuffer.h.
ossim_int64 ossim::BlockBufInfo::m_blockSize |
Is the size of the buffer.
Definition at line 142 of file BlockStreamBuffer.h.
Referenced by ossim::BlockStreamBuffer::BlockStreamBuffer().
ossim_int64 ossim::BlockBufInfo::m_startByte |
Is the starting absolute byte offset for the buffer.
Definition at line 137 of file BlockStreamBuffer.h.
ossim_int64 ossim::BlockBufInfo::m_validSize |
is the valid size of the buffer.
In most cases this is equal to the blockSize but if at the end of a stream you could have a partial buffer.
Definition at line 149 of file BlockStreamBuffer.h.