Recycler Class Reference

#include <recycler.h>

List of all members.


Detailed Description

Definition at line 16 of file recycler.h.


Public Member Functions

 Recycler (unsigned int sz)
 ~Recycler ()
bool full () const
bool empty () const
int available () const
int used () const
Buffer * next ()
Buffer * get ()
void add ()
void done ()
void clear ()
unsigned int size () const
QMutex * mutex ()
QWaitCondition * cond ()

Private Attributes

unsigned int buffer_count
unsigned int add_index
unsigned int done_index
unsigned int current_count
Buffer ** buffers
QMutex mtx
QWaitCondition cnd

Constructor & Destructor Documentation

Recycler::Recycler ( unsigned int  sz  ) 

Definition at line 14 of file recycler.cpp.

Recycler::~Recycler (  ) 

Definition at line 30 of file recycler.cpp.


Member Function Documentation

bool Recycler::full (  )  const

Definition at line 41 of file recycler.cpp.

Referenced by get().

bool Recycler::empty (  )  const

Definition at line 47 of file recycler.cpp.

int Recycler::available (  )  const

Definition at line 53 of file recycler.cpp.

int Recycler::used (  )  const

Definition at line 59 of file recycler.cpp.

Buffer * Recycler::next ( void   ) 

Definition at line 80 of file recycler.cpp.

Buffer * Recycler::get ( void   ) 

Definition at line 65 of file recycler.cpp.

void Recycler::add (  ) 

Definition at line 73 of file recycler.cpp.

void Recycler::done (  ) 

Definition at line 86 of file recycler.cpp.

void Recycler::clear ( void   ) 

Definition at line 93 of file recycler.cpp.

unsigned int Recycler::size (  )  const

Definition at line 99 of file recycler.cpp.

QMutex* Recycler::mutex (  )  [inline]

Definition at line 38 of file recycler.h.

QWaitCondition* Recycler::cond (  )  [inline]

Definition at line 39 of file recycler.h.


Member Data Documentation

unsigned int Recycler::buffer_count [private]

Definition at line 43 of file recycler.h.

Referenced by add(), available(), done(), full(), Recycler(), size(), and ~Recycler().

unsigned int Recycler::add_index [private]

Definition at line 43 of file recycler.h.

Referenced by add(), clear(), and get().

unsigned int Recycler::done_index [private]

Definition at line 43 of file recycler.h.

Referenced by clear(), done(), and next().

unsigned int Recycler::current_count [private]

Definition at line 43 of file recycler.h.

Referenced by add(), available(), clear(), done(), empty(), full(), and used().

Buffer** Recycler::buffers [private]

Definition at line 44 of file recycler.h.

QMutex Recycler::mtx [private]

Definition at line 45 of file recycler.h.

Referenced by mutex().

QWaitCondition Recycler::cnd [private]

Definition at line 46 of file recycler.h.

Referenced by cond().


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

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