Cache to store raw tile data.
More...
#include <Cache.h>
|
| 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.
|
|
RawTile * | getTile (const std::string &f, int r, int t, int h, int v, CompressionType c, int q) |
| Get a tile from the cache.
|
|
std::string | getIndex (const std::string &f, int r, int t, int h, int v, CompressionType c, int q) const |
| Create a hash index.
|
|
Cache to store raw tile data.
◆ Cache()
Cache::Cache |
( |
const float |
max | ) |
|
|
inline |
Constructor.
- Parameters
-
max | Maximum cache size in MB |
◆ getIndex()
std::string Cache::getIndex |
( |
const std::string & |
f, |
|
|
int |
r, |
|
|
int |
t, |
|
|
int |
h, |
|
|
int |
v, |
|
|
CompressionType |
c, |
|
|
int |
q |
|
) |
| const |
|
inline |
Create a hash index.
- Parameters
-
f | filename |
r | resolution number |
t | tile number |
h | horizontal sequence number |
v | vertical sequence number |
c | compression type |
q | compression quality |
- Returns
- string
Referenced by getTile(), and insert().
◆ getTile()
RawTile * Cache::getTile |
( |
const std::string & |
f, |
|
|
int |
r, |
|
|
int |
t, |
|
|
int |
h, |
|
|
int |
v, |
|
|
CompressionType |
c, |
|
|
int |
q |
|
) |
| |
|
inline |
Get a tile from the cache.
- Parameters
-
f | filename |
r | resolution number |
t | tile number |
h | horizontal sequence number |
v | vertical sequence number |
c | compression type |
q | compression quality |
- Returns
- pointer to data or NULL on error
References getIndex().
◆ insert()
void Cache::insert |
( |
const RawTile & |
r | ) |
|
|
inline |
The documentation for this class was generated from the following file: