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 >:
deque

List of all members.

Public Types

typedef deque< T >::iterator iterator
typedef deque< T >::const_iterator const_iterator
typedef deque< T >::size_type size_type

Public Member Functions

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

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 21 of file mythdeque.h.


Member Typedef Documentation

template<typename T>
typedef deque<T>::iterator MythDeque< T >::iterator

Definition at line 37 of file mythdeque.h.

template<typename T>
typedef deque<T>::const_iterator MythDeque< T >::const_iterator

Definition at line 38 of file mythdeque.h.

template<typename T>
typedef deque<T>::size_type MythDeque< T >::size_type

Definition at line 39 of file mythdeque.h.


Member Function Documentation

template<typename T>
T MythDeque< T >::dequeue (  )  [inline]
template<typename T>
void MythDeque< T >::enqueue ( d  )  [inline]
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 42 of file mythdeque.h.

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

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 51 of file mythdeque.h.

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

Removes any item from list. O(n).

Definition at line 60 of file mythdeque.h.

Referenced by VideoBuffers::DeLimboFrame(), VideoBuffers::enqueue(), VideoBuffers::ReleaseFrame(), and VideoBuffers::remove().

template<typename T>
bool MythDeque< T >::contains ( T const   item  )  const [inline]
template<typename T>
size_type MythDeque< T >::count (  )  const [inline]

Returns size of list. O(1).

Definition at line 72 of file mythdeque.h.

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

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

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

Definition at line 75 of file mythdeque.h.

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

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

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

Definition at line 79 of file mythdeque.h.

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

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

Definition at line 84 of file mythdeque.h.

Referenced by VideoBuffers::tail().

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

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

Definition at line 88 of file mythdeque.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri May 25 06:42:13 2012 for MythTV by  doxygen 1.6.3