MityDSP Documentation Index

MityDSP::tcDspCircularIndex Class Reference

The tcDspCircularIndex class maintains a circular index and manages the read and write pointers. More...

#include <DspCircularIndex.h>

List of all members.

Classes

class  tcCircularRead

Public Member Functions

 tcDspCircularIndex (void)
 ~tcDspCircularIndex (void)
void SetLCKHandle (LCK_Handle aHandle)
 Provide a LCK_Handle for synchronization.
void SetSize (int aSize)
 Set the maximum value of the index or size of the circular buffer.
int GetSize (void)
 Get the maximum value or number of elements.
int GetCount (void)
 Return the current number of entries in the queue.
bool IsEmpty (void)
 Are there any entries to read? Return true if yes.
void Freeze (void)
 Freeze the buffer so no more writes can happen.
void Thaw (void)
 Thaw the buffer, i.e. let more writes happen.
void Reset (void)
 Reset (and empty) the buffer.
void Empty (void)
 Just empty the buffer.
int GetWrite (void)
 Get the next index to write to (returns tcDspCircularIndex::mnEndOfBuffer if full).
void IncrementWrite (void)
 Bump the write index to the next entry.

Static Public Attributes

static const int mnEndOfBuffer = -1
 end of buffer indicator

Friends

class tcCircularRead

Detailed Description

The tcDspCircularIndex class maintains a circular index and manages the read and write pointers.

The circular buffer associated with the index can contain any kind of object.

There is always one empty entry in the buffer. The write index points to the next entry to be written. The read pointer points to the first valid entry to read. If the read pointer is the same as the write pointer, then the buffer is empty.

See also:
tcDspCircularIndex

Constructor & Destructor Documentation

tcDspCircularIndex::tcDspCircularIndex ( void   ) 
MityDSP::tcDspCircularIndex::~tcDspCircularIndex ( void   )  [inline]

Member Function Documentation

void MityDSP::tcDspCircularIndex::SetLCKHandle ( LCK_Handle  aHandle  )  [inline]

Provide a LCK_Handle for synchronization.

void tcDspCircularIndex::SetSize ( int  aSize  ) 

Set the maximum value of the index or size of the circular buffer.

int tcDspCircularIndex::GetSize ( void   ) 

Get the maximum value or number of elements.

int tcDspCircularIndex::GetCount ( void   ) 

Return the current number of entries in the queue.

bool tcDspCircularIndex::IsEmpty ( void   ) 

Are there any entries to read? Return true if yes.

void tcDspCircularIndex::Freeze ( void   ) 

Freeze the buffer so no more writes can happen.

void tcDspCircularIndex::Thaw ( void   ) 

Thaw the buffer, i.e. let more writes happen.

void tcDspCircularIndex::Reset ( void   ) 

Reset (and empty) the buffer.

void tcDspCircularIndex::Empty ( void   ) 

Just empty the buffer.

int tcDspCircularIndex::GetWrite ( void   ) 

Get the next index to write to (returns tcDspCircularIndex::mnEndOfBuffer if full).

void tcDspCircularIndex::IncrementWrite ( void   ) 

Bump the write index to the next entry.


Friends And Related Function Documentation

friend class tcCircularRead [friend]

Member Data Documentation

end of buffer indicator


  
Generated on Fri Sep 23 16:33:47 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.