|
| prique (const SERIAL< TYPE, ALLOC< TYPE > > &serial=SERIAL< TYPE, ALLOC< TYPE > >{}, const Callback< TYPE > &compare=Callback< TYPE >{}) |
| Constructs priority queue with container, comparator and allocator.
|
|
| prique (const std::initializer_list< TYPE > &lst, const Callback< TYPE > &compare=Callback< TYPE >{}) |
| Constructs from initializer list with comparator and allocator.
|
|
| prique (const prique &other) |
| Copy constructs a priority queue with allocator propagation.
|
|
prique & | operator= (const prique &other) |
| Copy assignment operator.
|
|
| prique (prique &&other) noexcept |
| Move constructs a priority queue with allocator propagation.
|
|
prique & | operator= (prique &&other) noexcept |
| Move assignment operator.
|
|
void | swap (prique &other) noexcept |
| Swaps contents with another priority queue.
|
|
void | push (const TYPE &e) |
| Inserts element maintaining heap property.
|
|
TYPE | pop () |
| Extracts highest priority element.
|
|
TYPE | top () const |
| Accesses highest priority element.
|
|
std::string | className () const override |
| Gets class name identifier.
|
|
u_integer | size () const override |
| Returns the number of elements in the adapter.
|
|
void | swap (containerAdapter &other) noexcept |
| Swaps the contents of this container adapter with another.
|
|
void | clear () |
| Removes all elements from the adapter.
|
|
bool | contains (const TYPE &e) const override |
| Checks for element existence in the adapter.
|
|
integer | compareTo (const containerAdapter &other) const override |
| Compares two container adapters lexicographically.
|
|
u_integer | toHash () const noexcept override |
| Computes hash value for the container adapter.
|
|
std::string | toString (bool enter) const override |
| Generates formatted string representation.
|
|
| ~containerAdapter () override=default |
| Virtual destructor for proper polymorphic cleanup.
|
|
| operator std::string () const |
| Explicit conversion to std::string.
|
|
| operator const char * () const |
| Explicit conversion to C-style string.
|
|
const char * | toCString (bool enter) const |
| Direct C-string access with formatting control.
|
|
template<typename TYPE > |
auto | formatString (const TYPE &t) -> std::string |
|
template<typename TYPE > |
auto | formatCString (const TYPE &t) -> const char * |
|
template<typename TYPE > |
auto | formatEnum (const TYPE &t) -> std::string |
|
template<typename TYPE > |
auto | formatString (TYPE *const &ptr) -> std::string |
|
bool | empty () const |
| Checks if the container is empty.
|
|
virtual | ~container ()=default |
| Destructor for the container class.
|
|
bool | operator== (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is equal to another.
|
|
bool | operator!= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is not equal to another.
|
|
bool | operator< (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is less than another.
|
|
bool | operator> (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is greater than another.
|
|
bool | operator<= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is less than or equal to another.
|
|
bool | operator>= (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const |
| Checks if the current object is greater than or equal to another.
|
|
virtual | ~comparable ()=default |
| Virtual destructor for proper cleanup of derived objects.
|
|
virtual bool | equals (const containerAdapter< TYPE, SERIAL, ALLOC > &other) const noexcept |
| Compares two objects for equality.
|
|
virtual | ~hashable ()=0 |
| Virtual destructor.
|
|
Heap-based priority queue container.
- Template Parameters
-
TYPE | Type of elements stored in the priority queue |
Callback | Comparison functor type (default: increaseComparator) |
SERIAL | Underlying container type (default: blocksList) |
ALLOC | Allocator template for memory management (default: allocator) |
Implements a priority queue using heap algorithms over an underlying container. The element priority is determined by the provided comparator.
The allocator is propagated to both the priority queue and the underlying serial container for consistent memory management of elements.
- Note
- Template parameters are constrained by:
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Combines Comparable and CallbackOf for comparison callbacks.
Definition types.h:377
Ensures the Callback type provides valid comparison operations for TYPE.
- See also
- original::containerAdapter for SERIAL container requirements