rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvTileLoader Class Reference

This abstract class is used to load a tile for an IlvTileController or an IlvTiledLayer. More...

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

Inheritance diagram for IlvTileLoader:
IlvMapTileLoader IlvSDOTileLoader IlvGeoTIFFTileLoader IlvImageTileLoader IlvShapeFileTileLoader IlvDefaultObjectSDOTileLoader IlvDefaultSDOTileLoader

List of all members.

Public Member Functions

virtual void controllerDeleted (IlvTileController *controller)
 Called when the controller is deleted.
virtual IlBoolean isPersistent () const =0
 Checks if the object must be saved by a tile controller.
virtual IlvMapsError load (IlvTile *tile)=0
 Called when a tile has to be loaded.
virtual void release (IlvTile *tile)=0
 Called when a tile has to be released.
virtual void tileDeleted (IlvTile *tile)
 Called when a tile is deleted during the controller destruction.

Detailed Description

This abstract class is used to load a tile for an IlvTileController or an IlvTiledLayer.

Library: ilvmaps

The following example shows a tile loader that fills a tile with a generated list of graphic objects.

  class MyTileLoader : public IlvTileLoader
 {
 public:
     MyTileLoader();
     IlvMapsError load(IlvTile* tile)
     {
 	IlvRect bbox;
 	tile->boundingBox(bbox);
 	IlvPoint p(bbox.x(), bbox.y());
 	for (IlInt i = 0; i < bbox.w(); i += 10) {
 	    for (IlInt j = 0; j < bbox.h(); j += 10) {
 		IlvMarker* m = new IlvMarker(tile->getDisplay(),
 					     p);
 		tile->addObject(m);
 		p.translate(0, 10);
 	    }
 	    p.move(bbox.x() + i, bbox.y());
 	}
 	tile->loadComplete();
 	return IlvMaps::NoError();
     }
     virtual void release(IlvTile* tile)
     {
 	tile->deleteAll();
     }
     virtual void controllerDeleted(IlvTileController* controller)
     {delete this;}
     virtual IlBoolean isPersistent() const {return IlFalse;}
 };
 

Member Function Documentation

virtual void IlvTileLoader::controllerDeleted ( IlvTileController controller  )  [virtual]

Called when the controller is deleted.

Parameters:
controller The tile controller that is being deleted.
virtual IlBoolean IlvTileLoader::isPersistent (  )  const [pure virtual]

Checks if the object must be saved by a tile controller.

Returns:
IlTrue if the object must be saved, IlFalse otherwise.

Implemented in IlvGeoTIFFTileLoader, IlvImageTileLoader, IlvMapTileLoader, IlvSDOTileLoader, and IlvShapeFileTileLoader.

virtual IlvMapsError IlvTileLoader::load ( IlvTile tile  )  [pure virtual]

Called when a tile has to be loaded.

When the tile loader has finished its operation, it should call the function IlvTile::loadComplete to notify the tile listeners.

Parameters:
tile The tile to be loaded.

Implemented in IlvMapTileLoader, IlvDefaultObjectSDOTileLoader, IlvSDOTileLoader, and IlvDefaultSDOTileLoader.

virtual void IlvTileLoader::release ( IlvTile tile  )  [pure virtual]

Called when a tile has to be released.

Parameters:
tile The tile to be released.

Implemented in IlvMapTileLoader, and IlvSDOTileLoader.

virtual void IlvTileLoader::tileDeleted ( IlvTile tile  )  [virtual]

Called when a tile is deleted during the controller destruction.

Parameters:
tile The tile that is deleted by a tile controller.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.