An access synchronizer to be used in SynchronizedRaster raster instances. More...
#include <RasterSynchronizer.h>
Public Member Functions | |
RasterSynchronizer (Raster &raster, const te::common::AccessPolicy policy) | |
Constructor. More... | |
~RasterSynchronizer () | |
Protected Types | |
typedef std::vector< std::vector< std::vector< unsigned int > > > | BlocksUseCounterT |
Blocks use counter type definition. More... | |
Protected Member Functions | |
bool | acquireBlock (const unsigned int bandIdx, const unsigned int blockXIndex, const unsigned int blockYIndex, void *blkDataPtr) |
Acquire a raster data block. More... | |
bool | releaseBlock (const unsigned int bandIdx, const unsigned int blockXIndex, const unsigned int blockYIndex, void *blkDataPtr) |
Release a raster data block. More... | |
Protected Attributes | |
BlocksUseCounterT | m_blocksUseCounters |
blocks use counter. More... | |
boost::condition_variable_any | m_condVar |
Block use request sync variable. More... | |
boost::mutex | m_mutex |
General sync mutex;. More... | |
te::common::AccessPolicy | m_policy |
The access policy used on the given input raster. More... | |
Raster & | m_raster |
The input raster. More... | |
Friends | |
class | SynchronizedBand |
class | SynchronizedBandBlocksManager |
class | SynchronizedRaster |
An access synchronizer to be used in SynchronizedRaster raster instances.
Definition at line 57 of file RasterSynchronizer.h.
|
protected |
Blocks use counter type definition.
Definition at line 82 of file RasterSynchronizer.h.
te::rst::RasterSynchronizer::RasterSynchronizer | ( | Raster & | raster, |
const te::common::AccessPolicy | policy | ||
) |
Constructor.
raster | The raster to synchronize. |
policy | The access policy to use on the given input raster. |
Definition at line 35 of file RasterSynchronizer.cpp.
References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Band::getProperty(), m_blocksUseCounters, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, m_policy, te::common::NoAccess, te::common::RAccess, and te::common::WAccess.
te::rst::RasterSynchronizer::~RasterSynchronizer | ( | ) |
Definition at line 70 of file RasterSynchronizer.cpp.
|
protected |
Acquire a raster data block.
bandIdx | Block band index. |
blockXIndex | Block X index. |
blockYIndex | Block Y index. |
blkDataPtr | A pointer to a pre-allocated area where the block data will be written. |
Definition at line 74 of file RasterSynchronizer.cpp.
References TE_TR, and te::common::WAccess.
|
protected |
Release a raster data block.
bandIdx | Block band index. |
blockXIndex | Block X index. |
blockYIndex | Block Y index. |
blkDataPtr | A pointer where the block data will be read. |
Definition at line 127 of file RasterSynchronizer.cpp.
References TE_TR, and te::common::WAccess.
|
friend |
Definition at line 60 of file RasterSynchronizer.h.
|
friend |
Definition at line 59 of file RasterSynchronizer.h.
|
friend |
Definition at line 61 of file RasterSynchronizer.h.
|
protected |
blocks use counter.
Definition at line 92 of file RasterSynchronizer.h.
Referenced by RasterSynchronizer().
|
protected |
Block use request sync variable.
Definition at line 90 of file RasterSynchronizer.h.
|
protected |
General sync mutex;.
Definition at line 88 of file RasterSynchronizer.h.
Referenced by te::rst::SynchronizedBandBlocksManager::initialize(), te::rst::SynchronizedBand::SynchronizedBand(), and te::rst::SynchronizedRaster::SynchronizedRaster().
|
protected |
The access policy used on the given input raster.
Definition at line 84 of file RasterSynchronizer.h.
Referenced by RasterSynchronizer().
|
protected |
The input raster.
Definition at line 86 of file RasterSynchronizer.h.
Referenced by te::rst::SynchronizedBandBlocksManager::initialize(), and te::rst::SynchronizedRaster::SynchronizedRaster().