Locator Helper Collection's Locators. More...
Public Member Functions | |
LocatorHelper (AutoContact *, unsigned int flags=0) | |
bool | isValid () const |
AutoSegment * | getSegment () const |
void | progress () |
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).
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:
LocatorHelper::_min()
LocatorHelper::_max()
Computes the bounds of _index
according to the value of _flags:
KbHorizontal
: 0
to less than 2
.KbVertical
: 2
to less than 4
.KbHorizontal|KbVertical
: 0
to less than 4
.
|
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().
|
inline |
Returns: true if there is an AutoSegment to be processed.
|
inline |
Returns: The current AutoSegment. NULL
if the loop is over.
References AutoContact::getSegment().
|
inline |
Returns: Go to the next AutoSegment.
References AutoContact::getSegment().
Referenced by LocatorHelper::LocatorHelper().
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 |