MythTV  master
Public Types | Public Member Functions | List of all members
MythDeque< T > Class Template Reference

MythDeque is similar to QPtrQueue, while being based off deque, this allows that items that are not at the head of the queue can be seen/deleted. More...

#include <mythdeque.h>

Inheritance diagram for MythDeque< T >:
Inheritance graph
[legend]
Collaboration diagram for MythDeque< T >:
Collaboration graph
[legend]

Public Types

using iterator = typename deque< T >::iterator
 
using const_iterator = typename deque< T >::const_iterator
 
using size_type = typename deque< T >::size_type
 

Public Member Functions

dequeue ()
 Removes item from front of list and returns a copy. O(1). More...
 
void enqueue (T d)
 Adds item to the back of the list. O(1). More...
 
iterator find (T const item)
 Finds an item in the list via linear search O(n). More...
 
const_iterator find (T const item) const
 Finds an item in the list via linear search O(n). More...
 
void remove (T const item)
 Removes any item from list. O(n). More...
 
bool contains (T const &item) const
 Returns true if item is in list. O(n). More...
 
size_type count () const
 Returns size of list. O(1). More...
 
head ()
 Returns item at head of list. O(1). More...
 
const T head () const
 Returns item at head of list. O(1). More...
 
tail ()
 Returns item at tail of list. O(1). More...
 
const T tail () const
 Returns item at tail of list. O(1). More...
 

Detailed Description

template<typename T>
class MythDeque< T >

MythDeque is similar to QPtrQueue, while being based off deque, this allows that items that are not at the head of the queue can be seen/deleted.

Definition at line 28 of file mythdeque.h.

Member Typedef Documentation

◆ iterator

template<typename T>
using MythDeque< T >::iterator = typename deque<T>::iterator

Definition at line 44 of file mythdeque.h.

◆ const_iterator

template<typename T>
using MythDeque< T >::const_iterator = typename deque<T>::const_iterator

Definition at line 45 of file mythdeque.h.

◆ size_type

template<typename T>
using MythDeque< T >::size_type = typename deque<T>::size_type

Definition at line 46 of file mythdeque.h.

Member Function Documentation

◆ dequeue()

template<typename T>
T MythDeque< T >::dequeue ( )
inline

◆ enqueue()

template<typename T>
void MythDeque< T >::enqueue ( d)
inline

◆ find() [1/2]

template<typename T>
iterator MythDeque< T >::find ( T const  item)
inline

Finds an item in the list via linear search O(n).

Definition at line 49 of file mythdeque.h.

Referenced by MythDeque< QStringList >::contains(), and MythDeque< QStringList >::remove().

◆ find() [2/2]

template<typename T>
const_iterator MythDeque< T >::find ( T const  item) const
inline

Finds an item in the list via linear search O(n).

Definition at line 58 of file mythdeque.h.

◆ remove()

template<typename T>
void MythDeque< T >::remove ( T const  item)
inline

◆ contains()

template<typename T>
bool MythDeque< T >::contains ( T const &  item) const
inline

◆ count()

template<typename T>
size_type MythDeque< T >::count ( ) const
inline

Returns size of list. O(1).

Definition at line 79 of file mythdeque.h.

Referenced by VideoBuffers::ClearAfterSeek(), and VideoBuffers::DiscardFrames().

◆ head() [1/2]

template<typename T>
T MythDeque< T >::head ( )
inline

Returns item at head of list. O(1).

Definition at line 82 of file mythdeque.h.

Referenced by VideoBuffers::Head(), and VideoBuffers::StartDisplayingFrame().

◆ head() [2/2]

template<typename T>
const T MythDeque< T >::head ( ) const
inline

Returns item at head of list. O(1).

Definition at line 86 of file mythdeque.h.

◆ tail() [1/2]

template<typename T>
T MythDeque< T >::tail ( )
inline

Returns item at tail of list. O(1).

Definition at line 91 of file mythdeque.h.

Referenced by VideoBuffers::Tail().

◆ tail() [2/2]

template<typename T>
const T MythDeque< T >::tail ( ) const
inline

Returns item at tail of list. O(1).

Definition at line 95 of file mythdeque.h.


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