29 #ifndef _FIXEDCAPACITYPRIORITYQUEUE_H_
30 #define _FIXEDCAPACITYPRIORITYQUEUE_H_ 1
76 bool insert( T& a, T& overflown_T );
92 bool overflow = ( _m_l.size() == _m_capacity);
93 bool skip_insert =
false;
101 T& last_in_queue = _m_l.back();
102 std::less< T > theLessOp;
103 if( theLessOp( last_in_queue, a) )
111 overflown_T = last_in_queue;
124 typename std::list<T>::iterator it = _m_l.begin();
125 typename std::list<T>::iterator last = _m_l.end();
126 bool not_positioned =
true;
127 while(it != last && not_positioned)
130 not_positioned =
false;
137 std::cout <<
"----AFTER POP AND INSERT\nthe overflown_Tp=" <<overflown_Tp <<
", which means it points to..." <<std::endl ;
138 if(overflown_Tp != NULL)
140 T& the_overflown_T = (*overflown_Tp);
141 std::string typestr =
" JPPVValPair* ";
142 std::cout <<
"the_overflown_T [T="<< typestr <<
143 "]=" << the_overflown_T <<
", which points to..."<<std::endl;
145 if(the_overflown_T != NULL)
146 std::cout<< (*the_overflown_T).SoftPrintBrief() << std::endl;
148 std::cout <<
"nothing" <<std::endl;
151 std::cout <<
" nothing." << std::endl;
153 std::cout <<
"----" <<std::endl ;