Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

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

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

Public Member Functions

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

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

§ controllerDeleted()

virtual void IlvTileLoader::controllerDeleted ( IlvTileController controller)
virtual

Called when the controller is deleted.

Parameters
controllerThe tile controller that is being deleted.

§ isPersistent()

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 IlvShapeFileTileLoader, IlvSDOTileLoader, IlvImageTileLoader, IlvGeoTIFFTileLoader, and IlvMapTileLoader.

§ load()

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
tileThe tile to be loaded.

Implemented in IlvDefaultSDOTileLoader, IlvDefaultObjectSDOTileLoader, IlvSDOTileLoader, and IlvMapTileLoader.

§ release()

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

Called when a tile has to be released.

Parameters
tileThe tile to be released.

Implemented in IlvSDOTileLoader, and IlvMapTileLoader.

§ tileDeleted()

virtual void IlvTileLoader::tileDeleted ( IlvTile tile)
virtual

Called when a tile is deleted during the controller destruction.

Parameters
tileThe tile that is deleted by a tile controller.

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