AutoContact(3)

NAME
AutoContact - Abstract base class for AutoContact.

SYNOPSIS

Inherited by AutoContactHTee, AutoContactTerminal, AutoContactTurn, and AutoContactVTee.

  Public Member Functions
Hook * getBodyHook ()
Hook * getAnchorHook ()
Component * getAnchor () const
Net * getNet () const
const Layer * getLayer () const
DbU::Unit getX () const
DbU::Unit getY () const
DbU::Unit getDx () const
DbU::Unit getDy () const
Point getCenter () const
Point getPosition () const
DbU::Unit getWidth () const
DbU::Unit getHalfWidth () const
DbU::Unit getHeight () const
DbU::Unit getHalfHeight () const
Components getSlaveComponents () const
void setLayer (const Layer *)
void setWidth (DbU::Unit)
void setHeight (DbU::Unit)
void setSizes (DbU::Unit width, DbU::Unit height)
void setX (DbU::Unit)
void setY (DbU::Unit)
void setPosition (DbU::Unit width, DbU::Unit height)
void setPosition (const Point &)
void setDx (DbU::Unit)
void setDy (DbU::Unit)
void setOffset (DbU::Unit dx, DbU::Unit dy)
virtual void translate (const DbU::Unit &tx, const DbU::Unit &ty)
bool isInCreationStage () const
bool isInvalidated () const
bool isInvalidatedCache () const
bool isTurn () const
bool isTee (unsigned int direction) const
bool isHTee () const
bool isVTee () const
bool isFixed () const
bool hasBadTopology () const
bool canDestroy (unsigned int flags=0) const
bool canMoveUp (const AutoSegment *moved) const
Contact * base () const
virtual const Name & getName () const
size_t getId () const
virtual Box getBoundingBox () const
GCell * getGCell () const
virtual AutoSegment * getOpposite (const AutoSegment *) const =0
virtual AutoSegment * getPerpandicular (const AutoSegment *) const =0
virtual AutoSegment * getSegment (unsigned int) const =0
unsigned int getMinDepth () const
unsigned int getMaxDepth () const
void getLengths (DbU::Unit *lengths, AutoSegment::DepthLengthSet &)
virtual Box getNativeConstraintBox () const
Interval getUConstraints (unsigned int direction) const
DbU::Unit getCBXMin () const
DbU::Unit getCBXMax () const
DbU::Unit getCBYMin () const
DbU::Unit getCBYMax () const
Box getConstraintBox () const
Box & intersectConstraintBox (Box &box) const
void invalidate (unsigned int flags=0)
virtual void updateGeometry ()=0
virtual void updateTopology ()=0
void showTopologyError (const std::string &, unsigned int flags=0)
virtual void checkTopology ()
void setGCell (GCell *)
void setCBXMin (DbU::Unit xMin)
void setCBXMax (DbU::Unit xMax)
void setCBYMin (DbU::Unit yMin)
void setCBYMax (DbU::Unit yMax)
void setConstraintBox (const Box &box)
bool restrictConstraintBox (DbU::Unit constraintMin, DbU::Unit constraintMax, unsigned int flags=KbWarnOnError)
void migrateConstraintBox (AutoContact *other)

  Static Public Member Functions
static size_t getAllocateds ()
static const Name & getStaticName ()

  Static Protected Member Functions
static void _getTopology (Contact *, Component *&anchor, Horizontal **&, Vertical **&, size_t)

Detailed Description

Abstract base class for AutoContact.

Caching Mechanism

To bypass the Ring/Hook mechanism and the subsequent Session::Lookup() call, the AutoSegments anchored on an AutoContact are cached in the AutoContact itself. They can be accessed through getHorizontalN() and getVerticalN() accessors N depending on the subtype of AutoContact.

Cached AutoSegments are updated in the AutoContact::updateTopology() function only.

Invalidate on AutoContacts

The invalidation of an AutoContact invalidate all the segments that are anchored on it.

Special Case of HTee & VTee

When invalidating an HTee or VTee, two out of the three anchored segments are parallels. The aligned constraint is passed on those two. By default, when we invalidate an AutoSegment, the invalidation is applied to the whole aligned set through the AutoSegment::getAligneds() collection. So if one of the parallel is invalidated and the other not, it should only be because we are already in getAligneds(), then we do not want to invalidate again the whole aligned set. In that case, we perform an atomic only invalidation (reset Katabatic::KbPropagate).

For the complete invalidation/revalidation mechanism see Session Algorithm.

Notes - Differences from Katabatic 2

From the previous version of Katabatic, AutoContact have been greatly stripped down (again). They are now always punctual objetcs with stricly fixed topologies:
•   AutoContactTerminal to connect to a terminal (one segment).
•   AutoContactTurn to make a turn: two perpandiculars segments.
•   AutoContactHTee an horizontal tee: two aligned horizonals and one vertical.
•   AutoContactVTee an horizontal tee: two aligned verticals and one horizontal.

