Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
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... | |
IlvProjection * | createProjection (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... | |
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
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.
init | If set to IlTrue , creates a dictionary with all the available projection. If set to IlFalse , creates an empty list. |
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.
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." 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.
count | The returned number of registered projections. |
|
virtual |
Registers a new projection in the dictionary.
pcInfo | The IlvProjectionClassInfo of the projection to register. |
|
virtual |
Unregisters a projection from the dictionary.
IlvProjection::getClassInfo()
, or via the static function ClassInfo()
.pcInfo | The IlvProjectionClassInfo of the projection to unregister. |
IlTrue
if the projection was registered, IlFalse
otherwise. © Copyright 2017, 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.