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, te::common::WAccess, and ~RasterSynchronizer().
|
default |
Referenced by RasterSynchronizer().
|
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 72 of file RasterSynchronizer.cpp.
References te::rst::Raster::getBand(), m_blocksUseCounters, m_condVar, m_mutex, m_policy, m_raster, te::rst::Band::read(), TE_TR, and te::common::WAccess.
Referenced by te::rst::SynchronizedBandBlocksManager::getBlockPointer().
|
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 125 of file RasterSynchronizer.cpp.
References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), m_blocksUseCounters, m_condVar, m_mutex, m_policy, m_raster, TE_TR, te::common::WAccess, and te::rst::Band::write().
Referenced by te::rst::SynchronizedBandBlocksManager::free(), and te::rst::SynchronizedBandBlocksManager::getBlockPointer().
|
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 acquireBlock(), RasterSynchronizer(), and releaseBlock().
|
protected |
Block use request sync variable.
Definition at line 90 of file RasterSynchronizer.h.
Referenced by acquireBlock(), and releaseBlock().
|
protected |
General sync mutex;.
Definition at line 88 of file RasterSynchronizer.h.
Referenced by acquireBlock(), te::rst::SynchronizedRaster::getBandDataType(), te::rst::SynchronizedRaster::getInfo(), te::rst::SynchronizedBandBlocksManager::initialize(), releaseBlock(), 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 acquireBlock(), te::rst::SynchronizedBandBlocksManager::free(), RasterSynchronizer(), and releaseBlock().
|
protected |
The input raster.
Definition at line 86 of file RasterSynchronizer.h.
Referenced by acquireBlock(), te::rst::SynchronizedBandBlocksManager::getBlockPointer(), te::rst::SynchronizedBandBlocksManager::getRaster(), te::rst::SynchronizedBandBlocksManager::initialize(), releaseBlock(), and te::rst::SynchronizedRaster::SynchronizedRaster().