MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLLinkCmp Class Referenceabstract

Detailed Description

Base class for link comparator objects.

When clients wish to join two tiled networks together, they must provide a comparator object which defines both a sort order (through operator()), an is Equal() method which returns true when two links are the same and a make() method. The make() method is used to construct a link from segments which cross tile boundaries.

For example:

class MyLinkCmp : public TSLLinkCmp { virtual bool operator()(const TSLLink& link1, const TSLLink& link2) const { // Do whatever is appropriate return ???; } };

Public Member Functions

 TSLLinkCmp ()
 
virtual ~TSLLinkCmp ()
 
virtual bool operator() (const TSLLink &link1, const TSLLink &link2) const =0
 
virtual bool isEqual (const TSLLink &link1, const TSLLink &link2) const =0
 
virtual TSLLink make (const TSLLink *linkSegments[], int N) const =0
 

Constructor & Destructor Documentation

◆ TSLLinkCmp()

TSLLinkCmp::TSLLinkCmp ( )
inline

Default constructor.

◆ ~TSLLinkCmp()

virtual TSLLinkCmp::~TSLLinkCmp ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ isEqual()

virtual bool TSLLinkCmp::isEqual ( const TSLLink & link1,
const TSLLink & link2 ) const
pure virtual

Compares two links.

Parameters
link1,link2The two links.
Returns
true if link1 == link2, false otherwise.

◆ make()

virtual TSLLink TSLLinkCmp::make ( const TSLLink * linkSegments[],
int N ) const
pure virtual

Create one TSLLink object from the supplied TSLLink segments.

Parameters
linkSegmentsAn array of pointers to TSLLink segments.
NThe number of segments.
Returns
the composite Link object.

◆ operator()()

virtual bool TSLLinkCmp::operator() ( const TSLLink & link1,
const TSLLink & link2 ) const
pure virtual

Compares two links.

Parameters
link1,link2The two nodes.
Returns
true if link1 < link2, false otherwise.