![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
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 () |
TSLDataSet * | dataSet () |
const TSLDataSet * | dataSet () 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 |
TSL3DEntity * | is3DEntity () |
const TSL3DEntity * | is3DEntity () const |
TSLEntity * | isEntity () |
const TSLEntity * | isEntity () 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 () | |
|
inlineprotected |
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.
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.
toUseDataHandler | the TSLDataHandler to use. |
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.
TSLDataSet * TSLEntityBase::dataSet | ( | ) |
Returns a pointer to the TSLDataSet for the entity, if one exists.
const TSLDataSet * TSLEntityBase::dataSet | ( | ) | const |
Returns a pointer to the TSLDataSet for the entity, if one exists.
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.
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.
dataSourceID | The data source identifier. |
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.
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.
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.
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.
value | New value for entity ID of entity. |
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.
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)
newValue | New value for the feature code of the entity. |
bool TSLEntityBase::getRendering | ( | TSLRenderingAttributeBool | attribute, |
bool * | result ) const |
Gets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to query |
result | Storage for returned value |
bool TSLEntityBase::getRendering | ( | TSLRenderingAttributeDouble | attribute, |
double * | result ) const |
Gets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to query |
result | Storage for returned value |
bool TSLEntityBase::getRendering | ( | TSLRenderingAttributeInt | attribute, |
int * | result ) const |
Gets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to query |
result | Storage for returned value |
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
result | Storage for returned values |
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.
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.
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.
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.
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.
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.
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.
newValue | New value for name of entity. |
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.
surfaceID | A unique surface number. |
bool TSLEntityBase::setRendering | ( | const TSLRenderingAttributes & | attributes | ) |
Sets the specified rendering attributes according to the entity type.
Undefined or multiple values are ignored.
attributes | Rendering attributes to set |
bool TSLEntityBase::setRendering | ( | TSLRenderingAttributeBool | attribute, |
bool | value ) |
Sets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to set |
value | New value for attribute |
bool TSLEntityBase::setRendering | ( | TSLRenderingAttributeDouble | attribute, |
double | value ) |
Sets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to set |
value | New value for attribute |
bool TSLEntityBase::setRendering | ( | TSLRenderingAttributeInt | attribute, |
int | value ) |
Sets the specified rendering attribute according to the entity type.
attribute | Rendering attribute to set |
value | New value for attribute |
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.
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.
value | The new source id of the entity. |
TSLGeometryType TSLEntityBase::type | ( | ) | const |
Queries the type of the geometry.
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.
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.
value | The new version number of the entity. |