Class TileStorage
Defined in File TileStorage.hpp
Class Documentation
This class holds a specified number of GDAL tiles in memory.
If the number of tiles added exceeds the
max_sizeattribute, the tile least recently accessed will be removed.Public Functions
Constructor.
- Parameters
max_size – capacity of the storage.
- Throws
std::invalid_argument – if
max_sizeis 0 and the error mode is ErrorMode::DIE.
Adds a tile to the storage.
- Parameters
tile – a shared pointer to the GDAL tile.
Returns the number of tiles currently stored.
- Returns
Number of tiles stored.
Checks to see if a tile with the given filename is currently stored.
- Parameters
filename – the filename of the tile
- Returns
trueif found,falseotherwise.
Gets the tile with the given filename.
- Parameters
filename – filename of the tile
- Returns
A shared pointer to the GDAL tile, or
nullptrif the filename is not found.