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

A polygon containing geometry in Map-Units, i.e. geometry in a particular coordinate system. More...

Inheritance diagram for TSLMUPolygon:

Detailed Description

A polygon containing geometry in Map-Units, i.e. geometry in a particular coordinate system.

Public Member Functions

virtual TSLMUGeometryclone ()
 
TSLvector< TSLMUCoord > & getOuter ()
 
void setOuter (const TSLvector< TSLMUCoord > *newOuter)
 
unsigned int numInners () const
 
TSLvector< TSLMUCoord > & getInner (unsigned int index)
 
void setInner (unsigned int index, const TSLvector< TSLMUCoord > *newInner)
 
virtual bool calculateExtent (TSLMUExtent &extent) const
 
- Public Member Functions inherited from TSLMUGeometry
void destroy ()
 Destructor.
 
TSLMUGeometry::GeometryType type () const
 
TSLFeatureID featureID () const
 
void featureID (TSLFeatureID id)
 
const char * featureName () const
 
void featureName (const char *name)
 
unsigned int numAttributes () const
 
bool getAttribute (unsigned int index, TSLSimpleString *attributeName, TSLSimpleString *attributeValue)
 
const char * getAttribute (const char *attributeName) const
 
void setAttribute (const char *attributeName, const char *attributeValue)
 
void clearAttribute (const char *attributeName)
 
void clearAttributes ()
 Clear all attributes.
 
void rotation (double rot)
 
double rotation () const
 

Static Public Member Functions

static TSLMUPolygoncreate (const TSLvector< TSLMUCoord > *outer=NULL, const TSLvector< const TSLvector< TSLMUCoord > * > *inners=NULL, TSLFeatureID featureID=TSLFeatureID_Default, const char *featureName=NULL)
 

Protected Member Functions

 TSLMUPolygon (const TSLvector< TSLMUCoord > *outer=NULL, const TSLvector< const TSLvector< TSLMUCoord > * > *inners=NULL, TSLFeatureID featureID=TSLFeatureID_Default, const char *featureName=NULL)
 
 TSLMUPolygon (const TSLMUPolygon &other)
 
virtual ~TSLMUPolygon ()
 
- Protected Member Functions inherited from TSLMUGeometry
 TSLMUGeometry (TSLMUGeometry::GeometryType type, TSLFeatureID featureID=TSLFeatureID_Default, const char *featureName=NULL)
 
 TSLMUGeometry (const TSLMUGeometry &other)
 
virtual ~TSLMUGeometry ()
 

Additional Inherited Members

- Public Types inherited from TSLMUGeometry
enum  GeometryType {
  GeometryTypeNone , GeometryTypeSet , GeometryTypePoint , GeometryTypePolyline ,
  GeometryTypePolygon
}
 This enum represents the type of a given TSLMUGeometry instance. More...
 

Constructor & Destructor Documentation

◆ TSLMUPolygon() [1/2]

TSLMUPolygon::TSLMUPolygon ( const TSLvector< TSLMUCoord > * outer = NULL,
const TSLvector< const TSLvector< TSLMUCoord > * > * inners = NULL,
TSLFeatureID featureID = TSLFeatureID_Default,
const char * featureName = NULL )
protected

◆ TSLMUPolygon() [2/2]

TSLMUPolygon::TSLMUPolygon ( const TSLMUPolygon & other)
protected

◆ ~TSLMUPolygon()

virtual TSLMUPolygon::~TSLMUPolygon ( )
protectedvirtual

Member Function Documentation

◆ calculateExtent()

virtual bool TSLMUPolygon::calculateExtent ( TSLMUExtent & extent) const
virtual

Calculate the extent of this geometry

Parameters
extentWill be set to the calculated extent.
Returns
true if the extent was calculated, false otherwise.

Implements TSLMUGeometry.

◆ clone()

virtual TSLMUGeometry * TSLMUPolygon::clone ( )
virtual

Create a clone of this geometry

Returns
A clone of this geometry. This object is owned by the caller.

Implements TSLMUGeometry.

◆ create()

static TSLMUPolygon * TSLMUPolygon::create ( const TSLvector< TSLMUCoord > * outer = NULL,
const TSLvector< const TSLvector< TSLMUCoord > * > * inners = NULL,
TSLFeatureID featureID = TSLFeatureID_Default,
const char * featureName = NULL )
static

Constructor

Parameters
outerInitial outer for the polygon. TSLMUPolygon will not take ownership of this list
innersInitial inners for the polygon. TSLMUPolygon will not take ownership of this list
featureIDThe feature ID
featureNameThe feature name

◆ getInner()

TSLvector< TSLMUCoord > & TSLMUPolygon::getInner ( unsigned int index)

Query an inner

If index is >= numInners() then a new inner will be created.

The list may be modified by the application to edit the inner. No validation will be performed on these coordinates.

Parameters
indexThe index of the inner to return
Returns
A reference to the inner at index

◆ getOuter()

TSLvector< TSLMUCoord > & TSLMUPolygon::getOuter ( )

Query the outer of this polygon

This list may be modified by the application to edit the outer of this polygon. No validation will be performed on these coordinates.

Returns
A reference to this object's outer

◆ numInners()

unsigned int TSLMUPolygon::numInners ( ) const

Query the number of inners in this polygon

Returns
The number of inners

◆ setInner()

void TSLMUPolygon::setInner ( unsigned int index,
const TSLvector< TSLMUCoord > * newInner )

Set an inner of this polygon

If index is >= numInners() then a new inner will be created.

Parameters
indexThe index of the inner to return
newInnerThe new geometry for the inner, TSLMUPolygon does not take ownership of this list. If NULL the inner will be removed.

◆ setOuter()

void TSLMUPolygon::setOuter ( const TSLvector< TSLMUCoord > * newOuter)

Set the outer of this polygon

Parameters
newOuterThe new geometry for the outer. TSLMUPolygon does not take ownership of this list.