1 #ifndef __fpa__Base__PriorityQueueAlgorithm__hxx__
2 #define __fpa__Base__PriorityQueueAlgorithm__hxx__
4 // -------------------------------------------------------------------------
5 template< class _TSuperclass >
6 fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
7 PriorityQueueAlgorithm( )
12 // -------------------------------------------------------------------------
13 template< class _TSuperclass >
14 fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
15 ~PriorityQueueAlgorithm( )
19 // -------------------------------------------------------------------------
20 template< class _TSuperclass >
21 unsigned long fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
24 return( this->m_Queue.size( ) );
27 // -------------------------------------------------------------------------
28 template< class _TSuperclass >
29 void fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
32 this->m_Queue.clear( );
35 // -------------------------------------------------------------------------
36 template< class _TSuperclass >
37 void fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
38 _QueuePush( const _TQueueNode& node )
40 static _TQueueNodeCompare cmp;
41 this->m_Queue.push_back( node );
42 std::push_heap( this->m_Queue.begin( ), this->m_Queue.end( ), cmp );
45 // -------------------------------------------------------------------------
46 template< class _TSuperclass >
47 typename fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
48 _TQueueNode fpa::Base::PriorityQueueAlgorithm< _TSuperclass >::
51 static _TQueueNodeCompare cmp;
52 std::pop_heap( this->m_Queue.begin( ), this->m_Queue.end( ), cmp );
53 _TQueueNode f = this->m_Queue.back( );
54 this->m_Queue.pop_back( );
58 #endif // __fpa__Base__PriorityQueueAlgorithm__hxx__