iipsrv 1.3
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
Cache Class Reference

Cache to store raw tile data. More...

#include <Cache.h>

Public Member Functions

 Cache (const float max)
 Constructor.
 
 ~Cache ()
 Destructor.
 
void clear ()
 Empty the cache.
 
void insert (const RawTile &r)
 Insert a tile.
 
unsigned int getNumElements () const
 Return the number of tiles in the cache.
 
float getMemorySize () const
 Return the number of MB stored.
 
RawTilegetTile (const std::string &f, int r, int t, int h, int v, ImageEncoding c, int q)
 Get a tile from the cache.
 
std::string getIndex (const std::string &f, int r, int t, int h, int v, ImageEncoding c, int q) const
 Create a hash index.
 

Detailed Description

Cache to store raw tile data.

Constructor & Destructor Documentation

◆ Cache()

Cache::Cache ( const float  max)
inline

Constructor.

Parameters
maxMaximum cache size in MB

Member Function Documentation

◆ getIndex()

std::string Cache::getIndex ( const std::string &  f,
int  r,
int  t,
int  h,
int  v,
ImageEncoding  c,
int  q 
) const
inline

Create a hash index.

Parameters
ffilename
rresolution number
ttile number
hhorizontal sequence number
vvertical sequence number
cImageEncoding type
qcompression quality
Returns
string

Referenced by getTile(), and insert().

◆ getTile()

RawTile * Cache::getTile ( const std::string &  f,
int  r,
int  t,
int  h,
int  v,
ImageEncoding  c,
int  q 
)
inline

Get a tile from the cache.

Parameters
ffilename
rresolution number
ttile number
hhorizontal sequence number
vvertical sequence number
ccompression type
qcompression quality
Returns
pointer to data or NULL on error

References getIndex().

Referenced by TileManager::getTile().

◆ insert()

void Cache::insert ( const RawTile r)
inline

The documentation for this class was generated from the following file: