|
libosmscout 0.1
|
#include <MapTileCache.h>
Public Types | |
| typedef std::shared_ptr< T > | TRef |
Public Member Functions | |
| void | CleanupCache () |
| Cleanup the cache. | |
| MapTileCache< T >::TRef | GetCachedTile (const TileKey &key) const |
| Return the cache tiles with the given id. | |
| MapTileCache< T >::TRef | GetTile (const TileKey &key) const |
| Return the tile with the given id. | |
| void | GetTilesForBoundingBox (const Magnification &magnification, const GeoBox &boundingBox, std::list< typename MapTileCache< T >::TRef > &tiles) const |
| Return all tile necessary for covering the given boundingbox using the given magnification. | |
| MapTileCache (size_t cacheSize) | |
| Create a new tile cache with the given cache size. | |
| void | SetSize (size_t cacheSize) |
| Change the size of the cache. | |
| typedef std::shared_ptr<T> osmscout::MapTileCache< T >::TRef |
|
explicit |
Create a new tile cache with the given cache size.
| void osmscout::MapTileCache< T >::CleanupCache | ( | ) |
Cleanup the cache.
Free least recently used tiles until the given maximum cache size is reached again.
| MapTileCache< T >::TRef osmscout::MapTileCache< T >::GetCachedTile | ( | const TileKey & | key | ) | const |
Return the cache tiles with the given id.
If the tiles is not cache, an empty reference will be returned.
| MapTileCache< T >::TRef osmscout::MapTileCache< T >::GetTile | ( | const TileKey & | key | ) | const |
Return the tile with the given id.
If the tile is not currently cached return an empty and unassigned tile and move it to the front of the cache.
| void osmscout::MapTileCache< T >::GetTilesForBoundingBox | ( | const Magnification & | magnification, |
| const GeoBox & | boundingBox, | ||
| std::list< typename MapTileCache< T >::TRef > & | tiles | ||
| ) | const |
Return all tile necessary for covering the given boundingbox using the given magnification.
References osmscout::GeoBox::GetMaxCoord(), osmscout::GeoBox::GetMinCoord(), and osmscout::TileId::GetTile().
| void osmscout::MapTileCache< T >::SetSize | ( | size_t | cacheSize | ) |
Change the size of the cache.
Cache will be cleaned immediately.