Recycler Class Reference

#include <recycler.h>

List of all members.

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

Detailed Description

Definition at line 16 of file recycler.h.


Constructor & Destructor Documentation

Recycler::Recycler ( unsigned int  sz  ) 

Definition at line 14 of file recycler.cpp.

Recycler::~Recycler (  ) 

Definition at line 31 of file recycler.cpp.


Member Function Documentation

bool Recycler::full (  )  const

Definition at line 43 of file recycler.cpp.

Referenced by get().

bool Recycler::empty ( void   )  const

Definition at line 49 of file recycler.cpp.

int Recycler::available (  )  const

Definition at line 55 of file recycler.cpp.

int Recycler::used (  )  const

Definition at line 61 of file recycler.cpp.

Buffer * Recycler::next ( void   ) 

Definition at line 82 of file recycler.cpp.

Buffer * Recycler::get ( void   ) 

Definition at line 67 of file recycler.cpp.

void Recycler::add (  ) 

Definition at line 75 of file recycler.cpp.

void Recycler::done ( void   ) 

Definition at line 88 of file recycler.cpp.

void Recycler::clear ( void   ) 

Definition at line 95 of file recycler.cpp.

unsigned int Recycler::size ( void   )  const

Definition at line 101 of file recycler.cpp.

Referenced by Recycler().

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:22 2012 for MythTV by  doxygen 1.6.3