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

Detailed Description

This class encapsulates the notion of a generic Link object that links two Node objects together in a TSLNetwork object.

Clients can add TSLDynamicDataObjects should they require object visualisation.

Public Member Functions

 TSLLink ()
 TSLLink (const TSLLink &rhs)
 ~TSLLink ()
TSLLinkoperator= (const TSLLink &rhs)
const TSLVariantattribute (int N) const
void ddo (TSLDynamicDataObject *dataObj)
TSLDynamicDataObjectddo () const
void featureCode (int fc)
int featureCode () const
const TSLVariantgetAttributes () const
TSLCoordSetgetPoints () const
void length (float len)
float length () const
int numAttributes () const
int numPoints () const
TSLCoord point (int N) const
void setAttributes (const TSLVariant attribs[], int N)
void setPoints (const TSLCoordSet *pts)

Static Public Member Functions

static unsigned int getScale ()
static void setScale (unsigned int s)

Constructor & Destructor Documentation

◆ TSLLink() [1/2]

TSLLink::TSLLink ( )

The default constructor.

◆ TSLLink() [2/2]

TSLLink::TSLLink ( const TSLLink & rhs)

Copy constructor.

◆ ~TSLLink()

TSLLink::~TSLLink ( )

Destructor.

Member Function Documentation

◆ attribute()

const TSLVariant & TSLLink::attribute ( int N) const

Queries the link for the attribute at the specified index.

Parameters
NThe index position.
Returns
a const-reference to the attribute at the specified index.

◆ ddo() [1/2]

TSLDynamicDataObject * TSLLink::ddo ( ) const
inline

Queries the link for its associated TSLDynamicDataObject.

Returns a pointer to the associated TSLDynamicDataObject.

◆ ddo() [2/2]

void TSLLink::ddo ( TSLDynamicDataObject * dataObj)

Sets the associated TSLDynamicDataObject.

Parameters
dataObjA pointer to the TSLDynamicDataObject.

◆ featureCode() [1/2]

int TSLLink::featureCode ( ) const
inline

Queries the link for its feature code.

Returns the feature code.

◆ featureCode() [2/2]

void TSLLink::featureCode ( int fc)

Sets the feature code.

Parameters
fcThe feature code.

◆ getAttributes()

const TSLVariant * TSLLink::getAttributes ( ) const
inline

Queries the link for its attributes.

◆ getPoints()

TSLCoordSet * TSLLink::getPoints ( ) const

Queries the link for its points.

Returns a TSLCoordSet* that references the points.

NOTE: the user is responsible for destroying the returned pointer.

◆ getScale()

unsigned int TSLLink::getScale ( )
inlinestatic

Returns the TSLLink class geometry scaling factor.

◆ length() [1/2]

float TSLLink::length ( ) const
inline

Returns the length of this link (m).

Note: For networks created from OS ITN data the length returned is in TMCs. To obtain metres, the TMC length value requires dividing by the TMC per Map Unit value used to create the network.

◆ length() [2/2]

void TSLLink::length ( float len)

Sets the length.

Parameters
lenThe length of the link (m).

◆ numAttributes()

int TSLLink::numAttributes ( ) const

Returns the number of attributes of this link.

◆ numPoints()

int TSLLink::numPoints ( ) const

Returns the number of points describing the geometry of this link.

◆ operator=()

TSLLink & TSLLink::operator= ( const TSLLink & rhs)

Assignment operator.

◆ point()

TSLCoord TSLLink::point ( int N) const

Queries the link for the point at the specified index.

Parameters
NThe index position.
Returns
the point (as a TSLCoord) at the specified index.

◆ setAttributes()

void TSLLink::setAttributes ( const TSLVariant attribs[],
int N )

Sets the links' attributes.

Parameters
attribsThe array of attributes.
NThe size of the array.

◆ setPoints()

void TSLLink::setPoints ( const TSLCoordSet * pts)

Sets the links' geometry.

Parameters
ptsThe array of points.

◆ setScale()

void TSLLink::setScale ( unsigned int s)
static

Set the geometry scale factor for the TSLLink class.

Parameters
sThe scale factor.