arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Protected Attributes | List of all members
PriorityQueue< T > Class Template Reference

Priority Queue which is based on a List. The order of the elements is defined by a compare function which is provided in the constructor. If the function returns > 0 if v1 > v2, the data will be provided in increasing order. More...

#include <PriorityQueue.h>

Public Member Functions

 PriorityQueue (int(*compare)(T &v1, T &v2))
 
bool clear ()
 
bool dequeue (T &data)
 
bool empty ()
 
bool enqueue (T &&data)
 
bool peek (T &data)
 
void setAllocator (Allocator &allocator)
 
size_t size ()
 

Protected Attributes

int(* compare_cb )(T &v1, T &v2)
 
List< T > l
 

Detailed Description

template<class T>
class audio_tools::PriorityQueue< T >

Priority Queue which is based on a List. The order of the elements is defined by a compare function which is provided in the constructor. If the function returns > 0 if v1 > v2, the data will be provided in increasing order.

Author
Phil Schatzmann
Template Parameters
T

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