#include <PriorityQueue_STLPQ.h>
Inheritance diagram for ASSA::PriorityQueue_STLPQ< T, Compare >:
Public Member Functions | |
~PriorityQueue_STLPQ () | |
void | insert (const T &) |
T | pop () |
const T & | top () const |
bool | remove (const int) |
size_t | size () |
void | dump () |
Private Attributes | |
priority_queue< T *, deque< T * >, Compare > | m_queue |
Definition at line 33 of file PriorityQueue_STLPQ.h.
|
Definition at line 54 of file PriorityQueue_STLPQ.h. References ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, and trace. 00055 { 00056 trace("PriorityQueue_STLPQ::~PriorityQueue_STLPQ"); 00057 00058 while ( m_queue.size () ) { 00059 delete m_queue.top (); 00060 m_queue.pop (); 00061 } 00062 }
|
|
Definition at line 147 of file PriorityQueue_STLPQ.h. References DL, ASSA::Timer::dump(), ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, ASSA::TRACE, and trace. 00148 { 00149 trace("PriorityQueue_STLPQ::dump"); 00150 00151 list<Timer*> t_list; 00152 register Timer* t_ptr = 0; 00153 DL((TRACE,"======TimerQueue start=======\n")); 00154 while (m_queue.size () > 0) { 00155 t_ptr = m_queue.top (); 00156 t_ptr->dump (); 00157 t_list.push_back (t_ptr); 00158 } 00159 DL((TRACE,"======TimerQueue end=========\n")); 00160 list<Timer*>::iterator i; 00161 00162 for (i = t_list.begin (); i != t_list.end (); i++) { 00163 m_queue.push (*i); 00164 } 00165 }
|
|
Implements ASSA::PriorityQueue_Impl< T, Compare >. Definition at line 67 of file PriorityQueue_STLPQ.h. References ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, and trace.
|
|
Implements ASSA::PriorityQueue_Impl< T, Compare >. Definition at line 76 of file PriorityQueue_STLPQ.h. References ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, and trace. 00077 { 00078 trace("PriorityQueue_STLPQ::pop"); 00079 00080 T t = m_queue.top (); 00081 m_queue.pop (); 00082 return t; 00083 }
|
|
Definition at line 106 of file PriorityQueue_STLPQ.h. References ASSA::Timer::getHandler(), ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, and trace. 00107 { 00108 trace("PriorityQueue_STLPQ::remove"); 00109 00110 list<Timer*> t_list; 00111 register Timer* t_ptr = 0; 00112 register int cnt = 0; 00113 00114 while (m_queue.size () > 0) { 00115 t_ptr = m_queue.top (); 00116 if (t_ptr->getHandler ()-> id() == id_) { 00117 delete t_ptr; 00118 cnt++; 00119 } 00120 else { 00121 t_list.push_back (t_ptr); 00122 } 00123 m_queue.pop (); 00124 } 00125 // Restore queue 00126 00127 list<Timer*>::iterator i; 00128 00129 for (i = t_list.begin (); i != t_list.end (); i++) { 00130 m_queue.push (*i); 00131 } 00132 00133 return cnt; 00134 }
|
|
Implements ASSA::PriorityQueue_Impl< T, Compare >. Definition at line 139 of file PriorityQueue_STLPQ.h. References ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue. 00140 { 00141 return m_queue.size (); 00142 }
|
|
Implements ASSA::PriorityQueue_Impl< T, Compare >. Definition at line 88 of file PriorityQueue_STLPQ.h. References ASSA::PriorityQueue_STLPQ< T, Compare >::m_queue, and trace.
|
|