Utility to handle creation and management of Dynamic Renderers. Allows use of plugins to extend MapLink Dynamic Rendering Functionality. All methods are static.
The registered Dynamic Renderers are destroyed when the Drawing Surface cleanup method is called.
Note: If you are not using the version of Visual Studio that MapLink was built with then you can not use this class.
static bool TSLDynamicRendererFactory::loadPlugin |
( |
const char * | plugin | ) |
|
|
static |
Loads the specified plugin, and initialises it.
On windows, the specified DLL is loaded and the 'extern "C" void initialiseDynamicRenderer()' method called if it exists. This should register any Dynamic Renderers with the TSLDynamicRendererFactory. An individual plugin may register any number of Dynamic Renderers.
The plugin name should not include the extension. When run in debug mode, a 'd' will be appended to the name prior to load.
- Parameters
-
plugin | Plugin to load - either full path to library, or name of file which is found in the DLL path. |
- Returns
- true if successfully loaded and the initialiseDynamicRenderer method was called, false otherwise.
static bool TSLDynamicRendererFactory::loadPlugins |
( |
const char * | directory, |
|
|
const char * | wildcard = "*" ) |
|
static |
Loads all the plugins from the specified directory, and initialises them.
On windows, all DLL's in the specified directory that match the specified wildcard are loaded and the 'extern "C" void initialiseDynamicRenderer()' method called if it exists. This should register any Dynamic Renderers with the TSLDynamicRendererFactory. An individual plugin may register any number of Dynamic Renderers.
This method makes individual calls to loadPlugin, for matching files.
- Parameters
-
directory | Full path to directory containing plugins to load. |
wildcard | Wildcard to search for filenames in the directory |
- Returns
- true if successfully loaded and the initialiseDynamicRenderer method was called for any plugin in the directory, false otherwise.
static bool TSLDynamicRendererFactory::registerDynamicRenderer |
( |
TSLDynamicRenderer * | exemplar | ) |
|
|
static |
This method registers the specific Dynamic Renderer with the factory. The factory assumes ownership of the object.
The application can subsequently create an instance of the named renderer using the 'create' method.
If an existing registered renderer has the same name as the exemplar, then it is replaced by the new one, success is returned and a warning placed on the MapLink error stack.
- Parameters
-
exemplar | Example of Dynamic Renderer to register. This will be cloned when 'create' is called with this renderers name. |
- Returns
- true if successfully registered, false otherwise.