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

Detailed Description

The TSLObjectDataLayer component handles the manipulation of TSLDynamicData Object (DDO) objects (and implicitly their associated TSLDisplayObject (DO) objects).

By virtue of being added to a TSLObjectDataLayer, MapLink will act as the visualisation manager for DOs associated with these DDOs.

The object data layer assumes ownership of all DDOs that are added to it.

TSLObjectDataLayers can only be created on the heap; they must be deleted by calling the destroy() method.

Public Member Functions

 TSLObjectDataLayer ()
 
bool addDDO (TSLDynamicDataObject *ddo)
 
const TSLlist< TSLDisplayObject * > & displayObjects (TSLDrawingSurface *ds) const
 
void displayObjectsInArea (TSLDrawingSurface *ds, TSLEnvelope &area, TSLvector< TSLDisplayObject * > &vDO) const
 
int ddoCount () const
 
TSLDynamicDataObjectfindDDO (Long x, Long y, Long aperture) const
 
TSLDisplayObjectfindDO (TSLDrawingSurface *dSurface, Long x, Long y, Long aperture) const
 
TSLDynamicDataObjectgetDDO (int index) const
 
const TSLlist< TSLDynamicDataObject * > & getDDOList () const
 
bool removeDDO (TSLDynamicDataObject *ddo)
 
bool saveData (const char *fileName)
 
void setSelectability (bool selectability)
 
void setVisibility (bool visibility)
 
void sortDDO (const TSLCmp &cmp, bool sortDOs=true)
 
bool bringToFront (TSLDynamicDataObject *move_ddo)
 
bool sendToBack (TSLDynamicDataObject *move_ddo)
 
void * operator new (size_t size) TSL_NO_THROW
 
void operator delete (void *pMem)
 
void * operator new (size_t size, char *filename, int line)
 
- Public Member Functions inherited from TSLDataLayer
void addDrawingCallback (TSLDataLayerDrawingCallback *drawingCallback)
 
bool addFeatureRendering (const char *featureName, TSLFeatureID featureID)
 
bool addLoader (TSLFileLoader *loader, TSLLoaderAppCallback callback, void *arg, TSLAllLoadedCallback allLoadedCallback=0, void *arg2=0)
 
bool addPathList (const TSLPathList *path_list)
 
void cancelFlashback ()
 
bool clearFeatureRendering (const char *featureName, TSLFeatureID featureID)
 
TSLDataHandlercreateDataHandler (const char *config_file=0)
 
TSLHistoryVersion currentVersion () const
 
TSLDataHandlerdataHandler ()
 
const TSLDataHandlerdataHandler () const
 
void destroy ()
 
bool entityIsVisible (const TSLEntity *entity, const TSLDrawingSurface *drawingSurface) const
 
const TSLFeatureClassListfeatureList () const
 
const TSLFeatureClassListfeatureList (const char *detailLayerName) const
 
bool fileModificationTime (const char *filename, TSLTimeType &lastModificationTime)
 
TSLEntityfindEntity (TSLTMC x, TSLTMC y, TSLTMC aperture, int depth, const char *featureName=0, int drawingSurfaceID=-1)
 
bool findFile (const char *filename, TSLSimpleString &foundPath) const
 
void flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveCallback archiveCallback, void *arg=0)
 
void flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0)
 
void flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveCallback archiveCallback, void *arg=0)
 
void flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0)
 
bool getActiveLayerName (const TSLEnvelope &extent, double screenResolution, TSLSimpleString &activeLayerName) const
 
TSLEntityIteratorgetEntityIterator (const char *detailLayer, TSLSelector *selector=NULL, TSLEnvelope *extent=NULL, bool splitOptimisedPrimitives=true)
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *result) const
 
TSLFileLoadergetLoader ()
 
bool getMUExtent (double *x1, double *y1, double *x2, double *y2, int drawingSurfaceID=-1) const
 
bool getTMCExtent (TSLTMC *x1, TSLTMC *y1, TSLTMC *x2, TSLTMC *y2, int drawingSurfaceID=-1) const
 
bool getUUExtent (double *x1, double *y1, double *x2, double *y2, const TSLDrawingSurface *drawingSurface) const
 
bool importHistory (TSLHistoryVersion mapVersion, TSLHistoryTimestamp timestamp, TSLHistoryImportSet *historySet)
 
bool latLongToTMC (double latitude, double longitude, TSLTMC *x, TSLTMC *y, bool local=false) const
 
bool latLongToTMC (int num, double *latitudes, double *longitudes, TSLTMC *xs, TSLTMC *ys, bool local=false) const
 
TSLDataLayerTypeEnum layerType () const
 
bool loadData (const char *filename)
 
bool loadRendering (const char *filename)
 
void notifyChanged (bool changed=true)
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *featureName=NULL, int drawingSurfaceID=-1) const
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector, int drawingSurfaceID=-1) const
 
const TSLCoordinateSystemgetCoordinateSystem () const
 
bool queryVersionHistory (const TSLEnvelope &extent, TSLVersionHistorySet &history)
 
void refreshFlashback ()
 
bool removeData ()
 
void releaseResources (int surfaceID)
 
bool saveRendering (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION)
 
bool setCoordinateSystem (const TSLCoordinateSystem *coordinateSystem)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *value)
 
