iipsrv
0.9.9
|
Cache to store raw tile data. More...
#include <Cache.h>
Public Member Functions | |
Cache (float max) | |
Constructor. | |
~Cache () | |
Destructor. | |
void | insert (const RawTile &r) |
Insert a tile. | |
unsigned int | getNumElements () |
Return the number of tiles in the cache. | |
float | getMemorySize () |
Return the number of MB stored. | |
RawTile * | getTile (std::string f, int r, int t, int h, int v, CompressionType c, int q) |
Get a tile from the cache. | |
std::string | getIndex (std::string f, int r, int t, int h, int v, CompressionType c, int q) |
Create a hash index. |
Cache to store raw tile data.
Cache::Cache | ( | float | max | ) | [inline] |
Constructor.
max | Maximum cache size in MB |
std::string Cache::getIndex | ( | std::string | f, |
int | r, | ||
int | t, | ||
int | h, | ||
int | v, | ||
CompressionType | c, | ||
int | q | ||
) | [inline] |
RawTile* Cache::getTile | ( | std::string | f, |
int | r, | ||
int | t, | ||
int | h, | ||
int | v, | ||
CompressionType | c, | ||
int | q | ||
) | [inline] |
Get a tile from the cache.
f | filename |
r | resolution number |
t | tile number |
h | horizontal sequence number |
v | vertical sequence number |
c | compression type |
q | compression quality |
References getIndex().
void Cache::insert | ( | const RawTile & | r | ) | [inline] |
Insert a tile.
r | Tile to be inserted |
References RawTile::compressionType, RawTile::dataLength, RawTile::filename, getIndex(), RawTile::hSequence, RawTile::quality, RawTile::resolution, RawTile::tileNum, RawTile::timestamp, and RawTile::vSequence.