You.i Engine
CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR > Class Template Reference

Detailed Description

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
class CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >

A container class which maintains a queue of items within defined YI_PRIORITY_QUEUE_PRIORITY priorities.

The queue remains in priority order through use of all modification functions provided. When multiple items are added of the same priority, the order is dictated by the method used to add each item.

Iterators and many common query functions are provided for convenience.

See also
CYIPriorityQueue::Enqueue
CYIPriorityQueue::Push
YI_PRIORITY_QUEUE_PRIORITY

#include <utility/YiPriorityQueue.h>

Inheritance diagram for CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >:

Public Types

typedef std::list< std::pair< YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM >, YI_PRIORITY_QUEUE_ALLOCATOR > YI_PRIORITY_QUEUE_CLASS
 
typedef YI_PRIORITY_QUEUE_CLASS::iterator iterator
 
typedef YI_PRIORITY_QUEUE_CLASS::const_iterator const_iterator
 
typedef YI_PRIORITY_QUEUE_CLASS::reverse_iterator reverse_iterator
 
typedef YI_PRIORITY_QUEUE_CLASS::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

 CYIPriorityQueue ()
 
virtual ~CYIPriorityQueue ()
 
iterator Begin ()
 
const_iterator Begin () const
 
reverse_iterator ReverseBegin ()
 
const_reverse_iterator ReverseBegin () const
 
iterator End ()
 
const_iterator End () const
 
reverse_iterator ReverseEnd ()
 
const_reverse_iterator ReverseEnd () const
 
