libosmscout  1.1.1
Classes | Public Types | Public Member Functions | List of all members
osmscout::MapTileCache< T > Class Template Reference

#include <libosmscout-map/include/osmscout/MapTileCache.h>

Public Types

typedef std::shared_ptr< T > TRef
 

Public Member Functions

 MapTileCache (size_t cacheSize)
 
void SetSize (size_t cacheSize)
 
void CleanupCache ()
 
MapTileCache< T >::TRef GetCachedTile (const TileKey &key) const
 
MapTileCache< T >::TRef GetTile (const TileKey &key) const
 
void GetTilesForBoundingBox (const Magnification &magnification, const GeoBox &boundingBox, std::list< typename MapTileCache< T >::TRef > &tiles) const
 

Member Typedef Documentation

◆ TRef

template<class T>
typedef std::shared_ptr<T> osmscout::MapTileCache< T >::TRef

Constructor & Destructor Documentation

◆ MapTileCache()

template<class T >
osmscout::MapTileCache< T >::MapTileCache ( size_t  cacheSize)
explicit

Create a new tile cache with the given cache size

Member Function Documentation

◆ CleanupCache()

template<class T >
void osmscout::MapTileCache< T >::CleanupCache ( )

Cleanup the cache. Free least recently used tiles until the given maximum cache size is reached again.

◆ GetCachedTile()

template<class T >
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.

◆ GetTile()

template<class T >
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.

◆ GetTilesForBoundingBox()

template<class T >
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.

◆ SetSize()

template<class T >
void osmscout::MapTileCache< T >::SetSize ( size_t  cacheSize)

Change the size of the cache. Cache will be cleaned immediately.


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