Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvTileCache Class Referenceabstract

This class is used to manage the cached tiles of one or more tile controllers. More...

#include <ilviews/maps/tiling/tilecache.h>

Inheritance diagram for IlvTileCache:
IlvDefaultTileCache

Public Member Functions

virtual void controllerDeleted (IlvTileController *controller)=0
 Called when a controller is deleted. More...
 
void lock ()
 Called by the objects that use the cache. More...
 
virtual void tileAboutToLoad (IlvTile *tile)=0
 Called by a tile controller each time a tile is about to be loaded. More...
 
virtual void tileCached (IlvTile *tile)=0
 Called each time a loaded tile has no longer a lock. More...
 
virtual void tileRetrieved (IlvTile *tile)=0
 Called each time that an unreleased cached tile is locked again. More...
 
void unLock ()
 Called by objects that stop using the cache. More...
 

Protected Member Functions

 IlvTileCache ()
 Constructor. More...
 
virtual ~IlvTileCache ()
 Protected destructor of the IlvTileCache. More...
 
void releaseTile (IlvTile *tile)
 Releases a tile. The tile is deleted during this call. More...
 

Detailed Description

This class is used to manage the cached tiles of one or more tile controllers.

Library: ilvmaps

A cached tile is a tile that is not visible in any view and that is not locked by any application object. An IlvTileCache object releases the cached tiles to free memory when necessary.

Constructor & Destructor Documentation

IlvTileCache::IlvTileCache ( )
protected

Constructor.

The constructor of this abstract class is protected.

virtual IlvTileCache::~IlvTileCache ( )
protectedvirtual

Protected destructor of the IlvTileCache.

The destructor of the IlvTileCache is protected, as should be all the destructors of subclasses of IlvTileCache. Instances of this class can be shared between different tile controllers and other objects. The memory management must be performed with the lock / unLock mechanism.

See also
lock, unLock.

Member Function Documentation

virtual void IlvTileCache::controllerDeleted ( IlvTileController controller)
pure virtual

Called when a controller is deleted.

The cache should remove all the tiles that are controlled by the controller from its internal structures without releasing the tiles.

Parameters
controllerThe controller that is being deleted.

Implemented in IlvDefaultTileCache.

void IlvTileCache::lock ( )

Called by the objects that use the cache.

The cache can not be deleted until it is unlocked again.

See also
unLock.
void IlvTileCache::releaseTile ( IlvTile tile)
protected

Releases a tile. The tile is deleted during this call.

Parameters
tileThe tile to be released.
virtual void IlvTileCache::tileAboutToLoad ( IlvTile tile)
pure virtual

Called by a tile controller each time a tile is about to be loaded.

The cache can then, if necessary, release some cached tiles.

Parameters
tileThe tile that is about to be loaded.

Implemented in IlvDefaultTileCache.

virtual void IlvTileCache::tileCached ( IlvTile tile)
pure virtual

Called each time a loaded tile has no longer a lock.

It means that the tile is not visible in any view and that no other application object has locked the tile. Cached tiles can be released to release memory for tiles that are about to be loaded.

Parameters
tileThe tile that has to be cached.

Implemented in IlvDefaultTileCache.

virtual void IlvTileCache::tileRetrieved ( IlvTile tile)
pure virtual

Called each time that an unreleased cached tile is locked again.

It means that the tile is visible in at least one view or has been locked by an application object. Retrieved tiles should not be released.

Parameters
tileThe tile that is retrieved from the cache by a tile controller.

Implemented in IlvDefaultTileCache.

void IlvTileCache::unLock ( )

Called by objects that stop using the cache.

When the reference counter falls to 0, the cache is deleted.

See also
lock

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.