CachedPage::CacheUnit Class Reference

#include <CachedPage.h>

List of all members.

Public Member Functions

 CacheUnit (char *pData, DimensionDescriptor startRow, int concurrentRows, size_t size, DimensionDescriptor band=ALL_BANDS, unsigned int interlineBytes=0)
 ~CacheUnit ()
DimensionDescriptor getBand ()
bool matches (DimensionDescriptor startRow, int concurrentRows, DimensionDescriptor band)
DimensionDescriptor getStartRow () const
size_t getSize () const
char * getRawData ()
unsigned int getConcurrentRows ()
unsigned int getInterlineBytes ()

Static Public Attributes

static const DimensionDescriptor ALL_BANDS


Detailed Description

Definition at line 28 of file CachedPage.h.


Constructor & Destructor Documentation

CachedPage::CacheUnit::CacheUnit ( char *  pData,
DimensionDescriptor  startRow,
int  concurrentRows,
size_t  size,
DimensionDescriptor  band = ALL_BANDS,
unsigned int  interlineBytes = 0 
)

Construct a CacheUnit with the given parameters.

Parameters:
pData The buffer which has already been populated with the data for the cache unit. Must be at least size bytes long, and must have been allocated with new char[n]. The cache unit takes ownership of this buffer.
startRow The starting row for this unit.
concurrentRows The number of concurrent rows provided.
size The size of the buffer provided in pData.
band The band provided if BSQ, or ALL_BANDS if all bands are provided.
interlineBytes The number of interline bytes within the buffer.

CachedPage::CacheUnit::~CacheUnit (  ) 

Destroy a CacheUnit.


Member Function Documentation

DimensionDescriptor CachedPage::CacheUnit::getBand (  ) 

Returns the band for this dataset if interleave type is BSQ; for BIP, returns ALL_BANDS.

Returns:
For BSQ data, the band number of the data loaded. For any other interleave type, ALL_BANDS.

bool CachedPage::CacheUnit::matches ( DimensionDescriptor  startRow,
int  concurrentRows,
DimensionDescriptor  band 
)

A function that determines if a specification of number of rows, concurrent rows, and a band (for BSQ) matches (ie.

is contained by) this current page.

Parameters:
startRow The start row of the block that may be requested.
concurrentRows The number of rows needed at any given time.
band For BSQ data, the band number. When called on BIP data, this is assumed to be ALL_BANDS.

DimensionDescriptor CachedPage::CacheUnit::getStartRow (  )  const

Accessor function to private data.

Returns:
The start row of this block.

size_t CachedPage::CacheUnit::getSize (  )  const

Accessor function to private data.

Returns:
The total size, in bytes, of the entire block.

char* CachedPage::CacheUnit::getRawData (  ) 

Get the raw data contained in the cache unit.

Returns:
The raw data contained in the cache unit.

unsigned int CachedPage::CacheUnit::getConcurrentRows (  ) 

Get the number of concurrent rows contained in the cache unit.

Returns:
The number of concurrent rows contained in the cache unit.

unsigned int CachedPage::CacheUnit::getInterlineBytes (  ) 

Get the number of interline bytes contained in the cache unit.

Returns:
The number of interline bytes contained in the cache unit.


Member Data Documentation

A DimensionDescriptor signifying that the page contains all of the cube's bands.

Definition at line 34 of file CachedPage.h.


Software Development Kit - Opticks 4.9.0 Build 16218