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. 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)
 Initializes a new IlvImageTileLoader by specifying what it needs to construct a file name for a given IlvTile. More...
 
const char * getColFormat () const
 Returns the column format specifier. More...
 
IlvFeatureRenderergetDefaultFeatureRenderer (IlvDisplay *)
 Returns the default feature renderer used for the rendering of map features of the current tile. More...
 
virtual IlvMapFeatureIteratorgetFeatureIterator (IlvTile *)
 Returns the feature iterator to read features for the specified tile. More...
 
virtual const char * getFileName (IlvTile *tile)
 Returns the file name for a given tile. More...
 
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.

Library: ilvmaps
Each image represents a tile in a tiled data set.

Constructor & Destructor Documentation

§ IlvImageTileLoader()

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

Initializes a new IlvImageTileLoader by specifying what it needs 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 "ADirectory/file_%c_%r_image.jpg" and the colFormat is "%03d" and the colFormat is "%04d", the resulting file name for the tile at (12, 34) will be "ADirectory/file_0034_012_image.jpg".

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

§ getColFormat()

const char* IlvImageTileLoader::getColFormat ( ) const

Returns the column format specifier.

Returns
The column format specifier.

§ getDefaultFeatureRenderer()

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.

§ getFeatureIterator()

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.

§ getFileName()

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

Returns the file name for a given tile.

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

Parameters
tileThe tile to get the file name from.
Returns
The resulting file name.

§ getMapInfo()

IlvMapInfo* IlvImageTileLoader::getMapInfo ( )
virtual

Returns the IlvMapInfo used to generate the IlvGraphic objects.

Returns
The IlvMapInfo used to generate the IlvGraphic objects.

Implements IlvMapTileLoader.

§ getPattern()

const char* IlvImageTileLoader::getPattern ( ) const

Returns the pattern specifier.

Returns
The pattern specifier.

§ getRowFormat()

const char* IlvImageTileLoader::getRowFormat ( ) const

Returns the row format specifier.

Returns
The row format specifier.

§ isPersistent()

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