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

Detailed Description

TSLEntityBase is an interface to a generic 2D and 3D entity.

TSLEntityBase and its derived classes are not instantiable classes. They may only be created by other calls to the API.

Public Member Functions

bool addDataSet ()
 
bool addDataSet (TSLDataHandler *toUseDataHandler)
 
bool clearRenderingAttributes ()
 
TSLDataSetdataSet ()
 
const TSLDataSetdataSet () const
 
short dataSourceID () const
 
void dataSourceID (short dataSourceID)
 
bool deleteDataSet ()
 
void destroy ()
 
TSLEntityID entityID () const
 
void entityID (TSLEntityID value)
 
TSLFeatureID featureID () const
 
void featureID (TSLFeatureID newValue)
 
bool getRendering (TSLRenderingAttributeInt attribute, int *result) const
 
bool getRendering (TSLRenderingAttributeDouble attribute, double *result) const
 
bool getRendering (TSLRenderingAttributeBool attribute, bool *result) const
 
bool getRendering (TSLRenderingAttributes &result) const
 
TSL3DEntityis3DEntity ()
 
const TSL3DEntityis3DEntity () const
 
TSLEntityisEntity ()
 
const TSLEntityisEntity () const
 
bool isOptimisedEntity () const
 
void name (const char *newValue)
 
const char * name () const
 
void releaseResources (int surfaceID)
 
bool setRendering (TSLRenderingAttributeInt attribute, int value)
 
bool setRendering (TSLRenderingAttributeDouble attribute, double value)
 
bool setRendering (TSLRenderingAttributeBool attribute, bool value)
 
bool setRendering (const TSLRenderingAttributes &attributes)
 
void sourceID (int value)
 
int sourceID () const
 
TSLGeometryType type () const
 
void version (TSLVersion value)
 
TSLVersion version () const
 

Protected Member Functions

 ~TSLEntityBase ()
 

Constructor & Destructor Documentation

◆ ~TSLEntityBase()

TSLEntityBase::~TSLEntityBase ( )
inlineprotected

Member Function Documentation

◆ addDataSet() [1/2]

bool TSLEntityBase::addDataSet ( )

Creates a new TSLDataSet object for the TSLEntity if one does not already exist.

If the TSLEntity object is read-only, addDataSet will not create a TSLDataSet if one does not already exist.

Returns true if a new TSLDataSet object was created or if one already exists.

◆ addDataSet() [2/2]

bool TSLEntityBase::addDataSet ( TSLDataHandler * toUseDataHandler)

Creates a new TSLDataSet object for the TSLEntity if one does not already exist, linked to the data handler provided for mapping of 2-character field keys to human readable field names, types and lengths.

If the TSLEntity object is read-only, addDataSet will not create a TSLDataSet if one does not already exist.

Parameters
toUseDataHandlerthe TSLDataHandler to use.
Returns
true if a new TSLDataSet object was created or if one already exists.

◆ clearRenderingAttributes()

bool TSLEntityBase::clearRenderingAttributes ( )

Remove any specific rendering attributes on an entity.

This function should be called if the entity belongs to a feature class, and rendering information is defined for this feature class. To get the entity to be displayed using the rendering information defined for the feature class, it is required that no rendering attributes are attached to the entity.

Returns true on success, false otherwise.

◆ dataSet() [1/2]

TSLDataSet * TSLEntityBase::dataSet ( )

Returns a pointer to the TSLDataSet for the entity, if one exists.

◆ dataSet() [2/2]

const TSLDataSet * TSLEntityBase::dataSet ( ) const

Returns a pointer to the TSLDataSet for the entity, if one exists.

◆ dataSourceID() [1/2]

short TSLEntityBase::dataSourceID ( ) const

Queries the data source ID of the entity.

This value can be used in conjunction with the FeatureID to identify any source data information which has been stored in the TSLFeatureClassList which pertains to this entity.

◆ dataSourceID() [2/2]