Member Function Documentation

  Hook * getBodyHook () [inline]
Base class method proxy.
References Component::getBodyHook().
Referenced by GCellTopology::_do_xG_1Pad(), and AutoSegment::create().

  Hook * getAnchorHook () [inline]
Base class method proxy.
References Contact::getAnchorHook().

  Component * getAnchor () const [inline]
Base class method proxy.
References Contact::getAnchor().
Referenced by AutoContactTerminal::getNativeConstraintBox(), and AutoContactTerminal::updateTopology().

  Net * getNet () const [inline]
Base class method proxy.
References Component::getNet().
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

  const Layer * getLayer () const [inline]
Base class method proxy.
References Component::getLayer().
Referenced by AutoSegment::makeDogleg(), AutoSegment::revalidate(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

  DbU::Unit getX () const [inline]
Base class method proxy.
References Component::getX().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_xG_xM3(), AutoSegment::create(), GCellTopology::doRp_StairCaseV(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry().

  DbU::Unit getY () const [inline]
Base class method proxy.
References Component::getY().
Referenced by AutoSegment::create(), GCellTopology::doRp_StairCaseH(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry().

  DbU::Unit getDx () const [inline]
Base class method proxy.
References Contact::getDx().

  DbU::Unit getDy () const [inline]
Base class method proxy.
References Contact::getDy().

  Point getCenter () const [inline]
Base class method proxy.

  Point getPosition () const [inline]
Base class method proxy.
References Component::getPosition().

  DbU::Unit getWidth () const [inline]
Base class method proxy.
References Contact::getWidth().

  DbU::Unit getHalfWidth () const [inline]
Base class method proxy.
References Contact::getHalfWidth().

  DbU::Unit getHeight () const [inline]
Base class method proxy.
References Contact::getHeight().

  DbU::Unit getHalfHeight () const [inline]
Base class method proxy.
References Contact::getHalfHeight().

  Components getSlaveComponents () const [inline]
Base class method proxy.
References Component::getSlaveComponents().

  void setLayer (const Layer * layer) [inline]
Base class method proxy.
References Contact::setLayer().
Referenced by AutoSegment::reduceDoglegLayer(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

  void setWidth (DbU::Unit w) [inline]
Base class method proxy.
References Contact::setWidth().

  void setHeight (DbU::Unit h) [inline]
Base class method proxy.
References Contact::setHeight().

  void setSizes (DbU::Unit w, DbU::Unit h) [inline]
Base class method proxy.
References Contact::setSizes().

  void setX (DbU::Unit x) [inline]
Base class method proxy.
References Contact::setX().
Referenced by AutoVertical::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().

  void setY (DbU::Unit y) [inline]
Base class method proxy.
References Contact::setY().
Referenced by AutoHorizontal::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().

  void setPosition (DbU::Unit w, DbU::Unit h) [inline]
Base class method proxy.
References Contact::setPosition().

  void setPosition (const Point & p) [inline]
Base class method proxy.
References Contact::setPosition().

  void setDx (DbU::Unit dx) [inline]
Base class method proxy.
References Contact::setDx().

  void setDy (DbU::Unit dy) [inline]
Base class method proxy.
References Contact::setDy().

  void setOffset (DbU::Unit w, DbU::Unit h) [inline]
Base class method proxy.
References Contact::setOffset().

  void translate (const DbU::Unit & dx, const DbU::Unit & dy) [virtual]
Base class method proxy.

  bool isInCreationStage () const [inline]
Returns: true if the AutoContact is still in it's initial creation stage.
References Katabatic::CntInCreationStage.

  bool isInvalidated () const [inline]
Returns: true if the some AutoSegment has changed and the AutoContact needs to be repositionned (through a call to AutoContact::updateGeometry()).
References Katabatic::CntInvalidated.

  bool isInvalidatedCache () const [inline]
Returns: true if the some AutoSegment has changed and the AutoContact topology needs to be restored, as a gap may have appeared (through a call to AutoSegment::updateTopology()).
References Katabatic::CntInvalidatedCache.
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

  bool isTurn () const [inline]
Returns: true if the dynamic type of the AutoContact is of type Turn.
References Katabatic::CntTurn.
Referenced by AutoSegment::canReduce(), and AutoSegment::revalidate().

  bool isTee (unsigned int direction) const
Returns: true if the dynamic type of the AutoContact is either of type AutoContactHTee or AutoContactVTee, according to direction.
References Katabatic::KbHorizontal, and Katabatic::KbVertical.

  bool isHTee () const [inline]
Returns: true if the dynamic type of the AutoContact is of type AutoContactHTee.
References Katabatic::CntHTee.

  bool isVTee () const [inline]
Returns: true if the dynamic type of the AutoContact is of type AutoContactHTee.
References Katabatic::CntVTee.

  bool isFixed () const [inline]
Returns: true if the AutoContact cannot be moved.
References Katabatic::CntFixed.
Referenced by AutoSegment::create(), AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoContact::getCBYMax(), and AutoContact::getCBYMin().

  bool hasBadTopology () const [inline]
Returns: true if the AutoContact topology has been broken and a gap has appeared. (sould not happen...)
References Katabatic::CntBadTopology.
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), and AutoContactHTee::updateTopology().

  bool canDestroy (unsigned int flags = 0) const
Returns: true if the AutoContact could be destroyed, that is, no segments remains anchored on it. If flags contains Katabatic::KbWarnOnError, issue an error message.
References Katabatic::KbWarnOnError.

  bool canMoveUp (const AutoSegment * moved) const
Returns: true if segment can be moved up without triggering a topological modification. It meaans that:
•   Without moved, the AutoContact needs only one layer.
•   moved go from below the AutoContact to above.
References Component::getLayer(), AutoSegment::getLayer(), and RoutingGauge::getLayerDepth().

  Contact * base () const [inline]
Returns: The Hurricane::Contact which is decorated.
Referenced by AutoVertical::_makeDogleg(), AutoSegment::create(), AutoSegment::getOppositeAnchor(), GCell::removeContact(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().

  size_t getAllocateds () [static]
Returns: The total number of AutoContact currently allocateds.

  const Name & getStaticName () [static]
Returns: The name of the Hurricane::ExtensionGo slice.

  const Name & getName () const [virtual]
Returns: The name of the Hurricane::ExtensionGo slice.

  const Name & getId () const [inline]
Returns: The unique identifer of the AutoSegment.

  Box getBoundingBox () const [virtual]
See also:
    Contact::getBoundingBox().

  GCell * getGCell () const [inline]
Returns: The GCell into which the AutoContact is located.
Referenced by AutoHorizontal::_canSlacken(), AutoVertical::_canSlacken(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), AutoHorizontal::_preDestroy(), AutoVertical::_preDestroy(), AutoSegment::AutoSegment(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoHorizontal::getGCells(), AutoVertical::getGCells(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), and AutoSegment::toConstraintAxis().

  AutoSegment * getOpposite (const AutoSegment * reference) const [pure virtual]
Returns: The other AutoSegment the same direction as reference, this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL is returned.
Implemented in AutoContactTerminal, AutoContactHTee, AutoContactTurn, and AutoContactVTee.

  AutoSegment * getPerpandicular (const AutoSegment * reference) const [pure virtual]
Returns: The AutoSegment in the perpandicular direction to reference, this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL is returned.
Implemented in AutoContactTerminal, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
Referenced by AutoSegment::raise(), AutoSegment::reduce(), and AutoSegment::revalidate().

  AutoSegment * getSegment (unsigned int index) const [pure virtual]
Returns: The nth anchored AutoSegment. The index is significant:
•   0 : first horizontal (h1).
•   1 : second horizontal (h2).
•   2 : first vertical (b1).
•   3 : second vertical (b2).
Not all the indexes are filled for every AutoContact. For example Turn have h1 and b1, and HTee have h1, h2 and v1.
Implemented in AutoContactTerminal, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
Referenced by AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), LocatorHelper::getSegment(), LocatorHelper::LocatorHelper(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), and LocatorHelper::progress().

  unsigned int getMinDepth () const
Returns: The layer depth of the bottom layer of the AutoContact.
References Component::getLayer().
Referenced by AutoSegment::canPivotUp().

  unsigned int getMaxDepth () const
Returns: The layer depth of the top layer of the AutoContact.
References Component::getLayer().
Referenced by AutoSegment::canPivotDown().

  void getLengths (DbU::Unit * lengths, AutoSegment::DepthLengthSet & processeds)
Parameters:
    lengths A table of DbU::Unit, the size of all routing layers used.
    processeds An AutoSegment sorted set holding all the already processeds AutoSegments.
Compute the lengths over the owning GCell of all the AutoSegments anchored on this AutoContact. The lengths are added to the total length table lengths. To avoid double accounting of the local AutoSegments that have both source & target in the same GCell, we keep a set of already processeds AutoSegments in processeds.
References Katabatic::KbHorizontal, Katabatic::KbVertical, and toLambda().

  Box getNativeConstraintBox () const [virtual]
Returns: The native constraint box (that is, whithout any user constraints applied). For AutoContactTerminal, this is the Box of the supporting external component, and for all others the bounding box of the owning GCell.
Reimplemented in AutoContactTerminal.

  Interval getUConstraints (unsigned int direction) const
Returns: The constraint interval in direction (that is, the relevant side of the constraint box).
References Interval::inflate(), and Katabatic::KbHorizontal.
Referenced by AutoContactTerminal::updateGeometry().

  DbU::Unit getCBXMin () const [inline]
Returns: The X coordinate of the bottom left corner of the constraint box.
References DbU::fromLambda(), Component::getX(), GCell::getX(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoVertical::getConstraints().

  DbU::Unit getCBXMax () const [inline]
Returns: The X coordinate of the top right corner of the constraint box.
References DbU::fromLambda(), Component::getX(), GCell::getX(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoVertical::getConstraints().

  DbU::Unit getCBYMin () const [inline]
Returns: The Y coordinate of the bottom left corner of the constraint box.
References DbU::fromLambda(), Component::getY(), GCell::getY(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoHorizontal::getConstraints().

  DbU::Unit getCBYMax () const [inline]
Returns: The Y coordinate of the top right corner of the constraint box.
References DbU::fromLambda(), Component::getY(), GCell::getY(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoHorizontal::getConstraints().

  Box getConstraintBox () const [inline]
Returns: The current constraint box: the native constraint box with all the user's contraints applieds.
References AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoContact::getCBYMax(), and AutoContact::getCBYMin().
Referenced by AutoSegment::computeOptimal(), and AutoContact::migrateConstraintBox().

  Box & intersectConstraintBox (Box & box) const
Returns: The intersection between box and the constraint box. The result is stored into box and a reference to it is returned.
References Box::getIntersection().

  void invalidate (unsigned int flags = 0)
Invalidate the AutoContact, schedule it for revalidation in the Session. If flag containt Katabatic::CntInvalidTopology, the topology of the AutoContact will also be checked and possible gap closeds.
The revalidations methods associated are:
•   AutoSegment::updateGeometry(), recompute the punctual contact position.
•   AutoSegment::updateTopology(), restore the connexity.
References Katabatic::CntInvalidated, and Katabatic::CntInvalidatedCache.
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::AutoSegment().

  void updateGeometry () [pure virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator.
Implemented in AutoContactTerminal, AutoContactHTee, AutoContactTurn, and AutoContactVTee.

  void updateTopology () [pure virtual]
Modificate the AutoContact topology to close any gap. This could be by changing layer or creating a new dogleg on an incident AutoSegment.
Implemented in AutoContactTerminal, AutoContactHTee, AutoContactTurn, and AutoContactVTee.

  void showTopologyError (const std::string & message, unsigned int flags = 0)
Comprensive display of the topology of the AutoContact to ease the debug work. Prepend with the error message message. Do no throw an error.
References AutoSegment::isGlobal().
Referenced by AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().

  void checkTopology () [virtual]
Check for topology correctness (no gaps), display an error message if needed.

  void setGCell (GCell * gcell)
Set the owning GCell.
References GCell::addContact(), and toLambda().
Referenced by AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().

  void setCBXMin (DbU::Unit xMin) [inline]
Set the lower left X coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box.
References GCell::getX().

  void setCBXMax (DbU::Unit xMax) [inline]
Set the upper right X coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box.
References GCell::getX(), and GCell::getXMax().

  void setCBYMin (DbU::Unit yMin) [inline]
Set the lower left Y coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box.
References GCell::getY().

  void setCBYMax (DbU::Unit yMax) [inline]
Set the upper right Y coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box.
References GCell::getY(), and GCell::getYMax().

  void setConstraintBox (const Box & box)
Set the constraint box.
Remark: It cannot go outside the GCell bounding box.
References Box::getXMax(), Box::getXMin(), Box::getYMax(), and Box::getYMin().

  bool restrictConstraintBox (DbU::Unit min, DbU::Unit max, unsigned int flags = KbWarnOnError)
Parameters:
    min The minimum of the restriction interval.
    max The maximum of the restriction interval.
    flags Gives the direction of the restriction.
Returns:
    true if the restriction was actually applied.
Restrict the current constraint box but check if the restriction will not lead to an empty interval, in that case, do nothing and return false.
References Katabatic::KbHorizontal, Katabatic::KbVertical, Katabatic::KbWarnOnError, and toLambda().

  void migrateConstraintBox (AutoContact * other)
Transfer the user constraint box from other to the current object this. The constraints of other are restored to their native values. The two contacts must belong to the same GCell for this method to take effect.
References AutoContact::getConstraintBox().
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().

  void _getTopology (Contact * support, Component *& anchor, Horizontal **& horizontals, Vertical **& verticals, size_t size) [static], [protected]
Parameters:
    anchor The anchor, if any.
    hs The Hurricane::Horizontal anchored.
    vs The Hurricane::Vertical anchored.
    sz The size of boths hs & vs table passed as arguments.
Fill anchor , hs and vs with the components anchored on this AutoContact.
References Contact::getAnchor(), and Component::getSlaveComponents().

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