MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLDynamicRenderer Class Reference
Inheritance diagram for TSLDynamicRenderer:

Detailed Description

This abstract base class allows an application to provide dynamic custom rendering for any MapLink entity.

Dynamic Renderers are named and can be created via the direct instantation of the concrete derived classes, or by name if the concrete class has been registered with the TSLDynamicRendererFactory utility class.

Public Member Functions

TSLDynamicRendererclone () const
 
void destroy ()
 
bool isAlias () const
 
TSLClientCustomDynamicRendererclientInterface () const
 
const char * name () const
 
bool setConfig (const TSLSimpleString &src)
 
bool getConfig (TSLSimpleString &dst) const
 
bool triggeredbyEntitySets () const
 
int type () const
 

Protected Member Functions

 ~TSLDynamicRenderer ()
 
 TSLDynamicRenderer ()
 
 TSLDynamicRenderer (const TSLDynamicRenderer &)
 
TSLDynamicRendereroperator= (const TSLDynamicRenderer &)
 

Constructor & Destructor Documentation

◆ ~TSLDynamicRenderer()

TSLDynamicRenderer::~TSLDynamicRenderer ( )
inlineprotected

Protected destructor to stop being instantiated on the stack Forces user to use new operator and destroy method.

◆ TSLDynamicRenderer() [1/2]

TSLDynamicRenderer::TSLDynamicRenderer ( )
inlineprotected

◆ TSLDynamicRenderer() [2/2]

TSLDynamicRenderer::TSLDynamicRenderer ( const TSLDynamicRenderer & )
protected

Member Function Documentation

◆ clientInterface()

TSLClientCustomDynamicRenderer * TSLDynamicRenderer::clientInterface ( ) const

Queries any TSLClientCustomDynamicRenderer associated with the Dynamic Renderer. Typically this would then be cast to the appropriate concrete type for further method calls. The 'type' method of the TSLClientCustomDynamicRenderer can be used to identify which concrete class is appropriate.

For non-custom Dynamic Renderers, this returns 0.

◆ clone()

TSLDynamicRenderer * TSLDynamicRenderer::clone ( ) const

This method returns a clone of the TSLDynamicRenderer. This is used by the Dynamic Renderer Factory.

◆ destroy()

void TSLDynamicRenderer::destroy ( )

Destroy this dynamic renderer

◆ getConfig()

bool TSLDynamicRenderer::getConfig ( TSLSimpleString & dst) const

This method, and the associated setConfig method, allow the application to persist the Dynamic Rendering configuration. If the Dynamic Renderer supports persistence, then it should implement this method by writing its configuration data to this string. The string is assumed to be null-terminated ASCII, for example an XML stream.

For custom dynamic renderers, this call will be propagated to the equivalent method in the TSLClientCustomDynamicRenderer class. Care must be taken to allow for future updates by storing version information in the configuration string.

Parameters
dstString which should be used to write the configuration data.
Returns
true if the config was successfully written, false otherwise.

◆ isAlias()

bool TSLDynamicRenderer::isAlias ( ) const

Returns whether this Dynamic Renderer is merely an alias for an existing one. This is because some applications may wish to query the list of available renderers and present them to the user. In such cases, alias only renderers should not be displayed.

◆ name()

const char * TSLDynamicRenderer::name ( ) const

Returns the name of the Dynamic Renderer, used to instantiate it via the factory.

◆ operator=()

TSLDynamicRenderer & TSLDynamicRenderer::operator= ( const TSLDynamicRenderer & )
protected

◆ setConfig()

bool TSLDynamicRenderer::setConfig ( const TSLSimpleString & src)

This method, and the associated getConfig method, allow the application to persist the Dynamic Rendering. If the Dynamic Renderer supports persistence, then it should implement this method by reading its configuration data from this string. The string is assumed to be null-terminated ASCII, for example an XML stream.

For custom dynamic renderers, this call will be propagated to the equivalent method in the TSLClientCustomDynamicRenderer class. Care must be taken to allow for future updates by storing version information in the configuration string.

Parameters
srcString which represents the configuration being loaded.
Returns
true if the config was successfully read, false otherwise

◆ triggeredbyEntitySets()

bool TSLDynamicRenderer::triggeredbyEntitySets ( ) const

Returns whether this Dynamic Renderer can be triggered by Entity Sets This is because some Dynamic Renders may wish to prevent the rendering of entire sets of features, decluttering style.

◆ type()

int TSLDynamicRenderer::type ( ) const

This method returns the 'type' of the Dynamic Renderer and can be used for casting purposes. A TSLDynamicRendererCustom will return the type of the client interface via this method, rather than its own type.

NOTE: Values in the range of 0-999 are reserved for future MapLink use.

If a custom type is identified, then the return from the 'clientInterface' should be cast to the appropriate concrete class. If a standard type is identified, then the TSLDynamicRenderer itself should be cast to the appropriate concrete class.

Defined Dynamic Renderer Types:

  • The S52 Dynamic Renderer will report itself as type 1.