void TSLEntityBase::dataSourceID ( short dataSourceID)

Sets the data source ID of the entity.

This value can be used in conjunction with the FeatureID to identify any source data information which has been stored in the TSLFeatureClassList which pertains to this entity.

Parameters
dataSourceIDThe data source identifier.

◆ deleteDataSet()

bool TSLEntityBase::deleteDataSet ( )

Deletes the TSLDataSet for this entity (if one exists). Returns true if it was successfully deleted, or it doesn't exist. Returns false otherwise.

If the TSLEntity object is read only deleteDataSet will return false.

◆ destroy()

void TSLEntityBase::destroy ( )

Destroy this entity. Destruction of an entity automatically removes it from its parent entity set.

If this entity is an entity set, then all children are also destroyed.

Entities must be destroyed using this call rather that being deleted.

◆ entityID() [1/2]

TSLEntityID TSLEntityBase::entityID ( ) const

Queries the entity ID of the entity.

The entity ID may be populated by certain filters when an object is created by the MapLink processing tool. It is not actually used in map display but may be used as a key when finding objects.

Returns entity ID of entity, 0 if no entity ID allocated.

◆ entityID() [2/2]

void TSLEntityBase::entityID ( TSLEntityID value)

Sets the entity ID of the entity.

The entity ID may be populated by certain filters when an object is created by the MapLink processing tool. It is not actually used in map display but may be used as a key when finding objects.

Parameters
valueNew value for entity ID of entity.

◆ featureID() [1/2]

TSLFeatureID TSLEntityBase::featureID ( ) const

Queries the feature ID of the entity.

The feature ID is populated when an object is created by the MapLink processing tool. It is used to look up the rendering for an object if no overriding attribute set has been created for the entity.

Returns the feature code of the entity, 0 if no feature code is allocated.

◆ featureID() [2/2]

void TSLEntityBase::featureID ( TSLFeatureID newValue)

Sets the feature ID of the entity.

The feature ID is populated when an object is created by the MapLink processing tool. It is used to look up the rendering for an object if no overriding attribute set has been created for the entity.

User defined features may be from 1 to 16777215 (1 to 0xFFFFFF)

Parameters
newValueNew value for the feature code of the entity.

◆ getRendering() [1/4]

bool TSLEntityBase::getRendering ( TSLRenderingAttributeBool attribute,
bool * result ) const

Gets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to query
resultStorage for returned value
Returns
true if rendering attribute was available and placed into result, false otherwise.

◆ getRendering() [2/4]

bool TSLEntityBase::getRendering ( TSLRenderingAttributeDouble attribute,
double * result ) const

Gets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to query
resultStorage for returned value
Returns
true if rendering attribute was available and placed into result, false otherwise.

◆ getRendering() [3/4]

bool TSLEntityBase::getRendering ( TSLRenderingAttributeInt attribute,
int * result ) const

Gets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to query
resultStorage for returned value
Returns
true if rendering attribute was available and placed into result, false otherwise.

◆ getRendering() [4/4]

bool TSLEntityBase::getRendering ( TSLRenderingAttributes & result) const

Gets all rendering attributes according to the entity type. Any other rendering attributes as set to their undefined value

Parameters
resultStorage for returned values
Returns
true if rendering attributes were available and placed into result, false otherwise.

◆ is3DEntity() [1/2]

TSL3DEntity * TSLEntityBase::is3DEntity ( )

Query whether the entity is a 3D Entity

If this entity is a 3D Entity, returns an accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

◆ is3DEntity() [2/2]

const TSL3DEntity * TSLEntityBase::is3DEntity ( ) const

Query whether the entity is a 3D Entity

If this entity is a 3D Entity, returns an accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

◆ isEntity() [1/2]

TSLEntity * TSLEntityBase::isEntity ( )

Query whether the entity is a 2D Entity

If this entity is a 2D Entity, returns an accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

◆ isEntity() [2/2]

