Katabatic - Routing Toolbox


List of all members | Public Member Functions
LocatorHelper Class Reference

Locator Helper Collection's Locators. More...

Public Member Functions

 LocatorHelper (AutoContact *, unsigned int flags=0)
 
bool isValid () const
 
AutoSegmentgetSegment () const
 
void progress ()
 

Detailed Description

Locator Helper Collection's Locators.

Provide a small uniform walktough over the AutoSegments anchored on AutoContacts. The flags argument allows to choose between direction and include perpandiculars (in that case all segments are processeds).

Implementation Details

As, at most, two horizontals and two verticals may be anchored on any AutoContact subtype, the locator helper perform a walk through a virtual table of 4 elements. The two first are the horizontals, the two last the verticals. The meaning of this index is consistent whith the index argument of AutoContact::getSegment(). When a segment is not present in an AutoContact, the getSegment() returns NULL and the LocatorHelper::progress() function will skip it.

The private methods:

Computes the bounds of _index according to the value of _flags:

Constructor & Destructor Documentation

◆ LocatorHelper()

LocatorHelper ( AutoContact contact,
unsigned int  flags = 0 
)
inline

Create a helper to iterate over the AutoSegments anchored on contact. The flags arguments allow to select:

When setting KbWithPerpands, all the segments will be iterated over. It may seems a somewhat contorted way of doing things, the reason is the ability to share (an pass) flags directly between different functions.

References AutoContact::getSegment(), and LocatorHelper::progress().

Member Function Documentation

◆ isValid()

bool isValid ( ) const
inline

Returns: true if there is an AutoSegment to be processed.

◆ getSegment()

AutoSegment * getSegment ( ) const
inline

Returns: The current AutoSegment. NULL if the loop is over.

References AutoContact::getSegment().

◆ progress()

void progress ( )
inline

Returns: Go to the next AutoSegment.

References AutoContact::getSegment().

Referenced by LocatorHelper::LocatorHelper().


The documentation for this class was generated from the following files:


Generated by doxygen 1.8.14 on Sun Nov 21 2021 Return to top of page
Katabatic - Routing Toolbox Copyright © 2008-2020 Sorbonne Universite. All rights reserved