OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimAppFixedTileCache.h>
Public Types | |
typedef ossim_int32 | ossimAppFixedCacheId |
Static Public Member Functions | |
static ossimAppFixedTileCache * | instance (ossim_uint32 maxSize=0) |
Static Public Attributes | |
static const ossim_uint32 | DEFAULT_SIZE = 1024*1024*80 |
Protected Member Functions | |
ossimAppFixedTileCache () | |
ossimFixedTileCache * | getCache (ossimAppFixedCacheId cacheId) |
void | shrinkGlobalCacheSize (ossim_int32 byteCount) |
void | shrinkCacheSize (ossimAppFixedCacheId id, ossim_int32 byteCount) |
void | shrinkCacheSize (ossimFixedTileCache *cache, ossim_int32 byteCount) |
void | deleteAll () |
Protected Attributes | |
ossimIpt | theTileSize |
ossim_uint32 | theMaxCacheSize |
ossim_uint32 | theMaxGlobalCacheSize |
ossim_uint32 | theCurrentCacheSize |
std::map< ossimAppFixedCacheId, ossimFixedTileCache * > | theAppCacheMap |
std::mutex | theMutex |
Static Protected Attributes | |
static ossimAppFixedTileCache * | theInstance = 0 |
static ossimAppFixedCacheId | theUniqueAppIdCounter = 0 |
Friends | |
std::ostream & | operator<< (std::ostream &out, const ossimAppFixedTileCache &rhs) |
Definition at line 26 of file ossimAppFixedTileCache.h.
Definition at line 32 of file ossimAppFixedTileCache.h.
|
virtual |
|
protected |
Definition at line 48 of file ossimAppFixedTileCache.cpp.
Referenced by instance().
ossimRefPtr< ossimImageData > ossimAppFixedTileCache::addTile | ( | ossimAppFixedCacheId | cacheId, |
ossimRefPtr< ossimImageData > | data, | ||
bool | duplicateData = true |
||
) |
Definition at line 255 of file ossimAppFixedTileCache.cpp.
References ossimFixedTileCache::addTile(), getCache(), ossimFixedTileCache::getCacheSize(), ossimImageData::getDataSizeInBytes(), shrinkCacheSize(), shrinkGlobalCacheSize(), theCurrentCacheSize, theMaxCacheSize, theMaxGlobalCacheSize, and theMutex.
Referenced by ossimCacheTileSource::fillTile(), ossimKakaduJpipHandler::getTileAtRes(), ossimGdalTileSource::getTileBlockRead(), ossimKakaduNitfReader::loadBlock(), ossimKakaduJp2Reader::loadTile(), and ossimKakaduJ2kReader::loadTile().
|
protected |
Definition at line 295 of file ossimAppFixedTileCache.cpp.
References theAppCacheMap, theCurrentCacheSize, and theMutex.
Referenced by ~ossimAppFixedTileCache().
|
virtual |
Definition at line 153 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getCacheSize(), theAppCacheMap, theCurrentCacheSize, theMutex, and ossimRefPtr< T >::valid().
Referenced by ossimJpegTileSource::allocate(), ossimPngReader::allocate(), ossimNitfTileSource::allocate(), ossimKakaduJp2Reader::closeEntry(), ossimKakaduJ2kReader::closeEntry(), ossimCacheTileSource::deleteRlevelCache(), ossimKakaduJpipHandler::deleteRlevelCache(), ossimGdalTileSource::deleteRlevelCache(), ossimJpegTileSource::destroy(), ossimPngReader::destroy(), ossimNitfTileSource::destroy(), and ossimNitfTileSource::setCacheEnabledFlag().
void ossimAppFixedTileCache::deleteTile | ( | ossimAppFixedCacheId | cacheId, |
const ossimIpt & | origin | ||
) |
Definition at line 320 of file ossimAppFixedTileCache.cpp.
References ossimFixedTileCache::deleteTile(), getCache(), ossimFixedTileCache::getCacheSize(), theCurrentCacheSize, and theMutex.
|
virtual |
Will flush all cache registered
Definition at line 127 of file ossimAppFixedTileCache.cpp.
References theAppCacheMap, theCurrentCacheSize, and theMutex.
Referenced by ossimCacheTileSource::flush(), ossimKakaduJpipHandler::flushCache(), and shrinkGlobalCacheSize().
|
virtual |
Definition at line 140 of file ossimAppFixedTileCache.cpp.
References ossimFixedTileCache::flush(), getCache(), ossimFixedTileCache::getCacheSize(), theCurrentCacheSize, and theMutex.
|
protected |
Definition at line 333 of file ossimAppFixedTileCache.cpp.
References theAppCacheMap.
Referenced by addTile(), deleteCache(), deleteTile(), flush(), getTile(), getTileSize(), removeTile(), setRect(), setTileSize(), shrinkCacheSize(), and shrinkGlobalCacheSize().
ossimRefPtr< ossimImageData > ossimAppFixedTileCache::getTile | ( | ossimAppFixedCacheId | cacheId, |
const ossimIpt & | origin | ||
) |
Definition at line 239 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getTile(), and theMutex.
Referenced by ossimCacheTileSource::fillTile(), ossimKakaduJpipHandler::getTileAtRes(), ossimGdalTileSource::getTileBlockRead(), ossimNitfTileSource::loadBlockFromCache(), ossimKakaduJp2Reader::loadTileFromCache(), and ossimKakaduJ2kReader::loadTileFromCache().
const ossimIpt & ossimAppFixedTileCache::getTileSize | ( | ossimAppFixedCacheId | cacheId | ) |
Definition at line 420 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getTileSize(), theMutex, and theTileSize.
Referenced by ossimCacheTileSource::fillTile().
|
static |
Definition at line 106 of file ossimAppFixedTileCache.cpp.
References ossimAppFixedTileCache(), setMaxCacheSize(), and theInstance.
Referenced by ossimJpegTileSource::allocate(), ossimPngReader::allocate(), ossimNitfTileSource::allocate(), ossimNitfTileSource::allocateBuffers(), ossimKakaduJp2Reader::closeEntry(), ossimKakaduJ2kReader::closeEntry(), ossimCacheTileSource::deleteRlevelCache(), ossimKakaduJpipHandler::deleteRlevelCache(), ossimGdalTileSource::deleteRlevelCache(), ossimJpegTileSource::destroy(), ossimPngReader::destroy(), ossimNitfTileSource::destroy(), ossimCacheTileSource::fillTile(), ossimCacheTileSource::flush(), ossimKakaduJpipHandler::flushCache(), ossimCacheTileSource::getCacheId(), ossimKakaduJpipHandler::getTileAtRes(), ossimGdalTileSource::getTileBlockRead(), ossimKakaduJpipHandler::initializeRlevelCache(), ossimKakaduNitfReader::loadBlock(), ossimNitfTileSource::loadBlockFromCache(), ossimKakaduJp2Reader::loadTile(), ossimKakaduJ2kReader::loadTile(), ossimKakaduJp2Reader::loadTileFromCache(), ossimKakaduJ2kReader::loadTileFromCache(), ossimKakaduJpipHandler::performRlevelSetup(), ossimNitfTileSource::setCacheEnabledFlag(), and ossimGdalTileSource::setRlevelCache().
ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache | ( | const ossimIrect & | tileBoundaryRect, |
const ossimIpt & | tileSize = ossimIpt(0,0) |
||
) |
Will create a new Tile cache for this application if the tile size is 0,0 it will use the default tile size. Will return 0 if not successful.
Definition at line 169 of file ossimAppFixedTileCache.cpp.
References ossimFixedTileCache::getTileSize(), ossimFixedTileCache::setRect(), theAppCacheMap, theMutex, theUniqueAppIdCounter, ossimIpt::x, and ossimIpt::y.
Referenced by ossimJpegTileSource::allocate(), ossimCacheTileSource::getCacheId(), and ossimGdalTileSource::setRlevelCache().
ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache | ( | ) |
Definition at line 193 of file ossimAppFixedTileCache.cpp.
References theAppCacheMap, theMutex, and theUniqueAppIdCounter.
ossimRefPtr< ossimImageData > ossimAppFixedTileCache::removeTile | ( | ossimAppFixedCacheId | cacheId, |
const ossimIpt & | origin | ||
) |
Definition at line 302 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getCacheSize(), ossimFixedTileCache::removeTile(), theCurrentCacheSize, and theMutex.
|
virtual |
Definition at line 119 of file ossimAppFixedTileCache.cpp.
References theMaxCacheSize, theMaxGlobalCacheSize, and theMutex.
Referenced by instance().
|
virtual |
Definition at line 209 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getCacheSize(), ossimFixedTileCache::getTileSize(), ossimFixedTileCache::setRect(), theCurrentCacheSize, and theMutex.
|
virtual |
Definition at line 225 of file ossimAppFixedTileCache.cpp.
References getCache(), ossimFixedTileCache::getCacheSize(), ossimFixedTileCache::getTileBoundaryRect(), ossimFixedTileCache::getTileSize(), ossimFixedTileCache::setRect(), theCurrentCacheSize, theMutex, and theTileSize.
|
protected |
Definition at line 377 of file ossimAppFixedTileCache.cpp.
References getCache().
Referenced by addTile().
|
protected |
Definition at line 388 of file ossimAppFixedTileCache.cpp.
References abs, ossimFixedTileCache::deleteTile(), ossimFixedTileCache::flush(), ossimFixedTileCache::getCacheSize(), and theCurrentCacheSize.
|
protected |
Definition at line 348 of file ossimAppFixedTileCache.cpp.
References ossimFixedTileCache::deleteTile(), flush(), getCache(), ossimFixedTileCache::getCacheSize(), theAppCacheMap, and theCurrentCacheSize.
Referenced by addTile().
|
friend |
Definition at line 26 of file ossimAppFixedTileCache.cpp.
|
static |
Definition at line 31 of file ossimAppFixedTileCache.h.
|
protected |
Definition at line 112 of file ossimAppFixedTileCache.h.
Referenced by deleteAll(), deleteCache(), flush(), getCache(), newTileCache(), operator<<(), and shrinkGlobalCacheSize().
|
protected |
Definition at line 110 of file ossimAppFixedTileCache.h.
Referenced by addTile(), deleteAll(), deleteCache(), deleteTile(), flush(), removeTile(), setRect(), setTileSize(), shrinkCacheSize(), and shrinkGlobalCacheSize().
|
staticprotected |
Definition at line 101 of file ossimAppFixedTileCache.h.
Referenced by instance().
|
protected |
Definition at line 108 of file ossimAppFixedTileCache.h.
Referenced by addTile(), and setMaxCacheSize().
|
protected |
Definition at line 109 of file ossimAppFixedTileCache.h.
Referenced by addTile(), and setMaxCacheSize().
|
protected |
Definition at line 114 of file ossimAppFixedTileCache.h.
Referenced by addTile(), deleteAll(), deleteCache(), deleteTile(), flush(), getTile(), getTileSize(), newTileCache(), removeTile(), setMaxCacheSize(), setRect(), and setTileSize().
|
protected |
Definition at line 107 of file ossimAppFixedTileCache.h.
Referenced by getTileSize(), and setTileSize().
|
staticprotected |
Will hold the current unique Application id.
Definition at line 106 of file ossimAppFixedTileCache.h.
Referenced by newTileCache().