LocatorHelper(3)

NAME
LocatorHelper - Locator Helper Collection's Locators.

SYNOPSIS

  Public Member Functions
LocatorHelper (AutoContact *, unsigned int flags=0)
bool isValid () const
AutoSegment * getSegment () 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:

•   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.

Constructor & Destructor Documentation

  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:

•   The direction: Katabatic::KbHorizontal or Katabatic::KbVertical.

•   Perpandicular inclusion: Katabatic::KbWithPerpands.

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

  bool isValid () const [inline]
Returns: true if there is an AutoSegment to be processed.

  AutoSegment * getSegment () const [inline]
Returns: The current AutoSegment. NULL if the loop is over.

References AutoContact::getSegment().

  void progress () [inline]
Returns: Go to the next AutoSegment.

References AutoContact::getSegment().

Referenced by LocatorHelper::LocatorHelper().

Author

Generated automatically by Doxygen for Katabatic - Routing Toolbox from the source code.