Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvImageTileLoader Class Reference

This class is an IlvMapTileLoader specialized for loading a set of images, each image representing a tile in a tiled data set. More...

#include <ilviews/maps/format/image/imgtloader.h>

Inheritance diagram for IlvImageTileLoader:
IlvMapTileLoader IlvTileLoader

Public Member Functions

 IlvImageTileLoader (IlvDisplay *display, const char *pattern, const char *colFormat, const char *rowFormat, const IlvMapAdapter *adapter)
 constructor. More...
 
const char * getColFormat () const
 Returns the column format specifier. More...
 
IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *display)
 Returns the default feature renderer used for the rendering of map features of the current tile. More...
 
virtual IlvMapFeatureIteratorgetFeatureIterator (IlvTile *tile)
 Returns the feature iterator to read features for the specified tile. More...
 
virtual const char * getFileName (IlvTile *tile)
 
IlvMapInfogetMapInfo ()
 Returns the IlvMapInfo used to generate the IlvGraphic objects. More...
 
const char * getPattern () const
 Returns the pattern specifier. More...
 
const char * getRowFormat () const
 Returns the row format specifier. More...
 
virtual IlBoolean isPersistent () const
 Returns IlTrue if this tile loader must be saved by a tile controller. More...
 
- Public Member Functions inherited from IlvMapTileLoader
virtual IlvFeatureRenderergetFeatureRenderer (IlvDisplay *display)
 Returns the renderer to use with this tile loader. More...
 
IlvMapsError getInitStatus () const
 Checks the initialization status of this tile loader. More...
 
virtual IlBoolean isAttachingAttributes () const
 Test if this tile loader is attaching attributes. More...
 
IlBoolean isOwnerOfRenderer () const
 Returns whether the tile loader is owner of its feature renderer or not. More...
 
virtual IlvMapsError load (IlvTile *tile)
 Method called when a tile has to be loaded. More...
 
virtual void release (IlvTile *tile)
 Releases the specified tile. More...
 
virtual void setAttachingAttributes (IlBoolean set)
 Specifies whether this tile loader is attaching attributes to the graphic objects it loads. More...
 
virtual void setFeatureRenderer (IlvFeatureRenderer *renderer, IlBoolean owner=IlFalse)
 Sets the renderer to use with this tile loader. More...
 
- Public Member Functions inherited from IlvTileLoader
virtual void controllerDeleted (IlvTileController *controller)
 Called when the controller is deleted. More...
 
virtual void tileDeleted (IlvTile *tile)
 Called when a tile is deleted during the controller destruction. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IlvMapTileLoader
 IlvMapTileLoader ()
 Constructor. More...
 
void setInitStatus (IlvMapsError status)
 Sets the error status of the tile loader. More...
 

Detailed Description

This class is an IlvMapTileLoader specialized for loading a set of images, each image representing a tile in a tiled data set.

Library: ilvmaps

Constructor & Destructor Documentation

IlvImageTileLoader::IlvImageTileLoader ( IlvDisplay display,
const char *  pattern,
const char *  colFormat,
const char *  rowFormat,
const IlvMapAdapter adapter 
)

constructor.

Creates an IlvImageTileLoader by specifying a pattern and two formats used to construct a file name for a given IlvTile. The pattern string must contain one r and one c specifier. When a tile is to be loaded, a file name is built by replacing the r conversion specifier with the row index of the tile, using the row format string. The same operation is performed for the column of the tile, replacing the c conversion specifier with the column index of the tile, using the column format string. For example, if the pattern is "<tt>ADirectory/file_%c_%r_image.jpg</tt>" and the colFormat is "%03d" and the colFormat is "%04d", the resulting file name for the tile at (12, 34) will be "<tt>ADirectory/file_0034_012_image.jpg</tt>".

Parameters
displayThe display.
patternThe file name pattern, containing one 'c' and one 'r'.
colFormatA formatting string that is interpreted as the regular C function printf used as the column specifier.
rowFormatA formatting string that is interpreted as the regular C function printf used as the row specifier.
adapterThe IlvMapAdapter.

Member Function Documentation

const char* IlvImageTileLoader::getColFormat ( ) const

Returns the column format specifier.

Returns
The column format specifier.
IlvFeatureRenderer* IlvImageTileLoader::getDefaultFeatureRenderer ( IlvDisplay display)
virtual

Returns the default feature renderer used for the rendering of map features of the current tile.

This default feature renderer is used when the user does not set a feature renderer.

Parameters
displayThe IlvDisplay
Returns
The default feature renderer.

Implements IlvMapTileLoader.

virtual IlvMapFeatureIterator* IlvImageTileLoader::getFeatureIterator ( IlvTile tile)
virtual

Returns the feature iterator to read features for the specified tile.

Parameters
tileThe tile to load.
Returns
The feature iterator to load features for this tile, or 0 if no features are to be loaded.

Implements IlvMapTileLoader.

virtual const char* IlvImageTileLoader::getFileName ( IlvTile tile)
virtual

Returns the file name corresponding to the tile tile. This file name is built using the pattern and the formats specified by the constructor of the class.

Parameters
tileThe tile to be loaded.
Returns
The resulting file name.
IlvMapInfo* IlvImageTileLoader::getMapInfo ( )
virtual

Returns the IlvMapInfo used to generate the IlvGraphic objects.

Returns
The IlvMapInfo used to generate the IlvGraphic objects.

Implements IlvMapTileLoader.

const char* IlvImageTileLoader::getPattern ( ) const

Returns the pattern specifier.

Returns
The pattern specifier.
const char* IlvImageTileLoader::getRowFormat ( ) const

Returns the row format specifier.

Returns
The row format specifier.
virtual IlBoolean IlvImageTileLoader::isPersistent ( ) const
virtual

Returns IlTrue if this tile loader must be saved by a tile controller.

Returns
IlTrue if this tile loader must be saved.

Implements IlvMapTileLoader.


© 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.