bool TMCToLatLong (TSLTMC x, TSLTMC y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const
 
bool TMCToLatLong (int num, TSLTMC *xs, TSLTMC *ys, double *latitudes, double *longitudes, bool local=false) const
 
const TSLVersionHistorySetversionHistory () const
 

Protected Member Functions

 ~TSLObjectDataLayer ()
 

Constructor & Destructor Documentation

◆ TSLObjectDataLayer()

TSLObjectDataLayer::TSLObjectDataLayer ( )

Default constructor for the Object Data Layer

◆ ~TSLObjectDataLayer()

TSLObjectDataLayer::~TSLObjectDataLayer ( )
protected

Protected destructor prevents creation of objects on the stack.

Member Function Documentation

◆ addDDO()

bool TSLObjectDataLayer::addDDO ( TSLDynamicDataObject * ddo)

Adds a TSLDynamicDataObject (DDO) to the object data layer. The object data layer then becomes the 'owner' of this DDO.

Parameters
ddoPointer to the DDO to be added.
Returns
true on success, false otherwise.

◆ bringToFront()

bool TSLObjectDataLayer::bringToFront ( TSLDynamicDataObject * move_ddo)

Move Dynamic Data Object to top of display list.

This method allows the display order of the attached TSLDynamicDataObject instances to be modified. The specified TSLDynamicDataObject instance will be drawn on top of all other TSLDynamicDataObject instances attached to this TSLObjectDataLayer.

Parameters
move_ddoThe TSLDynamicDataObject that is to be moved.
Returns
true on success, false otherwise.

◆ ddoCount()

int TSLObjectDataLayer::ddoCount ( ) const

Returns the number of TSLDynamicDataObjects in the layer.

◆ displayObjects()

const TSLlist< TSLDisplayObject * > & TSLObjectDataLayer::displayObjects ( TSLDrawingSurface * ds) const

Returns all the TSLDisplayObjects (DO) on the drawing surface.

Parameters
dsThe drawing surface.
Returns
a reference to the list of pointers to DOs.

◆ displayObjectsInArea()

void TSLObjectDataLayer::displayObjectsInArea ( TSLDrawingSurface * ds,
TSLEnvelope & area,
TSLvector< TSLDisplayObject * > & vDO ) const

Finds all the TSLDisplayObjects (DO) on the drawing surface in the given area.

Parameters
dsThe drawing surface.
areaThis specifies an extent (in TMC units) around the location co-ordinate in which to search for the DOs.
vDOA reference to the TSLvector of pointers that will contain the DOs.

◆ findDDO()

TSLDynamicDataObject * TSLObjectDataLayer::findDDO ( Long x,
Long y,
Long aperture ) const

Returns a TSLDynamicDataObject (DDO) given a position (in TMC units).

Parameters
(x,y)Co-ordinate (in TMC units) of the location where to find the DDO.
apertureThis specifies an extent (in TMC units) around the location co-ordinate in which to search for the DDO.
Returns
a pointer to a DDO if found, 0 otherwise.

◆ findDO()

TSLDisplayObject * TSLObjectDataLayer::findDO ( TSLDrawingSurface * dSurface,
Long x,
Long y,
Long aperture ) const

Returns a TSLDisplayObject (DO) given a position (in TMC units).

Parameters
dSurfaceThe drawing surface.
(x,y)Co-ordinate (in TMC units) of the location where to find the DO.
apertureThis specifies an extent (in TMC units) around the location co-ordinate in which to search for the DO.
Returns
a pointer to a DO if found, 0 otherwise.

◆ getDDO()

TSLDynamicDataObject * TSLObjectDataLayer::getDDO ( int index) const

Return the nth TSLDynamicDataObject (DDO).

Parameters
indexThe index position of the required DDO.
Returns
a pointer to a DDO if found, 0 otherwise.

◆ getDDOList()

const TSLlist< TSLDynamicDataObject * > & TSLObjectDataLayer::getDDOList ( ) const

Returns a reference to the TSLlist of pointers to TSLDynamicDataObjects in this layer.

◆ operator delete()

void TSLObjectDataLayer::operator delete ( void * pMem)

◆ operator new() [1/2]

void * TSLObjectDataLayer::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

void * TSLObjectDataLayer::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.

◆ removeDDO()

bool TSLObjectDataLayer::removeDDO ( TSLDynamicDataObject * ddo)

Removes a TSLDynamicDataObject (DDO) from the object data layer. Ownership of the DDO returns to the client.

Parameters
ddoPointer to the DDO to be removed.
Returns
true on success, false otherwise.

◆ saveData()

bool TSLObjectDataLayer::saveData ( const char * fileName)

Saves TSLDynamicDataObjects (DDO) to a file for the TSLObjectDataLayer.

Parameters
fileNameName of the file into which to save the objects.
Returns
true on success, false otherwise.

◆ sendToBack()

bool TSLObjectDataLayer::sendToBack ( TSLDynamicDataObject * move_ddo)

Move DDO to bottom of Data Layer display list.

This method allows the specified TSLDynamicDataObject to be placed behind all other attached TSLDynamicDataObject instances attached to this TSLObject DataLayer.

Parameters
move_ddoThe TSLDynamicDataObject that is to be moved.
Returns
true on success, false otherwise.

◆ setSelectability()

void TSLObjectDataLayer::setSelectability ( bool selectability)

Sets the selectability of all the TSLDynamicDataObjects (DDO) in this layer.

Parameters
selectabilityIf true, then DDO is selectable.

◆ setVisibility()

void TSLObjectDataLayer::setVisibility ( bool visibility)

Sets the visibility of all the TSLDynamicDataObjects (DDO) in this layer.

Parameters
visibilityIf true, then DDO is visible.

◆ sortDDO()

void TSLObjectDataLayer::sortDDO ( const TSLCmp & cmp,
bool sortDOs = true )

Sort the contained TSLDynamicDataObjects (DDO) according to the supplied comparator object.

Parameters
cmpThe comparator object defining the sort order.
sortDOstrue, if the TSLDisplayObjects are to be sorted as well.