libUTL++
PriorityQueue.h
1 #pragma once
2 
4 
5 #include <libutl/Heap.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
21 
23 template <class T = Object>
24 class PriorityQueue : public THeap<T>
25 {
28 
29 public:
38  PriorityQueue(uint_t size,
39  uint_t increment = uint_t_max,
40  bool owner = true,
41  bool multiSet = true,
42  Ordering* ordering = nullptr);
43 
49  PriorityQueue(bool owner, bool multiSet = true);
50 };
51 
53 
54 template <class T>
56  uint_t size, uint_t increment, bool owner, bool multiSet, Ordering* ordering)
57  : THeap<T>(size, increment, owner, multiSet, ordering)
58 {
59 }
60 
62 
63 template <class T>
64 PriorityQueue<T>::PriorityQueue(bool owner, bool multiSet)
65  : THeap<T>(owner, multiSet)
66 {
67 }
68 
70 
71 UTL_NS_END;
72 
74 
#define UTL_CLASS_IMPL_TPL(className, T)
Implementation of standard UTL++ functionality for a template class.
Definition: macros.h:906
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
Object comparison abstraction.
Definition: Ordering.h:30
Template version of Heap.
Definition: THeap.h:25
PriorityQueue(uint_t size, uint_t increment=uint_t_max, bool owner=true, bool multiSet=true, Ordering *ordering=nullptr)
Constructor.
Definition: PriorityQueue.h:55
unsigned int uint_t
Unsigned integer.
Definition: types.h:59
Priority queue.
Definition: PriorityQueue.h:24
const uint_t uint_t_max
Maximum uint_t value.
#define UTL_CLASS_DECL_TPL(DC, T, BC)
Declaration of standard UTL++ functionality for a template class with one parameter.
Definition: macros.h:713