arduino-audio-tools
Loading...
Searching...
No Matches
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 <CodecOpusOgg.h>

Public Member Functions

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

Protected Attributes

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

Detailed Description

template<class T>
class audio_tools::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

Constructor & Destructor Documentation

◆ PriorityQueue() [1/2]

template<class T>
PriorityQueue ( int(* compare )(T &v1, T &v2))
inline

◆ PriorityQueue() [2/2]

template<class T>
PriorityQueue ( int(* compare )(T &v1, T &v2))
inline

Member Function Documentation

◆ clear() [1/2]

template<class T>
bool clear ( )
inline

◆ clear() [2/2]

template<class T>
bool clear ( )
inline

◆ dequeue() [1/2]

template<class T>
bool dequeue ( T & data)
inline

◆ dequeue() [2/2]

template<class T>
bool dequeue ( T & data)
inline

◆ empty() [1/2]

template<class T>
bool empty ( )
inline

◆ empty() [2/2]

template<class T>
bool empty ( )
inline

◆ enqueue() [1/2]

template<class T>
bool enqueue ( T && data)
inline

◆ enqueue() [2/2]

template<class T>
bool enqueue ( T && data)
inline

◆ peek() [1/2]

template<class T>
bool peek ( T & data)
inline

◆ peek() [2/2]

template<class T>
bool peek ( T & data)
inline

◆ setAllocator() [1/2]

template<class T>
void setAllocator ( Allocator & allocator)
inline

◆ setAllocator() [2/2]

template<class T>
void setAllocator ( Allocator & allocator)
inline

◆ size() [1/2]

template<class T>
size_t size ( )
inline

◆ size() [2/2]

template<class T>
size_t size ( )
inline

Member Data Documentation

◆ compare_cb

template<class T>
int(* compare_cb)(T &v1, T &v2)
protected

◆ l

template<class T>
List< T > l
protected

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