MythDeque< T > Class Template Reference

#include <mythdeque.h>

Inheritance diagram for MythDeque< T >:

deque

List of all members.


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


Public Types

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

Public Member Functions

T 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).
T head ()
 Returns item at head of list. O(1).
const T head () const
 Returns item at head of list. O(1).
T tail ()
 Returns item at tail of list. O(1).
const T tail () const
 Returns item at tail of list. O(1).

Member Typedef Documentation

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

Definition at line 30 of file mythdeque.h.

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

Definition at line 31 of file mythdeque.h.

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

Definition at line 32 of file mythdeque.h.


Member Function Documentation

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

template<typename T>
void MythDeque< T >::enqueue ( T  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 35 of file mythdeque.h.

Referenced by MythDeque< TVState >::contains(), and MythDeque< TVState >::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 44 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 53 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 65 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 68 of file mythdeque.h.

Referenced by VideoOutputXv::GetAvailableOSD(), 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 70 of file mythdeque.h.

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

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

Definition at line 74 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 76 of file mythdeque.h.


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

Generated on Sat Dec 18 05:16:07 2010 for MythTV by  doxygen 1.5.5