rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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>

List of all members.

Public Member Functions

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

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:
init If 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.

Warning:
[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:
name The 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:
count The returned number of registered projections.
Returns:
The array of projection names.
virtual void IlvProjectionDictionary::registerProjection ( IlvProjectionClassInfo projClassInfo  )  [virtual]

Registers a new projection in the dictionary.

Parameters:
projClassInfo The IlvProjectionClassInfo of the projection to register.
virtual IlBoolean IlvProjectionDictionary::unregisterProjection ( IlvProjectionClassInfo  )  [virtual]

Unregisters a projection from the dictionary.

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

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