int32_t Count (YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
int32_t Count (const YI_PRIORITY_QUEUE_ITEM &item) const
 
int32_t Count (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
int32_t Count () const
 
bool IsEmpty () const
 
iterator Find (YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
const_iterator Find (YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
iterator Find (const YI_PRIORITY_QUEUE_ITEM &item)
 
const_iterator Find (const YI_PRIORITY_QUEUE_ITEM &item) const
 
iterator Find (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
const_iterator Find (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
template<class YI_PREDICATE >
iterator Find (YI_PREDICATE predicate)
 
template<class YI_PREDICATE >
const_iterator Find (YI_PREDICATE predicate) const
 
bool Contains (YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
bool Contains (const YI_PRIORITY_QUEUE_ITEM &item) const
 
bool Contains (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority) const
 
template<class YI_PREDICATE >
bool Contains (YI_PREDICATE predicate) const
 
YI_PRIORITY_QUEUE_ITEM & Head ()
 
const YI_PRIORITY_QUEUE_ITEM & Head () const
 
void Clear ()
 
YI_PRIORITY_QUEUE_ITEM Dequeue ()
 
void Enqueue (YI_PRIORITY_QUEUE_ITEM item, YI_PRIORITY_QUEUE_PRIORITY ePriority=YI_PRIORITY_QUEUE_DEFAULT)
 
void Push (YI_PRIORITY_QUEUE_ITEM item, YI_PRIORITY_QUEUE_PRIORITY ePriority=YI_PRIORITY_QUEUE_DEFAULT)
 
iterator Remove (iterator it)
 
bool Remove (YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
bool Remove (const YI_PRIORITY_QUEUE_ITEM &item)
 
bool Remove (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
void RemoveAll (YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
void RemoveAll (const YI_PRIORITY_QUEUE_ITEM &item)
 
void RemoveAll (const YI_PRIORITY_QUEUE_ITEM &item, YI_PRIORITY_QUEUE_PRIORITY ePriority)
 
template<class YI_PREDICATE >
void RemoveAll (YI_PREDICATE predicate)
 
void Merge (CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR > &rOther)
 
void Swap (CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR > &rOther)
 

Member Typedef Documentation

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
typedef YI_PRIORITY_QUEUE_CLASS::const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::const_iterator
template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
typedef YI_PRIORITY_QUEUE_CLASS::const_reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::const_reverse_iterator
template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
typedef YI_PRIORITY_QUEUE_CLASS::iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::iterator
template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
typedef YI_PRIORITY_QUEUE_CLASS::reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::reverse_iterator
template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
typedef std::list<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM>, YI_PRIORITY_QUEUE_ALLOCATOR> CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::YI_PRIORITY_QUEUE_CLASS

Constructor & Destructor Documentation

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::CYIPriorityQueue ( )
inline
template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
virtual CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::~CYIPriorityQueue ( )
inlinevirtual

Member Function Documentation

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Begin ( )
inline

Returns a CYIPriorityQueue::iterator pointing to the first element in the CYIPriorityQueue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Begin ( ) const
inline

Returns a CYIPriorityQueue::const_iterator to the first element in the CYIPriorityQueue when it is const-qualified.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Clear ( )
inline

Removes and destroys all elements in the queue, leaving it with a count of 0.

All iterators related to this queue are invalidated, except end iterators.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Contains ( YI_PRIORITY_QUEUE_PRIORITY  ePriority) const
inline

Returns true if at least one element with priority ePriority exists in the queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Contains ( const YI_PRIORITY_QUEUE_ITEM &  item) const
inline

Returns true if at least one element matching item exists in the queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Contains ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
) const
inline

Returns true if at least one element matching item with priority ePriority exists in the queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
template<class YI_PREDICATE >
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Contains ( YI_PREDICATE  predicate) const
inline

Returns true if predicate returns true for at least one element in the queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
int32_t CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Count ( YI_PRIORITY_QUEUE_PRIORITY  ePriority) const
inline

Returns the number of queued items with ePriority.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
int32_t CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Count ( const YI_PRIORITY_QUEUE_ITEM &  item) const
inline

Returns the number of queued items matching item.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
int32_t CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Count ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
) const
inline

Returns the number of queued items matching item with priority ePriority.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
int32_t CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Count ( ) const
inline

Returns the total number of items in the queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
YI_PRIORITY_QUEUE_ITEM CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Dequeue ( )
inline

Returns a copy of the first element in the queue, then removes and deletes the first element. The count of the queue is reduced by 1.

Iterators to the element removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::End ( )
inline

Returns a CYIPriorityQueue::iterator referring to the past-the-end element in the CYIPriorityQueue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::End ( ) const
inline

Returns a CYIPriorityQueue::const_iterator referring to the past-the-end element in the CYIPriorityQueue when it is const-qualified.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Enqueue ( YI_PRIORITY_QUEUE_ITEM  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority = YI_PRIORITY_QUEUE_DEFAULT 
)
inline

Adds item to the queue after all other elements with priority ePriority.

All iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( YI_PRIORITY_QUEUE_PRIORITY  ePriority)
inline

Returns a CYIPriorityQueue::iterator to the first element in the queue with priority ePriority. If no such element can be found, a CYIPriorityQueue::iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( YI_PRIORITY_QUEUE_PRIORITY  ePriority) const
inline

Returns a CYIPriorityQueue::const_iterator to the first element in the const-qualified queue with priority ePriority. If no such element can be found, a CYIPriorityQueue::const_iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( const YI_PRIORITY_QUEUE_ITEM &  item)
inline

Returns a CYIPriorityQueue::iterator to the first element in the queue matching item. If no such element can be found, a CYIPriorityQueue::iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( const YI_PRIORITY_QUEUE_ITEM &  item) const
inline

Returns a CYIPriorityQueue::const_iterator to the first element in the const-qualified queue matching item. If no such element can be found, a CYIPriorityQueue::const_iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
)
inline

Returns a CYIPriorityQueue::iterator to the first element in the queue matching item with priority ePriority. If no such element can be found, a CYIPriorityQueue::iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
) const
inline

Returns a CYIPriorityQueue::const_iterator to the first element in the const-qualified queue matching item with priority ePriority. If no such element can be found, a CYIPriorityQueue::const_iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
template<class YI_PREDICATE >
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( YI_PREDICATE  predicate)
inline

Returns a CYIPriorityQueue::iterator to the first element in the queue for which predicate returns true. If no such element can be found, a CYIPriorityQueue::iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
template<class YI_PREDICATE >
const_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Find ( YI_PREDICATE  predicate) const
inline

Returns a CYIPriorityQueue::const_iterator to the first element in the const-qualified queue for which predicate returns true. If no such element can be found, a CYIPriorityQueue::const_iterator equivalent to that returned by CYIPriorityQueue::End is returned.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
YI_PRIORITY_QUEUE_ITEM& CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Head ( )
inline

Returns a reference to the first item in the queue by priority order.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const YI_PRIORITY_QUEUE_ITEM& CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Head ( ) const
inline

Returns a const reference to the first item in the const-qualified queue by priority order.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::IsEmpty ( ) const
inline

Returns true if the queue is empty.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Merge ( CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR > &  rOther)
inline

Transfers all elements from rOther into this queue in priority order. Elements of equivalent priority originating in this queue will appear before elements from rOther.

There is no effect if rOther is this queue.

All iterators related to this queue remain valid. Iterators refering to the elements transferred from rOther still refer to those elements but are now related to this queue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Push ( YI_PRIORITY_QUEUE_ITEM  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority = YI_PRIORITY_QUEUE_DEFAULT 
)
inline

Adds item to the queue before all other elements with priority ePriority.

All iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Remove ( iterator  it)
inline

Removes a single element in the queue pointed to by it. Returns an iterator pointing to the element following the one removed.

If it is not a valid iterator for this queue the behaviour of this function is undefined.

Iterators to the element removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Remove ( YI_PRIORITY_QUEUE_PRIORITY  ePriority)
inline

Removes the first element in the queue with priority ePriority. Returns true if an element was removed.

Iterators to the element removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Remove ( const YI_PRIORITY_QUEUE_ITEM &  item)
inline

Removes the first element in the queue matching item. Returns true if an element was removed.

Iterators to the element removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
bool CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Remove ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
)
inline

Removes the first element in the queue matching item with priority ePriority. Returns true if an element was removed.

Iterators to the element removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::RemoveAll ( YI_PRIORITY_QUEUE_PRIORITY  ePriority)
inline

Removes all elements in the queue with priority ePriority.

Iterators to elements removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::RemoveAll ( const YI_PRIORITY_QUEUE_ITEM &  item)
inline

Removes all elements in the queue matching item.

Iterators to elements removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::RemoveAll ( const YI_PRIORITY_QUEUE_ITEM &  item,
YI_PRIORITY_QUEUE_PRIORITY  ePriority 
)
inline

Removes all elements in the queue matching item with priority ePriority.

Iterators to elements removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
template<class YI_PREDICATE >
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::RemoveAll ( YI_PREDICATE  predicate)
inline

Removes all elements in the queue for which predicate returns true.

Iterators to elements removed are invalidated and all other iterators related to this queue remain valid.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::ReverseBegin ( )
inline

Returns a CYIPriorityQueue::reverse_iterator to the reverse beginning of the CYIPriorityQueue.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::ReverseBegin ( ) const
inline

Returns a CYIPriorityQueue::const_reverse_iterator to the reverse beginning of the CYIPriorityQueue when it is const-qualified.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::ReverseEnd ( )
inline

Returns a CYIPriorityQueue::reverse_iterator referring to the theoretical element preceding the first element in the queue, which is considered the queue's reverse end.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
const_reverse_iterator CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::ReverseEnd ( ) const
inline

Returns a CYIPriorityQueue::const_reverse_iterator referring to the theoretical element preceding the first element in the CYIPriorityQueue when it is const-qualified, which is considered the queue's reverse end.

template<typename YI_PRIORITY_QUEUE_ITEM, class YI_PRIORITY_QUEUE_ALLOCATOR = std::allocator<std::pair<YI_PRIORITY_QUEUE_PRIORITY, YI_PRIORITY_QUEUE_ITEM> >>
void CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR >::Swap ( CYIPriorityQueue< YI_PRIORITY_QUEUE_ITEM, YI_PRIORITY_QUEUE_ALLOCATOR > &  rOther)
inline

Exchanges the content of this queue with the content of rOther.

All iterators related to both queues remain valid, but now refer to elements in the other queue. End iterators for both queues may be invalidated.


The documentation for this class was generated from the following file: