To bypass the Ring/Hook mechanism \fIand\fP the subsequent Session::Lookup() call, the AutoSegments anchored on an \fBAutoContact\fP are cached in the \fBAutoContact\fP itself\&. They can be accessed through \fCgetHorizontalN()\fP and getVerticalN() accessors \fCN\fP depending on the subtype of \fBAutoContact\fP\&.
.PP
Cached AutoSegments are updated in the \fBAutoContact::updateTopology()\fP function only\&.
.SH"Invalidate on AutoContacts"
.PP
The invalidation of an \fBAutoContact\fP invalidate all the segments that are anchored on it\&.
.PP
\fBSpecial Case of HTee & VTee\fP
.PP
When invalidating an HTee or VTee, two out of the three anchored segments are parallels\&. The \fIaligned\fP constraint is passed on those two\&. By default, when we invalidate an \fBAutoSegment\fP, the invalidation is applied to the whole aligned set through the \fBAutoSegment::getAligneds()\fP collection\&. So if one of the parallel is invalidated and the other not, it should only be because we are already in \fCgetAligneds()\fP, then we do not want to invalidate again the whole aligned set\&. In that case, we perform an atomic only invalidation (reset \fBKatabatic::KbPropagate\fP)\&.
.PP
For the complete invalidation/revalidation mechanism see \fBSession Algorithm\fP\&.
.SH"Notes - Differences from Katabatic 2"
.PP
From the previous version of \fBKatabatic\fP, \fBAutoContact\fP have been greatly stripped down (again)\&. They are now always punctual objetcs with stricly fixed topologies:
.PD0
.IP"\(bu"2
\fBAutoContactTerminal\fP to connect to a terminal (one segment)\&.
.IP"\(bu"2
\fBAutoContactTurn\fP to make a turn: two perpandiculars segments\&.
.IP"\(bu"2
\fBAutoContactHTee\fP an horizontal tee: two \fIaligned\fP horizonals and one vertical\&.
.IP"\(bu"2
\fBAutoContactVTee\fP an horizontal tee: two \fIaligned\fP verticals and one horizontal\&.
.PP
.SH"Member Function Documentation"
.PP
.SS"\fBHook\fP * getBodyHook ()\fC [inline]\fP"
\fIBase class method proxy\&.\fP
.PP
References Component::getBodyHook()\&.
.PP
Referenced by GCellTopology::_do_xG_1Pad(), and AutoSegment::create()\&.
Referenced by AutoSegment::makeDogleg(), AutoSegment::revalidate(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology()\&.
.SS"\fBDbU::Unit\fP getX () const\fC [inline]\fP"
\fIBase class method proxy\&.\fP
.PP
References Component::getX()\&.
.PP
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_xG_xM3(), AutoSegment::create(), GCellTopology::doRp_StairCaseV(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry()\&.
.SS"\fBDbU::Unit\fP getY () const\fC [inline]\fP"
\fIBase class method proxy\&.\fP
.PP
References Component::getY()\&.
.PP
Referenced by AutoSegment::create(), GCellTopology::doRp_StairCaseH(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry()\&.
Referenced by AutoSegment::reduceDoglegLayer(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology()\&.
Referenced by AutoVertical::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry()\&.
.SS"void setY (\fBDbU::Unit\fP y)\fC [inline]\fP"
\fIBase class method proxy\&.\fP
.PP
References Contact::setY()\&.
.PP
Referenced by AutoHorizontal::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry()\&.
\fBReturns:\fP\fBtrue\fP if the \fBAutoContact\fP is still in it's initial creation stage\&.
.PP
References Katabatic::CntInCreationStage\&.
.SS"bool isInvalidated () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the some \fBAutoSegment\fP has changed and the \fBAutoContact\fP needs to be repositionned (through a call to \fBAutoContact::updateGeometry()\fP)\&.
\fBReturns:\fP\fBtrue\fP if the some \fBAutoSegment\fP has changed and the \fBAutoContact\fP topology needs to be restored, as a gap may have appeared (through a call to AutoSegment::updateTopology())\&.
.PP
References Katabatic::CntInvalidatedCache\&.
.PP
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology()\&.
.SS"bool isTurn () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the dynamic type of the \fBAutoContact\fP is of type Turn\&.
.PP
References Katabatic::CntTurn\&.
.PP
Referenced by AutoSegment::canReduce(), and AutoSegment::revalidate()\&.
.SS"bool isTee (unsigned int direction) const"
\fBReturns:\fP\fBtrue\fP if the dynamic type of the \fBAutoContact\fP is either of type \fBAutoContactHTee\fP or \fBAutoContactVTee\fP, according to \fCdirection\fP\&.
.PP
References Katabatic::KbHorizontal, and Katabatic::KbVertical\&.
.SS"bool isHTee () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the dynamic type of the \fBAutoContact\fP is of type \fBAutoContactHTee\fP\&.
.PP
References Katabatic::CntHTee\&.
.SS"bool isVTee () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the dynamic type of the \fBAutoContact\fP is of type \fBAutoContactHTee\fP\&.
.PP
References Katabatic::CntVTee\&.
.SS"bool isFixed () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the \fBAutoContact\fP cannot be moved\&.
.PP
References Katabatic::CntFixed\&.
.PP
Referenced by AutoSegment::create(), AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoContact::getCBYMax(), and AutoContact::getCBYMin()\&.
.SS"bool hasBadTopology () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if the \fBAutoContact\fP topology has been broken and a gap has appeared\&. (sould not happen\&.\&.\&.)
.PP
References Katabatic::CntBadTopology\&.
.PP
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), and AutoContactHTee::updateTopology()\&.
.SS"bool canDestroy (unsigned int flags = \fC0\fP) const"
\fBReturns:\fP\fBtrue\fP if the \fBAutoContact\fP could be destroyed, that is, no segments remains anchored on it\&. If \fCflags\fP contains \fBKatabatic::KbWarnOnError\fP, issue an error message\&.
\fBReturns:\fP The other \fBAutoSegment\fP the \fIsame\fP direction as \fCreference\fP, this is only meaningful on \fBAutoContactHTee\fP or \fBAutoContactVTee\fP\&. If there is no opposite, \fCNULL\fP is returned\&.
.PP
Implemented in \fBAutoContactTerminal\fP, \fBAutoContactHTee\fP, \fBAutoContactTurn\fP, and \fBAutoContactVTee\fP\&.
\fBReturns:\fP The \fBAutoSegment\fP in the \fIperpandicular\fP direction to \fCreference\fP, this is only meaningful on AutoContacTurn\&. It there is no unique perpandicular, \fCNULL\fP is returned\&.
.PP
Implemented in \fBAutoContactTerminal\fP, \fBAutoContactHTee\fP, \fBAutoContactTurn\fP, and \fBAutoContactVTee\fP\&.
.PP
Referenced by AutoSegment::raise(), AutoSegment::reduce(), and AutoSegment::revalidate()\&.
.SS"\fBAutoSegment\fP * getSegment (unsigned int index) const\fC [pure virtual]\fP"
\fBReturns:\fP The nth anchored \fBAutoSegment\fP\&. The index is significant:
.IP"\(bu"2
\fB0\fP : first horizontal (\fBh1\fP)\&.
.IP"\(bu"2
\fB1\fP : second horizontal (\fBh2\fP)\&.
.IP"\(bu"2
\fB2\fP : first vertical (\fBb1\fP)\&.
.IP"\(bu"2
\fB3\fP : second vertical (\fBb2\fP)\&.
.PP
.PP
Not all the indexes are filled for every \fBAutoContact\fP\&. For example \fCTurn\fP have \fBh1\fP and \fBb1\fP, and \fCHTee\fP have \fBh1\fP, \fBh2\fP and \fBv1\fP\&.
.PP
Implemented in \fBAutoContactTerminal\fP, \fBAutoContactHTee\fP, \fBAutoContactTurn\fP, and \fBAutoContactVTee\fP\&.
.PP
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()\&.
.SS"unsigned int getMinDepth () const"
\fBReturns:\fP The layer depth of the bottom layer of the \fBAutoContact\fP\&.
.PP
References Component::getLayer()\&.
.PP
Referenced by AutoSegment::canPivotUp()\&.
.SS"unsigned int getMaxDepth () const"
\fBReturns:\fP The layer depth of the top layer of the \fBAutoContact\fP\&.
\fIlengths\fP A table of \fBDbU::Unit\fP, the size of all routing layers used\&.
.br
\fIprocesseds\fP An \fBAutoSegment\fP sorted set holding all the already processeds AutoSegments\&.
.RE
.PP
Compute the lengths over the owning \fBGCell\fP of all the AutoSegments anchored on this \fBAutoContact\fP\&. The lengths are added to the total length table \fClengths\fP\&. To avoid double accounting of the local AutoSegments that have both source & target in the same \fBGCell\fP, we keep a set of already processeds AutoSegments in \fCprocesseds\fP\&.
.PP
References Katabatic::KbHorizontal, Katabatic::KbVertical, and toLambda()\&.
\fBReturns:\fP The native constraint box (that is, whithout any user constraints applied)\&. For \fBAutoContactTerminal\fP, this is the Box of the supporting external component, and for all others the bounding box of the owning \fBGCell\fP\&.
.PP
Reimplemented in \fBAutoContactTerminal\fP\&.
.SS"\fBInterval\fP getUConstraints (unsigned int direction) const"
\fBReturns:\fP The constraint interval in \fCdirection\fP (that is, the relevant side of the constraint box)\&.
.PP
References Interval::inflate(), and Katabatic::KbHorizontal\&.
.PP
Referenced by AutoContactTerminal::updateGeometry()\&.
\fBReturns:\fP The intersection between \fCbox\fP and the constraint box\&. The result is stored into \fCbox\fP and a reference to it is returned\&.
.PP
References Box::getIntersection()\&.
.SS"void invalidate (unsigned int flags = \fC0\fP)"
Invalidate the \fBAutoContact\fP, schedule it for revalidation in the \fBSession\fP\&. If flag containt Katabatic::CntInvalidTopology, the topology of the \fBAutoContact\fP will also be checked and possible gap closeds\&.
.PP
The revalidations methods associated are:
.IP"\(bu"2
AutoSegment::updateGeometry(), recompute the punctual contact position\&.
.IP"\(bu"2
AutoSegment::updateTopology(), restore the connexity\&.
.PP
.PP
References Katabatic::CntInvalidated, and Katabatic::CntInvalidatedCache\&.
.PP
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::AutoSegment()\&.
.SS"void updateGeometry ()\fC [pure virtual]\fP"
Compute the new position of the \fBAutoContact\fP based on the \fBAutoSegment\fP positions\&. The \fBSession\fP mechanism ensure that all \fBAutoSegment\fP are set into their final positions before calling this updator\&.
.PP
Implemented in \fBAutoContactTerminal\fP, \fBAutoContactHTee\fP, \fBAutoContactTurn\fP, and \fBAutoContactVTee\fP\&.
.SS"void updateTopology ()\fC [pure virtual]\fP"
Modificate the \fBAutoContact\fP topology to close any gap\&. This could be by changing layer or creating a new dogleg on an incident \fBAutoSegment\fP\&.
.PP
Implemented in \fBAutoContactTerminal\fP, \fBAutoContactHTee\fP, \fBAutoContactTurn\fP, and \fBAutoContactVTee\fP\&.
Comprensive display of the topology of the \fBAutoContact\fP to ease the debug work\&. Prepend with the error message \fCmessage\fP\&. Do no throw an error\&.
.PP
References AutoSegment::isGlobal()\&.
.PP
Referenced by AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology()\&.
.SS"void checkTopology ()\fC [virtual]\fP"
Check for topology correctness (no gaps), display an error message if needed\&.
.SS"void setGCell (\fBGCell\fP * gcell)"
Set the owning \fBGCell\fP\&.
.PP
References GCell::addContact(), and toLambda()\&.
.PP
Referenced by AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight()\&.
\fImin\fP The minimum of the restriction interval\&.
.br
\fImax\fP The maximum of the restriction interval\&.
.br
\fIflags\fP Gives the direction of the restriction\&.
.RE
.PP
\fBReturns:\fP
.RS4
\fBtrue\fP if the restriction was actually applied\&.
.RE
.PP
Restrict the current constraint box but check if the restriction will not lead to an empty interval, in that case, do nothing and return \fBfalse\fP\&.
.PP
References Katabatic::KbHorizontal, Katabatic::KbVertical, Katabatic::KbWarnOnError, and toLambda()\&.
Transfer the user constraint box from \fCother\fP to the current object \fCthis\fP\&. The constraints of \fCother\fP are restored to their native values\&. The two contacts must belong to the same \fBGCell\fP for this method to take effect\&.
.PP
References AutoContact::getConstraintBox()\&.
.PP
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg()\&.