\hypertarget{classKite_1_1RoutingEventQueue}{\subsection{Routing\-Event\-Queue Class Reference} \label{classKite_1_1RoutingEventQueue}\index{Routing\-Event\-Queue@{Routing\-Event\-Queue}} } The priority Queue of \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event}. \subsubsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hyperlink{classKite_1_1RoutingEventQueue_a67dd3abe4f9f4f32e91dfaa9573976ca}{Routing\-Event\-Queue} () \item \hyperlink{classKite_1_1RoutingEventQueue_a28ed9894863ae1029f16744a86d4bfab}{$\sim$\-Routing\-Event\-Queue} () \item bool \hyperlink{classKite_1_1RoutingEventQueue_ac6e61de369e994009e36f344f99c15ad}{empty} () const \item size\-\_\-t \hyperlink{classKite_1_1RoutingEventQueue_aac782da1f912bceb5d8ad00c8dc892ac}{size} () const \item unsigned int \hyperlink{classKite_1_1RoutingEventQueue_a1d37043eb2c09e1ac1908f5e331f02e5}{get\-Top\-Event\-Level} () const \item \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} $\ast$ \hyperlink{classKite_1_1RoutingEventQueue_af1b85d0b49565932c55ec55625cd8838}{pop} () \item void \hyperlink{classKite_1_1RoutingEventQueue_ae119583092a1b62653cf8b009cdb564f}{load} (const vector$<$ \hyperlink{classKite_1_1TrackElement}{Track\-Element} $\ast$ $>$ \&) \item void \hyperlink{classKite_1_1RoutingEventQueue_af0813b67c9fc72d960f7e512e9403d57}{add} (\hyperlink{classKite_1_1TrackElement}{Track\-Element} $\ast$, unsigned int level) \item void \hyperlink{classKite_1_1RoutingEventQueue_ac802427673567526d06af911e94f7216}{push} (\hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} $\ast$) \item void \hyperlink{classKite_1_1RoutingEventQueue_afd2fa6d6f5d90c472bea9befa97d955d}{repush} (\hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} $\ast$) \item void \hyperlink{classKite_1_1RoutingEventQueue_a4fb0022d3e8f91a862b5f6438b7f8dad}{repush\-Invalidateds} () \item void \hyperlink{classKite_1_1RoutingEventQueue_ad55316f5135cdae6aa6c5a763f6c3473}{commit} () \item void \hyperlink{classKite_1_1RoutingEventQueue_ac8bb3912a3ce86b15842e79d0b421204}{clear} () \end{DoxyCompactItemize} \subsubsection{Detailed Description} The priority Queue of \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event}. \hypertarget{classKite_1_1RoutingEventQueue_secImplRoutingEventQueue}{}\subsubsection{Implementation Details}\label{classKite_1_1RoutingEventQueue_secImplRoutingEventQueue} The \hyperlink{classKite_1_1RoutingEventQueue}{Routing\-Event\-Queue} is build upon a S\-T\-L multiset$<$$>$ and is sorted according to the \hyperlink{classKite_1_1RoutingEvent_1_1Key}{Routing\-Event\-::\-Key} attribute of the event. The key attribute has been designed specifically to be used with this queue. It provides the features\-: \begin{DoxyItemize} \item Sort the \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} according to their priority. Higher priority mainly means more constrained segment, which must be routed first. \item The attributes of \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} may change while inserted in the queue. The key provide a cached value of those attributes ensuring a stable sorting order. \end{DoxyItemize} For more details about the sorting order, refer to \hyperlink{classKite_1_1RoutingEvent_1_1Key}{Routing\-Event\-::\-Key}. {\bfseries Insertion, Reinsertion \& Commit} When pushing a new event into the queue, the actual insertion into the multimap is delayed until the next call to {\ttfamily Routing\-Event\-::commit()}. The to be inserted events are stored into a request set which is processed when commit is called. At commit time, the \hyperlink{classKite_1_1RoutingEvent_1_1Key}{Routing\-Event\-::\-Key} cache is updated just before inserting the element. When repushing an event, the event is immediatly withdrawn from the queue and put into the request set. {\bfseries Mutiple Event for one Segment} As \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} can be cloned, there may be more than one event pointing to a segment. But there must be {\itshape only one active event}, the one which is pointed to by the segment. As a result, there maybe multiple events for an unique segment in the queue, but {\itshape only one active event}, the one that will be processed. \subsubsection{Constructor \& Destructor Documentation} \hypertarget{classKite_1_1RoutingEventQueue_a67dd3abe4f9f4f32e91dfaa9573976ca}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!Routing\-Event\-Queue@{Routing\-Event\-Queue}} \index{Routing\-Event\-Queue@{Routing\-Event\-Queue}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{Routing\-Event\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Routing\-Event\-Queue} ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_a67dd3abe4f9f4f32e91dfaa9573976ca} Contructor, create an empty queue. \hypertarget{classKite_1_1RoutingEventQueue_a28ed9894863ae1029f16744a86d4bfab}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!$\sim$\-Routing\-Event\-Queue@{$\sim$\-Routing\-Event\-Queue}} \index{$\sim$\-Routing\-Event\-Queue@{$\sim$\-Routing\-Event\-Queue}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{$\sim$\-Routing\-Event\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}$\sim${\bf Routing\-Event\-Queue} ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_a28ed9894863ae1029f16744a86d4bfab} Destructor. \begin{DoxyParagraph}{Remark\-:} The destruction of the queue do not delete the \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} that may still be in it (they shouldn't an a warning is issued). \end{DoxyParagraph} \subsubsection{Member Function Documentation} \hypertarget{classKite_1_1RoutingEventQueue_ac6e61de369e994009e36f344f99c15ad}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!empty@{empty}} \index{empty@{empty}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{empty}]{\setlength{\rightskip}{0pt plus 5cm}bool empty ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classKite_1_1RoutingEventQueue_ac6e61de369e994009e36f344f99c15ad} {\bfseries Returns\-:} {\bfseries true} if there is the queue is empty. \hypertarget{classKite_1_1RoutingEventQueue_aac782da1f912bceb5d8ad00c8dc892ac}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!size@{size}} \index{size@{size}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{size}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t size ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classKite_1_1RoutingEventQueue_aac782da1f912bceb5d8ad00c8dc892ac} {\bfseries Returns\-:} The number of events in the queue. \hypertarget{classKite_1_1RoutingEventQueue_a1d37043eb2c09e1ac1908f5e331f02e5}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!get\-Top\-Event\-Level@{get\-Top\-Event\-Level}} \index{get\-Top\-Event\-Level@{get\-Top\-Event\-Level}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{get\-Top\-Event\-Level}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int get\-Top\-Event\-Level ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classKite_1_1RoutingEventQueue_a1d37043eb2c09e1ac1908f5e331f02e5} {\bfseries Returns\-:} The greatest event level the queue has ever reached (always increasing, starting from zero). \hypertarget{classKite_1_1RoutingEventQueue_af1b85d0b49565932c55ec55625cd8838}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!pop@{pop}} \index{pop@{pop}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{pop}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Routing\-Event} $\ast$ pop ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_af1b85d0b49565932c55ec55625cd8838} Remove the top element of the queue (i.\-e. the one with the highest priority) and return it. If the queue is empty, {\ttfamily N\-U\-L\-L} is returned. \hypertarget{classKite_1_1RoutingEventQueue_ae119583092a1b62653cf8b009cdb564f}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!load@{load}} \index{load@{load}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{load}]{\setlength{\rightskip}{0pt plus 5cm}void load ( \begin{DoxyParamCaption} \item[{const vector$<$ {\bf Track\-Element} $\ast$ $>$ \&}]{segments} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_ae119583092a1b62653cf8b009cdb564f} Load a whole vector of \hyperlink{classKite_1_1TrackElement}{Track\-Element} into the queue, for each element\-: \begin{DoxyItemize} \item Create a \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} linked to the element. To be reviewed\-: replace any previous event. \item Insert the new \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} into the queue. \end{DoxyItemize} {\itshape No commit is needed after this operation.} \hypertarget{classKite_1_1RoutingEventQueue_af0813b67c9fc72d960f7e512e9403d57}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!add@{add}} \index{add@{add}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{add}]{\setlength{\rightskip}{0pt plus 5cm}void add ( \begin{DoxyParamCaption} \item[{{\bf Track\-Element} $\ast$}]{element, } \item[{unsigned int}]{level} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_af0813b67c9fc72d960f7e512e9403d57} Create a new \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} in the queue with {\ttfamily level}, associated to {\ttfamily element}. A commit is needed afterwards. To be reviewed\-: replace any previous event on element. Referenced by Negociate\-Window\-::add\-Routing\-Event(). \hypertarget{classKite_1_1RoutingEventQueue_ac802427673567526d06af911e94f7216}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!push@{push}} \index{push@{push}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{push}]{\setlength{\rightskip}{0pt plus 5cm}void push ( \begin{DoxyParamCaption} \item[{{\bf Routing\-Event} $\ast$}]{event} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}}}\label{classKite_1_1RoutingEventQueue_ac802427673567526d06af911e94f7216} Push a \hyperlink{classKite_1_1RoutingEvent}{Routing\-Event} in the queue. Effective only after the next commit. Referenced by Routing\-Event\-Queue\-::add(), and Routing\-Event\-Queue\-::repush(). \hypertarget{classKite_1_1RoutingEventQueue_afd2fa6d6f5d90c472bea9befa97d955d}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!repush@{repush}} \index{repush@{repush}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{repush}]{\setlength{\rightskip}{0pt plus 5cm}void repush ( \begin{DoxyParamCaption} \item[{{\bf Routing\-Event} $\ast$}]{event} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_afd2fa6d6f5d90c472bea9befa97d955d} Force a complete queue re-\/insertion for {\ttfamily event}. The event is immediatly withdrawn from the queue and put into the insertion request set. If the {\ttfamily event} is not already in the queue, works like \hyperlink{classKite_1_1RoutingEventQueue_ac802427673567526d06af911e94f7216}{Routing\-Event\-Queue\-::push()}. Referenced by Routing\-Event\-Queue\-::repush\-Invalidateds(), and Routing\-Event\-::reschedule(). \hypertarget{classKite_1_1RoutingEventQueue_a4fb0022d3e8f91a862b5f6438b7f8dad}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!repush\-Invalidateds@{repush\-Invalidateds}} \index{repush\-Invalidateds@{repush\-Invalidateds}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{repush\-Invalidateds}]{\setlength{\rightskip}{0pt plus 5cm}void repush\-Invalidateds ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_a4fb0022d3e8f91a862b5f6438b7f8dad} Using the list of invalidated segments from the \hyperlink{classKite_1_1Session}{Session}, repush them if\-: \begin{DoxyItemize} \item They have an associated event. \item The event is not {\itshape unimplemented}, {\itshape disabled} or {\itshape processed}. \end{DoxyItemize} Referenced by Routing\-Event\-::process(). \hypertarget{classKite_1_1RoutingEventQueue_ad55316f5135cdae6aa6c5a763f6c3473}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!commit@{commit}} \index{commit@{commit}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{commit}]{\setlength{\rightskip}{0pt plus 5cm}void commit ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_ad55316f5135cdae6aa6c5a763f6c3473} Process the insertion request set and actually insert it's elements into the queue. Perform a Routing\-Event\-::key update prior to insertion. Referenced by Routing\-Event\-::process(). \hypertarget{classKite_1_1RoutingEventQueue_ac8bb3912a3ce86b15842e79d0b421204}{\index{Kite\-::\-Routing\-Event\-Queue@{Kite\-::\-Routing\-Event\-Queue}!clear@{clear}} \index{clear@{clear}!Kite::RoutingEventQueue@{Kite\-::\-Routing\-Event\-Queue}} \paragraph[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void clear ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )}}\label{classKite_1_1RoutingEventQueue_ac8bb3912a3ce86b15842e79d0b421204} Empty the queue. Issue a warning if the queue is not empty (i.\-e. some events remains to be processeds). Referenced by Routing\-Event\-Queue\-::$\sim$\-Routing\-Event\-Queue(). The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize} \item Routing\-Event\-Queue.\-h\item Routing\-Event\-Queue.\-cpp\item Routing\-Event\-Queue.\-dox\end{DoxyCompactItemize}