MythTV
master
|
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 <libmythbase/mythdeque.h>
Public Types | |
using | iterator = typename std::deque< T >::iterator |
using | const_iterator = typename std::deque< T >::const_iterator |
using | size_type = typename std::deque< T >::size_type |
Public Member Functions | |
T | dequeue () |
Removes item from front of list and returns a copy. O(1). More... | |
void | enqueue (const 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... | |
T | head () |
Returns item at head of list. O(1). More... | |
T | head () const |
Returns item at head of list. O(1). More... | |
T | tail () |
Returns item at tail of list. O(1). More... | |
T | tail () const |
Returns item at tail of list. O(1). More... | |
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 27 of file mythdeque.h.
Definition at line 43 of file mythdeque.h.
using MythDeque< T >::const_iterator = typename std::deque<T>::const_iterator |
Definition at line 44 of file mythdeque.h.
Definition at line 45 of file mythdeque.h.
|
inline |
Removes item from front of list and returns a copy. O(1).
Definition at line 31 of file mythdeque.h.
Referenced by VideoBuffers::Dequeue(), PlayerContext::DequeueNextState(), VideoBuffers::GetNextFreeFrameInternal(), Scheduler::HandleReschedule(), TVRec::HandleTuning(), MHIContext::ProcessDSMCCQueue(), EITHelper::ProcessEvents(), MHIContext::run(), TV::timerEvent(), and EITHelper::~EITHelper().
|
inline |
Adds item to the back of the list. O(1).
Definition at line 41 of file mythdeque.h.
Referenced by EITHelper::AddEIT(), PlayerContext::ChangeState(), VideoBuffers::ClearAfterSeek(), EITHelper::CompleteEvent(), TV::customEvent(), VideoBuffers::DiscardAndRecreate(), VideoBuffers::DiscardFrames(), VideoBuffers::Enqueue(), Scheduler::EnqueueCheck(), Scheduler::EnqueueMatch(), Scheduler::EnqueuePlace(), VideoBuffers::GetNextFreeFrameInternal(), TVRec::HandlePendingRecordings(), TVRec::HandleStateChange(), MHIContext::OfferKey(), MHIContext::QueueDSMCCPacket(), TVRec::QueueEITChannelChange(), VideoBuffers::ReleaseFrame(), Scheduler::Reschedule(), TVRec::SetChannel(), TVRec::SetSignalMonitoringRate(), TVRec::TuningFrequency(), and TVRec::TuningSignalCheck().
Finds an item in the list via linear search O(n).
Definition at line 48 of file mythdeque.h.
Referenced by MythDeque< QStringList >::contains(), and MythDeque< QStringList >::remove().
|
inline |
Finds an item in the list via linear search O(n).
Definition at line 57 of file mythdeque.h.
|
inline |
Removes any item from list. O(n).
Definition at line 66 of file mythdeque.h.
Referenced by VideoBuffers::ClearAfterSeek(), VideoBuffers::DeLimboFrame(), VideoBuffers::Enqueue(), VideoBuffers::ReleaseFrame(), and VideoBuffers::Remove().
Returns true if item is in list. O(n).
Definition at line 75 of file mythdeque.h.
Referenced by VideoBuffers::ClearAfterSeek(), VideoBuffers::Contains(), VideoBuffers::DeLimboFrame(), VideoBuffers::DiscardAndRecreate(), VideoBuffers::DiscardFrames(), VideoBuffers::DoneDisplayingFrame(), and VideoBuffers::GetNextFreeFrameInternal().
Returns size of list. O(1).
Definition at line 79 of file mythdeque.h.
Referenced by VideoBuffers::ClearAfterSeek(), VideoBuffers::DiscardAndRecreate(), and VideoBuffers::DiscardFrames().
|
inline |
Returns item at head of list. O(1).
Definition at line 82 of file mythdeque.h.
Referenced by VideoBuffers::Head(), and VideoBuffers::StartDisplayingFrame().
|
inline |
Returns item at head of list. O(1).
Definition at line 86 of file mythdeque.h.
|
inline |
Returns item at tail of list. O(1).
Definition at line 91 of file mythdeque.h.
Referenced by VideoBuffers::Tail().
|
inline |
Returns item at tail of list. O(1).
Definition at line 95 of file mythdeque.h.