2018-08-19 06:27:09 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventQueue} { \subsection { Routing\- Event\- Queue Class Reference}
\label { classKite_ 1_ 1RoutingEventQueue} \index { Routing\- Event\- Queue@{ Routing\- Event\- Queue} }
}
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
The priority Queue of \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} .
2018-06-06 11:42:26 -05:00
\subsubsection * { Public Member Functions}
\begin { DoxyCompactItemize}
\item
2018-08-19 06:27:09 -05:00
\hyperlink { classKite_ 1_ 1RoutingEventQueue_ a67dd3abe4f9f4f32e91dfaa9573976ca} { Routing\- Event\- Queue} ()
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
\hyperlink { classKite_ 1_ 1RoutingEventQueue_ a28ed9894863ae1029f16744a86d4bfab} { $ \sim $ \- Routing\- Event\- Queue} ()
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
bool \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ac6e61de369e994009e36f344f99c15ad} { empty} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
size\- \_ \- t \hyperlink { classKite_ 1_ 1RoutingEventQueue_ aac782da1f912bceb5d8ad00c8dc892ac} { size} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
unsigned int \hyperlink { classKite_ 1_ 1RoutingEventQueue_ a1d37043eb2c09e1ac1908f5e331f02e5} { get\- Top\- Event\- Level} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
\hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} $ \ast $ \hyperlink { classKite_ 1_ 1RoutingEventQueue_ af1b85d0b49565932c55ec55625cd8838} { pop} ()
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ae119583092a1b62653cf8b009cdb564f} { load} (const vector$ < $ \hyperlink { classKite_ 1_ 1TrackElement} { Track\- Element} $ \ast $ $ > $ \& )
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ af0813b67c9fc72d960f7e512e9403d57} { add} (\hyperlink { classKite_ 1_ 1TrackElement} { Track\- Element} $ \ast $ , unsigned int level)
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ac802427673567526d06af911e94f7216} { push} (\hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} $ \ast $ )
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ afd2fa6d6f5d90c472bea9befa97d955d} { repush} (\hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} $ \ast $ )
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ a4fb0022d3e8f91a862b5f6438b7f8dad} { repush\- Invalidateds} ()
2018-06-06 11:42:26 -05:00
\item
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ad55316f5135cdae6aa6c5a763f6c3473} { commit} ()
\item
void \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ac8bb3912a3ce86b15842e79d0b421204} { clear} ()
\end { DoxyCompactItemize}
\subsubsection { Detailed Description}
2018-08-19 06:27:09 -05:00
The priority Queue of \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} .
2018-06-06 11:42:26 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventQueue_ secImplRoutingEventQueue} { } \subsubsection { Implementation Details} \label { classKite_ 1_ 1RoutingEventQueue_ secImplRoutingEventQueue}
2018-08-19 06:27:09 -05:00
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\- :
2018-06-06 11:42:26 -05:00
\begin { DoxyItemize}
2018-08-19 06:27:09 -05:00
\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.
2018-06-06 11:42:26 -05:00
\end { DoxyItemize}
2018-08-19 06:27:09 -05:00
For more details about the sorting order, refer to \hyperlink { classKite_ 1_ 1RoutingEvent_ 1_ 1Key} { Routing\- Event\- ::\- Key} .
2018-06-06 11:42:26 -05:00
{ \bfseries Insertion, Reinsertion \& Commit}
2018-08-19 06:27:09 -05:00
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.
2018-06-06 11:42:26 -05:00
When repushing an event, the event is immediatly withdrawn from the queue and put into the request set.
{ \bfseries Mutiple Event for one Segment}
2018-08-19 06:27:09 -05:00
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.
2018-06-06 11:42:26 -05:00
\subsubsection { Constructor \& Destructor Documentation}
2018-08-19 06:27:09 -05:00
\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}
2018-06-06 11:42:26 -05:00
Destructor.
2018-08-19 06:27:09 -05:00
\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).
2018-06-06 11:42:26 -05:00
\end { DoxyParagraph}
\subsubsection { Member Function Documentation}
2018-08-19 06:27:09 -05:00
\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\- :
2018-06-06 11:42:26 -05:00
\begin { DoxyItemize}
2018-08-19 06:27:09 -05:00
\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.
2018-06-06 11:42:26 -05:00
\end { DoxyItemize}
2018-08-19 06:27:09 -05:00
{ \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}
2018-06-06 11:42:26 -05:00
Force a complete queue re-\/ insertion for { \ttfamily event} . The event is immediatly withdrawn from the queue and put into the insertion request set.
2018-08-19 06:27:09 -05:00
If the { \ttfamily event} is not already in the queue, works like \hyperlink { classKite_ 1_ 1RoutingEventQueue_ ac802427673567526d06af911e94f7216} { Routing\- Event\- Queue\- ::push()} .
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- Queue\- ::repush\- Invalidateds(), and Routing\- Event\- ::reschedule().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\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\- :
2018-06-06 11:42:26 -05:00
\begin { DoxyItemize}
\item They have an associated event.
\item The event is not { \itshape unimplemented} , { \itshape disabled} or { \itshape processed} .
\end { DoxyItemize}
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\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.
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\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).
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- Queue\- ::$ \sim $ \- Routing\- Event\- Queue().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
The documentation for this class was generated from the following files\- :\begin { DoxyCompactItemize}
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
Routing\- Event\- Queue.\- h\item
Routing\- Event\- Queue.\- cpp\item
Routing\- Event\- Queue.\- dox\end { DoxyCompactItemize}