Rogue Wave Views 5.5.1 |
Rogue Wave Views |
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. | |
IlvProjection * | createProjection (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. |
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
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.
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 void IlvProjectionDictionary::registerProjection | ( | IlvProjectionClassInfo * | projClassInfo | ) | [virtual] |
Registers a new projection in the dictionary.
projClassInfo | The IlvProjectionClassInfo of the projection to register. |
virtual IlBoolean IlvProjectionDictionary::unregisterProjection | ( | IlvProjectionClassInfo * | ) | [virtual] |
Unregisters a projection from the dictionary.
IlvProjection::getClassInfo
, or via the static function ClassInfo.The | IlvProjectionClassInfo of the projection to unregister. |
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.