coriolis/kite/doc/html/classKite_1_1RoutingEventQu...

409 lines
22 KiB
HTML

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Kite - Detailed Router</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="SoC.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<h1 id="pagetop" class="header">Kite - Detailed Router</h1>
<!--
<center class="header">
<table class="header">
<tr>
<td><a href="customSummary.html">Summary</a></td>
<td><a href="namespaces.html">Namespaces</a></td>
<td><a href="customHierarchy.html">Class Hierarchy</a></td>
<td><a href="annotated.html">Classes</a></td>
<td><a href="functions.html">Member Index</a></td>
</tr>
</table>
</center>
-->
<br>
<body onload="javascript:toggleLevel(1)">
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceKite.html">Kite</a></li><li class="navelem"><a class="el" href="classKite_1_1RoutingEventQueue.html">RoutingEventQueue</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classKite_1_1RoutingEventQueue-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">RoutingEventQueue Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>The priority Queue of <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a>.
<a href="classKite_1_1RoutingEventQueue.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a67dd3abe4f9f4f32e91dfaa9573976ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#a67dd3abe4f9f4f32e91dfaa9573976ca">RoutingEventQueue</a> ()</td></tr>
<tr class="separator:a67dd3abe4f9f4f32e91dfaa9573976ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28ed9894863ae1029f16744a86d4bfab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#a28ed9894863ae1029f16744a86d4bfab">~RoutingEventQueue</a> ()</td></tr>
<tr class="separator:a28ed9894863ae1029f16744a86d4bfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e61de369e994009e36f344f99c15ad"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#ac6e61de369e994009e36f344f99c15ad">empty</a> () const </td></tr>
<tr class="separator:ac6e61de369e994009e36f344f99c15ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac782da1f912bceb5d8ad00c8dc892ac"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#aac782da1f912bceb5d8ad00c8dc892ac">size</a> () const </td></tr>
<tr class="separator:aac782da1f912bceb5d8ad00c8dc892ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d37043eb2c09e1ac1908f5e331f02e5"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#a1d37043eb2c09e1ac1908f5e331f02e5">getTopEventLevel</a> () const </td></tr>
<tr class="separator:a1d37043eb2c09e1ac1908f5e331f02e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1b85d0b49565932c55ec55625cd8838"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#af1b85d0b49565932c55ec55625cd8838">pop</a> ()</td></tr>
<tr class="separator:af1b85d0b49565932c55ec55625cd8838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae119583092a1b62653cf8b009cdb564f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#ae119583092a1b62653cf8b009cdb564f">load</a> (const vector&lt; <a class="el" href="classKite_1_1TrackElement.html">TrackElement</a> * &gt; &amp;)</td></tr>
<tr class="separator:ae119583092a1b62653cf8b009cdb564f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0813b67c9fc72d960f7e512e9403d57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#af0813b67c9fc72d960f7e512e9403d57">add</a> (<a class="el" href="classKite_1_1TrackElement.html">TrackElement</a> *, unsigned int level)</td></tr>
<tr class="separator:af0813b67c9fc72d960f7e512e9403d57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac802427673567526d06af911e94f7216"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#ac802427673567526d06af911e94f7216">push</a> (<a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> *)</td></tr>
<tr class="separator:ac802427673567526d06af911e94f7216"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd2fa6d6f5d90c472bea9befa97d955d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#afd2fa6d6f5d90c472bea9befa97d955d">repush</a> (<a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> *)</td></tr>
<tr class="separator:afd2fa6d6f5d90c472bea9befa97d955d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb0022d3e8f91a862b5f6438b7f8dad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#a4fb0022d3e8f91a862b5f6438b7f8dad">repushInvalidateds</a> ()</td></tr>
<tr class="separator:a4fb0022d3e8f91a862b5f6438b7f8dad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad55316f5135cdae6aa6c5a763f6c3473"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#ad55316f5135cdae6aa6c5a763f6c3473">commit</a> ()</td></tr>
<tr class="separator:ad55316f5135cdae6aa6c5a763f6c3473"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8bb3912a3ce86b15842e79d0b421204"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKite_1_1RoutingEventQueue.html#ac8bb3912a3ce86b15842e79d0b421204">clear</a> ()</td></tr>
<tr class="separator:ac8bb3912a3ce86b15842e79d0b421204"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The priority Queue of <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a>. </p>
<h1><a class="anchor" id="secImplRoutingEventQueue"></a>
Implementation Details</h1>
<p>The <a class="el" href="classKite_1_1RoutingEventQueue.html" title="The priority Queue of RoutingEvent. ">RoutingEventQueue</a> is build upon a STL multiset&lt;&gt; and is sorted according to the <a class="el" href="classKite_1_1RoutingEvent_1_1Key.html" title="RoutingEvent cached key for maps. ">RoutingEvent::Key</a> attribute of the event. The key attribute has been designed specifically to be used with this queue. It provides the features:</p>
<ul>
<li>Sort the <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> according to their priority. Higher priority mainly means more constrained segment, which must be routed first.</li>
<li>The attributes of <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> may change while inserted in the queue. The key provide a cached value of those attributes ensuring a stable sorting order.</li>
</ul>
<p>For more details about the sorting order, refer to <a class="el" href="classKite_1_1RoutingEvent_1_1Key.html" title="RoutingEvent cached key for maps. ">RoutingEvent::Key</a>.</p>
<p><b>Insertion, Reinsertion &amp; Commit</b></p>
<p>When pushing a new event into the queue, the actual insertion into the multimap is delayed until the next call to <code>RoutingEvent::commit()</code>. The to be inserted events are stored into a request set which is processed when commit is called. At commit time, the <a class="el" href="classKite_1_1RoutingEvent_1_1Key.html" title="RoutingEvent cached key for maps. ">RoutingEvent::Key</a> cache is updated just before inserting the element.</p>
<p>When repushing an event, the event is immediatly withdrawn from the queue and put into the request set.</p>
<p><b>Mutiple Event for one Segment</b></p>
<p>As <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> can be cloned, there may be more than one event pointing to a segment. But there must be <em>only one active event</em>, the one which is pointed to by the segment. As a result, there maybe multiple events for an unique segment in the queue, but <em>only one active event</em>, the one that will be processed. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a67dd3abe4f9f4f32e91dfaa9573976ca"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classKite_1_1RoutingEventQueue.html">RoutingEventQueue</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Contructor, create an empty queue. </p>
</div>
</div>
<a class="anchor" id="a28ed9894863ae1029f16744a86d4bfab"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">~<a class="el" href="classKite_1_1RoutingEventQueue.html">RoutingEventQueue</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor.</p>
<dl class="section user"><dt>Remark:</dt><dd>The destruction of the queue do not delete the <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> that may still be in it (they shouldn't an a warning is issued). </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac6e61de369e994009e36f344f99c15ad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool empty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Returns:</b> <b>true</b> if there is the queue is empty. </p>
</div>
</div>
<a class="anchor" id="aac782da1f912bceb5d8ad00c8dc892ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Returns:</b> The number of events in the queue. </p>
</div>
</div>
<a class="anchor" id="a1d37043eb2c09e1ac1908f5e331f02e5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">unsigned int getTopEventLevel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Returns:</b> The greatest event level the queue has ever reached (always increasing, starting from zero). </p>
</div>
</div>
<a class="anchor" id="af1b85d0b49565932c55ec55625cd8838"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> * pop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove the top element of the queue (i.e. the one with the highest priority) and return it. If the queue is empty, <code>NULL</code> is returned. </p>
</div>
</div>
<a class="anchor" id="ae119583092a1b62653cf8b009cdb564f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void load </td>
<td>(</td>
<td class="paramtype">const vector&lt; <a class="el" href="classKite_1_1TrackElement.html">TrackElement</a> * &gt; &amp;&#160;</td>
<td class="paramname"><em>segments</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load a whole vector of <a class="el" href="classKite_1_1TrackElement.html" title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> into the queue, for each element:</p>
<ul>
<li>Create a <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> linked to the element. <span class="red">To be reviewed: replace any previous event.</span></li>
<li>Insert the new <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> into the queue.</li>
</ul>
<p><em>No commit is needed after this operation.</em> </p>
</div>
</div>
<a class="anchor" id="af0813b67c9fc72d960f7e512e9403d57"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classKite_1_1TrackElement.html">TrackElement</a> *&#160;</td>
<td class="paramname"><em>element</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>level</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> in the queue with <code>level</code>, associated to <code>element</code>. A commit is needed afterwards.</p>
<p><span class="red">To be reviewed: replace any previous event on element.</span> </p>
<p>Referenced by <a class="el" href="classKite_1_1NegociateWindow.html#a51ba8e6a122c0cb93174027658cade63">NegociateWindow::addRoutingEvent()</a>.</p>
</div>
</div>
<a class="anchor" id="ac802427673567526d06af911e94f7216"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void push </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> *&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Push a <a class="el" href="classKite_1_1RoutingEvent.html" title="Atomic Placement Request for a TrackSegment. ">RoutingEvent</a> in the queue. Effective only after the next commit. </p>
<p>Referenced by <a class="el" href="classKite_1_1RoutingEventQueue.html#af0813b67c9fc72d960f7e512e9403d57">RoutingEventQueue::add()</a>, and <a class="el" href="classKite_1_1RoutingEventQueue.html#afd2fa6d6f5d90c472bea9befa97d955d">RoutingEventQueue::repush()</a>.</p>
</div>
</div>
<a class="anchor" id="afd2fa6d6f5d90c472bea9befa97d955d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void repush </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classKite_1_1RoutingEvent.html">RoutingEvent</a> *&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Force a complete queue re-insertion for <code>event</code>. The event is immediatly withdrawn from the queue and put into the insertion request set.</p>
<p>If the <code>event</code> is not already in the queue, works like <a class="el" href="classKite_1_1RoutingEventQueue.html#ac802427673567526d06af911e94f7216">RoutingEventQueue::push()</a>. </p>
<p>Referenced by <a class="el" href="classKite_1_1RoutingEventQueue.html#a4fb0022d3e8f91a862b5f6438b7f8dad">RoutingEventQueue::repushInvalidateds()</a>, and <a class="el" href="classKite_1_1RoutingEvent.html#abf2d02f18f96183fc6e78f3e6dc8cbf6">RoutingEvent::reschedule()</a>.</p>
</div>
</div>
<a class="anchor" id="a4fb0022d3e8f91a862b5f6438b7f8dad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void repushInvalidateds </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Using the list of invalidated segments from the <a class="el" href="classKite_1_1Session.html" title="Kite update Session. ">Session</a>, repush them if:</p>
<ul>
<li>They have an associated event.</li>
<li>The event is not <em>unimplemented</em>, <em>disabled</em> or <em>processed</em>. </li>
</ul>
<p>Referenced by <a class="el" href="classKite_1_1RoutingEvent.html#a6add4f520081c698421481bf8fe0ad1f">RoutingEvent::process()</a>.</p>
</div>
</div>
<a class="anchor" id="ad55316f5135cdae6aa6c5a763f6c3473"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void commit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Process the insertion request set and actually insert it's elements into the queue. Perform a RoutingEvent::key update prior to insertion. </p>
<p>Referenced by <a class="el" href="classKite_1_1RoutingEvent.html#a6add4f520081c698421481bf8fe0ad1f">RoutingEvent::process()</a>.</p>
</div>
</div>
<a class="anchor" id="ac8bb3912a3ce86b15842e79d0b421204"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empty the queue. Issue a warning if the queue is not empty (i.e. some events remains to be processeds). </p>
<p>Referenced by <a class="el" href="classKite_1_1RoutingEventQueue.html#a28ed9894863ae1029f16744a86d4bfab">RoutingEventQueue::~RoutingEventQueue()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="RoutingEventQueue_8h_source.html">RoutingEventQueue.h</a></li>
<li>RoutingEventQueue.cpp</li>
<li>RoutingEventQueue.dox</li>
</ul>
</div><!-- contents -->
<br>
<hr>
<table class="footer1">
<tr>
<td class="LFooter"><small>Generated by doxygen 1.8.5 on Mon Oct 1 2018</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr>
</table>
<table class="footer2">
<tr>
<td class="LFooter">Kite - Detailed Router</td>
<td class="RFooter"><small>Copyright &#169; 2008-2016 UPMC. All rights reserved</small></td>
</tr>
</table>
</body>
</html>