const TSLEntity * TSLEntityBase::isEntity ( ) const

Query whether the entity is a 2D Entity

If this entity is a 2D Entity, returns a const accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

◆ isOptimisedEntity()

bool TSLEntityBase::isOptimisedEntity ( ) const

Query whether the entity is an optimised Entity.

If an Entity is optimised it may not be possible to further analyse it.

Returns true if entity is optimised, false otherwise.

◆ name() [1/2]

const char * TSLEntityBase::name ( ) const

Queries the name of the entity.

The name is a user-defined value, ignored by the MapLink rendering.

Certain input filters may set the name from the source data, dependent upon the configuration.

Returns NULL if no name has been assigned to the entity.

◆ name() [2/2]

void TSLEntityBase::name ( const char * newValue)

Sets the name of the entity.

The name is a user-defined value, ignored by the MapLink rendering.

Certain input filters may set the name from the source data, dependent upon the configuration.

Parameters
newValueNew value for name of entity.

◆ releaseResources()

void TSLEntityBase::releaseResources ( int surfaceID)

This method will need to be called when the method releaseResources is called on a TSLClientCustomDataLayer or TSLDisplayObject.

The method only needs to be called on Entities that are not owned by a MapLink layer.

This method will be used by future drawing surface types as optimised formats will need to be created internally to minimise the CPU load and maximise GPU throughput.

This method does not need to be called if the Entity has not been drawn.

The exact rules and limitations for these future drawing surfaces have yet to be completed.

Parameters
surfaceIDA unique surface number.

◆ setRendering() [1/4]

bool TSLEntityBase::setRendering ( const TSLRenderingAttributes & attributes)

Sets the specified rendering attributes according to the entity type.

Undefined or multiple values are ignored.

Parameters
attributesRendering attributes to set
Returns
true if rendering attributes were available and updated, false otherwise

◆ setRendering() [2/4]

bool TSLEntityBase::setRendering ( TSLRenderingAttributeBool attribute,
bool value )

Sets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to set
valueNew value for attribute
Returns
true if rendering attribute was available and updated, false otherwise.

◆ setRendering() [3/4]

bool TSLEntityBase::setRendering ( TSLRenderingAttributeDouble attribute,
double value )

Sets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to set
valueNew value for attribute
Returns
true if rendering attribute was available and updated, false otherwise.

◆ setRendering() [4/4]

bool TSLEntityBase::setRendering ( TSLRenderingAttributeInt attribute,
int value )

Sets the specified rendering attribute according to the entity type.

Parameters
attributeRendering attribute to set
valueNew value for attribute
Returns
true if rendering attribute was available and updated, false otherwise.

◆ sourceID() [1/2]

int TSLEntityBase::sourceID ( ) const

Queries the source id of the entity.

The source ID is used by MapLink as a key when looking up catalogue information. This value is reserved for internal use; applications should be careful when modifying this value.

Returns
A 32 bit integer value containing the source ID, or -1 if the value has not been set.

◆ sourceID() [2/2]

void TSLEntityBase::sourceID ( int value)

Sets the source id of the entity.

The source ID is used by MapLink as a key when looking up catalogue information. This value is reserved for internal use; applications should be careful when modifying this value.

Parameters
valueThe new source id of the entity.

◆ type()

TSLGeometryType TSLEntityBase::type ( ) const

Queries the type of the geometry.

◆ version() [1/2]

TSLVersion TSLEntityBase::version ( ) const

Queries the version number of the entity.

The version number may be populated by certain filters when and utility features when an object is created by a MapLink processing tool. It may also be used for application specific purposes.

Returns
A 32 bit integer value containing the version number of the entity, or -1 if this value has not been set.

◆ version() [2/2]

void TSLEntityBase::version ( TSLVersion value)

Sets the version number of the entity.

The version number may be populated by certain filters when and utility features when an object is created by a MapLink processing tool. It may also be used for application specific purposes.

Parameters
valueThe new version number of the entity.