Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Public Attributes | Protected Attributes

bsl::priority_queue< VALUE, CONTAINER, COMPARATOR > Class Template Reference
[Component bslstl_priorityqueue]

#include <bslstl_priorityqueue.h>

List of all members.

Public Types

typedef CONTAINER container_type
typedef COMPARATOR value_compare
typedef CONTAINER::value_type value_type
typedef CONTAINER::reference reference
typedef CONTAINER::const_reference const_reference
typedef CONTAINER::size_type size_type

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION_IF (priority_queue, BloombergLP::bslma::UsesBslmaAllocator, BloombergLP::bslma::UsesBslmaAllocator< container_type >::value)
 priority_queue ()
 priority_queue (const COMPARATOR &comparator)
 priority_queue (const COMPARATOR &comparator, const CONTAINER &container)
 priority_queue (const COMPARATOR &comparator, BloombergLP::bslmf::MovableRef< CONTAINER > container)
template<class INPUT_ITERATOR >
 priority_queue (INPUT_ITERATOR first, INPUT_ITERATOR last)
template<class INPUT_ITERATOR >
 priority_queue (INPUT_ITERATOR first, INPUT_ITERATOR last, const COMPARATOR &comparator, const CONTAINER &container)
template<class INPUT_ITERATOR >
 priority_queue (INPUT_ITERATOR first, INPUT_ITERATOR last, const COMPARATOR &comparator, BloombergLP::bslmf::MovableRef< CONTAINER > container)
 priority_queue (const priority_queue &original)
 priority_queue (BloombergLP::bslmf::MovableRef< priority_queue > original)
template<class ALLOCATOR >
 priority_queue (const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
template<class ALLOCATOR >
 priority_queue (const COMPARATOR &comparator, const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
template<class ALLOCATOR >
 priority_queue (const COMPARATOR &comparator, const CONTAINER &container, const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
template<class ALLOCATOR >
 priority_queue (const COMPARATOR &comparator, BloombergLP::bslmf::MovableRef< CONTAINER > container, const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
template<class ALLOCATOR >
 priority_queue (const priority_queue &original, const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
template<class ALLOCATOR >
 priority_queue (BloombergLP::bslmf::MovableRef< priority_queue > original, const ALLOCATOR &basicAllocator, typename enable_if< bsl::uses_allocator< CONTAINER, ALLOCATOR >::value, ALLOCATOR >::type *=0)
priority_queueoperator= (const priority_queue &rhs)
priority_queueoperator= (BloombergLP::bslmf::MovableRef< priority_queue > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(false)
void push (const value_type &value)
void push (BloombergLP::bslmf::MovableRef< value_type > value)
template<class... Args>
void emplace (Args &&...args)
void pop ()
size_type size () const
const_reference top () const

Public Attributes

void swap(priority_queue
&other)
BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl
bool 
empty () const

Protected Attributes

CONTAINER c
COMPARATOR comp

Detailed Description

template<class VALUE, class CONTAINER = vector<VALUE>, class COMPARATOR = std::less<typename CONTAINER::value_type>>
class bsl::priority_queue< VALUE, CONTAINER, COMPARATOR >

This class is a value-semantic class template, adapting a container of the (template parameter) type CONTAINER, that holds elements of the (template parameter) type VALUE, to provide a highest-priority-first priority queue data structure, where the priorities of elements are compared by a comparator of the template parameter type, COMPARATOR. The container object held by a priority_queue class object is referenced as c in the following documentation.

See Component bslstl_priorityqueue


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