.RI"void \fBadd\fP (\fBTrackElement\fP *, unsigned int level)"
.br
.ti-1c
.RI"void \fBpush\fP (\fBRoutingEvent\fP *)"
.br
.ti-1c
.RI"void \fBrepush\fP (\fBRoutingEvent\fP *)"
.br
.ti-1c
.RI"void \fBrepushInvalidateds\fP ()"
.br
.ti-1c
.RI"void \fBcommit\fP ()"
.br
.ti-1c
.RI"void \fBclear\fP ()"
.br
.in-1c
.SH"Detailed Description"
.PP
The priority Queue of \fBRoutingEvent\fP\&.
.SH"Implementation Details"
.PP
The \fBRoutingEventQueue\fP is build upon a STL multiset<> and is sorted according to the \fBRoutingEvent::Key\fP attribute of the event\&. The key attribute has been designed specifically to be used with this queue\&. It provides the features:
.IP"\(bu"2
Sort the \fBRoutingEvent\fP according to their priority\&. Higher priority mainly means more constrained segment, which must be routed first\&.
.IP"\(bu"2
The attributes of \fBRoutingEvent\fP may change while inserted in the queue\&. The key provide a cached value of those attributes ensuring a stable sorting order\&.
.PP
.PP
For more details about the sorting order, refer to \fBRoutingEvent::Key\fP\&.
.PP
\fBInsertion, Reinsertion & Commit\fP
.PP
When pushing a new event into the queue, the actual insertion into the multimap is delayed until the next call to \fCRoutingEvent::commit()\fP\&. The to be inserted events are stored into a request set which is processed when commit is called\&. At commit time, the \fBRoutingEvent::Key\fP cache is updated just before inserting the element\&.
.PP
When repushing an event, the event is immediatly withdrawn from the queue and put into the request set\&.
.PP
\fBMutiple Event for one Segment\fP
.PP
As \fBRoutingEvent\fP can be cloned, there may be more than one event pointing to a segment\&. But there must be \fIonly one active event\fP, the one which is pointed to by the segment\&. As a result, there maybe multiple events for an unique segment in the queue, but \fIonly one active event\fP, the one that will be processed\&.
.SH"Constructor & Destructor Documentation"
.PP
.SS"\fBRoutingEventQueue\fP ()"
Contructor, create an empty queue\&.
.SS"~\fBRoutingEventQueue\fP ()"
Destructor\&.
.PP
\fBRemark: The destruction of the queue do not delete the\fP
.RS4
\fBRoutingEvent\fP that may still be in it (they shouldn't an a warning is issued)\&.
.RE
.PP
.SH"Member Function Documentation"
.PP
.SS"bool empty () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if there is the queue is empty\&.
.SS"size_t size () const\fC [inline]\fP"
\fBReturns:\fP The number of events in the queue\&.
.SS"unsigned int getTopEventLevel () const\fC [inline]\fP"
\fBReturns:\fP The greatest event level the queue has ever reached (always increasing, starting from zero)\&.
.SS"\fBRoutingEvent\fP * pop ()"
Remove the top element of the queue (i\&.e\&. the one with the highest priority) and return it\&. If the queue is empty, \fCNULL\fP is returned\&.