rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions
IlvProjectionDictionary Class Reference

This class provides facilities to get the list of the implemented projections and to create projection instances by their names. More...

#include <ilviews/maps/projection/projdict.h>

Public Member Functions

 IlvProjectionDictionary (IlBoolean init=IlTrue)
 Initializes a projection dictionary. More...
 
IlvProjectioncreateProjection (const char *name) const
 Creates a projection called name. More...
 
const char ** getProjectionNames (IlUInt &count) const
 Returns the array of the projection names that have been registered in the dictionary. More...
 
virtual void registerProjection (IlvProjectionClassInfo *pcInfo)
 Registers a new projection in the dictionary. More...
 
virtual IlBoolean unregisterProjection (IlvProjectionClassInfo *pcInfo)
 Unregisters a projection from the dictionary. More...
 

Detailed Description

This class provides facilities to get the list of the implemented projections and to create projection instances by their names.

It can be used, for example, in the user interface of map applications to create a projection editor. Library: ilvmaps

See Also
IlvProjection, IlvProjectionClassInfo, IlvProjectionInterface.

Constructor & Destructor Documentation

IlvProjectionDictionary::IlvProjectionDictionary ( IlBoolean  init = IlTrue)

Initializes a projection dictionary.

If the init argument is not passed, or if it is passed with the value IlTrue, the dictionary is initialized with all the projections in the map library, and with all the projections that have been subclassed and that are linked to the application. Otherwise, it is initialized with an empty list of projections.

Parameters
initIf set to IlTrue, creates a dictionary with all the available projection. If set to IlFalse, creates an empty list.

Member Function Documentation

IlvProjection* IlvProjectionDictionary::createProjection ( const char *  name) const

Creates a projection called name.

This method can return a null pointer if the projection class name is not registered in the dictionary. It is typically used to create a projection instance from a name selected by the end user in a string list or in a pop-up menu of a user interface.

Note
The projection name of a projection class is the name returned by the member function getProjectionName() of the ClassInfo() of a desired projection class. For example, the projection name for the IlvMercatorProjection class is "Mercator," and the projection name for the IlvUniversalTransverseMercator class is "Universal Transverse Mercator."
Parameters
nameThe projection name.
const char** IlvProjectionDictionary::getProjectionNames ( IlUInt count) const

Returns the array of the projection names that have been registered in the dictionary.

This method sets the number of projections that have been registered into the argument count. This function is typically used to initialize a pop-up menu or a string list with a list of available projections.

Warning
The returned array must be deleted by the user.
Parameters
countThe returned number of registered projections.
Returns
The array of projection names.
virtual void IlvProjectionDictionary::registerProjection ( IlvProjectionClassInfo pcInfo)
virtual

Registers a new projection in the dictionary.

Parameters
pcInfoThe IlvProjectionClassInfo of the projection to register.
virtual IlBoolean IlvProjectionDictionary::unregisterProjection ( IlvProjectionClassInfo pcInfo)
virtual

Unregisters a projection from the dictionary.

Note
The class information of a projection can be accessed via the virtual member function IlvProjection::getClassInfo(), or via the static function ClassInfo().
Parameters
pcInfoThe IlvProjectionClassInfo of the projection to unregister.
Returns
IlTrue if the projection was registered, IlFalse otherwise.

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