MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLInteropImportSet Class Reference

Detailed Description

TSLInteropImportSet is a container class for a set of TSLStandardDataLayers that are to be post-processed by the TSLInteropManager.

Each item in the container consists of a TSLStandardDataLayer and a filename. The filename is not currently used but is present for future extensions and to provide equivalent containers for import and export.

The TSLStandardDataLayers in this container are created by the client and added to the TSLInteropImportSet. These layers are owned by the client and are not deleted with the TSLInteropImportSet.

TSLInteropImportSet objects should be allocated on the heap using the new operator. They cannot be instantiated on the stack. They should be destroyed by calling the destroy method rather than deleting them since the calls are redirected internally to MapLink.

Public Member Functions

 TSLInteropImportSet ()
 
bool addItem (TSLStandardDataLayer *layer, const char *filename)
 
void destroy ()
 
bool item (int index, TSLStandardDataLayer **layer, TSLSimpleString &filename)
 
int size () const
 
void * operator new (size_t size) TSL_NO_THROW
 
void * operator new (size_t size, char *filename, int line)
 

Constructor & Destructor Documentation

◆ TSLInteropImportSet()

TSLInteropImportSet::TSLInteropImportSet ( )

Creates a default TSLInteropImportSet.

Member Function Documentation

◆ addItem()

bool TSLInteropImportSet::addItem ( TSLStandardDataLayer * layer,
const char * filename )

Adds an item to the container.

Parameters
layerThe TSLStandardDataLayer component of the item.
filenameThe filename component of the item.
Returns
true on success; false otherwise.

Note that the TSLInteropImportSet object does not take ownership of the TSLStandardDataLayer passed in. The client keeps ownership of the layer and should delete it when it has finished using it.

◆ destroy()

void TSLInteropImportSet::destroy ( )

Destroy method. This should be called rather than deleting the object, since the calls are redirected internally to MapLink.

◆ item()

bool TSLInteropImportSet::item ( int index,
TSLStandardDataLayer ** layer,
TSLSimpleString & filename )

Returns the requested item in the container.

Parameters
indexIndex of item within the container.
layerThe TSLStandardDataLayer component of the item.
filenameThe filename component of the item.
Returns
true on success; false otherwise.

◆ operator new() [1/2]

void * TSLInteropImportSet::operator new ( size_t size)

Overridden allocation to redirect to MapLink

◆ operator new() [2/2]

void * TSLInteropImportSet::operator new ( size_t size,
char * filename,
int line )

When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.

◆ size()

int TSLInteropImportSet::size ( ) const

Returns the number of items in the container.