\fBSession\fP extend the Katabatic update session to the \fBKite\fP router level\&. Mainly by managing \fBTrack\fP update\&.
.PP
\fBDifference between \fBKite\fP & Katabatic sessions:\fP
.IP"\(bu"2
In Katabatic, segments are actually moved \fIbefore\fP the revalidation, then \fIduring\fP the revalidation, contacts and topologies are adjusteds
.IP"\(bu"2
In \fBKite\fP, nothing is moved until the revalidation\&. Requests for segment displacement are queued for the session\&.
.PP
.PP
\fBAsymmetry between invalidation & revalidation:\fP
.IP"\(bu"2
When a \fBTrackSegment\fP (or directly an AutoSegment) is invalidated both associated AutoSegment and \fBTrackSegment\fP are invalidated (through the Observer mechanism)\&.
.IP"\(bu"2
When an AutoSegment is revalidated, the \fBTrackSegment\fP is \fBnot\fP immediatly revalidated\&. See the revalidate algorithm for more details\&.
.PP
.PP
\fBIndirect \fBTrackSegment\fP invalidation:\fP
.IP"\(bu"2
\fBTrackSegment\fP invalidation do not result only from direct insertion in \fBTrack\fP\&. For example, any or all of it's perpandicular can be invalidated trough the \fBKatabatic::Session\fP update (the perpandicular \fBKatabatic::AutoSegment\fP is revalidated, generating invalidation on their associated \fBTrackSegment\fP)\&.
.PP
.PP
For details on how Katabatic Sessions works, have a look to \fBKatabatic::Session\fP\&.
.SH"The Session Mechanism\&."
.PP
Delayed modification procedure :
.IP"\(bu"2
Modifications events are recorded (queued) into the \fBSession\fP\&. At this step, no modification are actually done, the data-base retains it's previous state and coherency\&.
.IP"\(bu"2
The \fC\fBrevalidate()\fP\fP procedure is called (or the \fBSession\fP is closed), then all the modification events are applied\&. The data-base is in now in it's new state\&.
.PP
.SH"The Revalidate Algorithm\&."
.PP
Revalidation steps :
.IP"\(bu"2
Process all remove events\&. detach \fBTrackSegment\fP from their \fBTrack\fP, but do not remove the pointer from the internal \fCvector\fP\&.
.IP"\(bu"2
Pack all \fBTrack\fP in which removal have took place\&.
.IP"\(bu"2
Process all insert events\&. \fBThis is the time \fBTrackSegment\fP are moved into their new \fBTrack\fP (physical displacement)\fP\&. It is at this point that the invalidation of both AutoSegment and \fBTrackSegment\fP is done\&.
.IP"\(bu"2
Call the \fBKatabatic::Session::revalidate()\fP method which will recompute the correct contact extensions and topologies\&. \fIAfter\fP this step the Katabatic data-base is up to date, but \fInot\fP the \fBKite\fP one\&. AutoSegment are revalidated\&.
.IP"\(bu"2
Recompute the canonical position of source and target of all invalidateds \fBTrackSegment\fP (take account of extention modifications)\&. The set of invalidated \fBTrackSegment\fP is computed from the revalidated AutoSegment, that is AutoSegment that are canonical\&.
.IP"\(bu"2
Perform a sort() on all \fBTrack\fP that have been modifieds\&.
.IP"\(bu"2
Now that the size of the segments have been accurately computed, look for revalidateds \fBTrackSegment\fP that:
.IP" 1."6
Can be reduced, generate a track remove event\&.
.IP" 2."6
Must be raised, generate a routing event (put into the queue)\&.
.PP
.IP"\(bu"2
Process the additional track remove events\&.
.PP
.PP
\fBNote:\fP We cannot use the Observer mechanism to automatically update \fBTrackSegment\fP from an AutoSegment, because we must wait for all AutoSegments (canonical or not) involved into the \fBTrackSegment\fP to be up to date before we can update it\&.
.PP
\fBNote:\fP Have to talk about the special case when new canonical AutoSegment appears after dogleg creation\&.
.SH"The Lookup Mechanism"
.PP
There are two lookup mechanisms:
.IP"\(bu"2
From a \fBHurricane::Segment\fP, we uses the Katabatic segment lookup table (slow, stored in a \fCmap<>\fP)\&.
.IP"\(bu"2
From a \fBKatabatic::AutoSegment\fP, we uses the Observer, it's owner is the \fBTrackSegment\fP (fast)\&.
.PP
.SH"Member Function Documentation"
.PP
.SS"\fBSession\fP * open (\fBKiteEngine\fP * kite)\fC [static]\fP"
.PP
\fBParameters:\fP
.RS4
\fIkite\fP A \fBKite\fP ToolEngine on which to work\&.
.RE
.PP
\fBReturns:\fP
.RS4
A new \fBKite\fP update \fBSession\fP\&.
.RE
.PP
Open a new \fBKite\fP update \fBSession\fP on the \fCkite\fP\fCToolEngine\fP\&. At this point only one session can be opened at a time\&. Attempt to open a second one will result in an exception\&.
.SS"\fBSession\fP * get (const char * message = \fCNULL\fP)\fC [static]\fP"
\fBReturns:\fP The currently opened session, \fCNULL\fP if no session has been opened\&.
.PP
Referenced by NegociateWindow::run()\&.
.SS"\fBKatabatic::Session\fP * base ()\fC [inline]\fP, \fC [static]\fP"
\fBReturns:\fP The \fBSession\fP, casted as it's base object\&.
\fIforced\fP Force the invalidation of the \fC\fBTrack\fP\fP\&.
.RE
.PP
Schedule the update of \fBTrack\fP\fItrack\fP\&. If the \fC\fBTrack\fP\fP has not been invalidated, no actual sort will takes place\&. To force a sort (manually invalidating the \fC\fBTrack\fP\fP), sets \fBforced\fP to \fBtrue\fP\&.