Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

clReBuffer Class Reference

Class for splitting data into buffers of different sizes. More...

#include <ReBuffer.hh>

Collaboration diagram for clReBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clReBuffer ()
 clReBuffer (const clReBuffer &CopySrc)
 ~clReBuffer ()
void Put (const float *, long)
 Put data into FIFO.

void Put (const double *, long)
bool Get (float *, long)
 Get data from FIFO.

bool Get (double *, long)
long GetCount () const
 Get number of samples in FIFO.

void Clear ()
 Clear FIFO contents and reset buffer size.

clReBufferoperator= (const clReBuffer &)

Protected Member Functions

void * Index (const std::type_info &, long)
void * GetPtr (const std::type_info &)

Private Member Functions

void CheckSize (long, long)

Private Attributes

long lSize
long lPutIndex
long lGetIndex
long lCount
clAlloc Buffer

Detailed Description

Class for splitting data into buffers of different sizes.

It's implemented using dynamically growing circular FIFO buffer.

Definition at line 36 of file ReBuffer.hh.


Constructor & Destructor Documentation

clReBuffer::clReBuffer  ) 
 

Definition at line 116 of file ReBuffer.cc.

References lCount, lGetIndex, and lPutIndex.

clReBuffer::clReBuffer const clReBuffer CopySrc  )  [inline]
 

Definition at line 49 of file ReBuffer.hh.

clReBuffer::~clReBuffer  ) 
 

Definition at line 125 of file ReBuffer.cc.


Member Function Documentation

void clReBuffer::CheckSize long  ,
long 
[inline, private]
 

Definition at line 37 of file ReBuffer.cc.

References Buffer, clAlloc::GetSize(), lCount, lGetIndex, lPutIndex, and clAlloc::Resize().

Referenced by Put().

void * clReBuffer::Index const std::type_info &  ,
long 
[protected]
 

Definition at line 69 of file ReBuffer.cc.

References Buffer, and lGetIndex.

void * clReBuffer::GetPtr const std::type_info &   )  [protected]
 

Definition at line 90 of file ReBuffer.cc.

References Buffer, Clear(), Get(), lCount, lGetIndex, Put(), and clAlloc::Size().

void clReBuffer::Put const float *  ,
long 
 

Put data into FIFO.

Parameters:
fpSrcData Source buffer
lSrcCount Number of samples in source.

Definition at line 130 of file ReBuffer.cc.

References Buffer, CheckSize(), lCount, and lPutIndex.

Referenced by GetPtr(), clIIRInterpolator::Put(), clIIRDecimator::Put(), clFlipBand::Put(), clFIRInterpolator::Put(), clFIRDecimator::Put(), and clFilter::Put().

void clReBuffer::Put const double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 152 of file ReBuffer.cc.

References Buffer, CheckSize(), lCount, and lPutIndex.

bool clReBuffer::Get float *  ,
long 
 

Get data from FIFO.

Returns false if there's not enough samples in FIFO to fill requested buffer.

Parameters:
fpDestData Destination buffer
lDestCount Number of samples to fetch
Returns:
Data available

Definition at line 174 of file ReBuffer.cc.

References Buffer, lCount, and lGetIndex.

Referenced by clIIRInterpolator::Get(), clIIRDecimator::Get(), clFlipBand::Get(), clFIRInterpolator::Get(), clFIRDecimator::Get(), clFilter::Get(), GetPtr(), clFlipBand::Put(), and clFilter::Put().

bool clReBuffer::Get double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 197 of file ReBuffer.cc.

References Buffer, lCount, and lGetIndex.

long clReBuffer::GetCount  )  const [inline]
 

Get number of samples in FIFO.

Returns:
Number of samples

Definition at line 80 of file ReBuffer.hh.

References lCount.

void clReBuffer::Clear  )  [inline]
 

Clear FIFO contents and reset buffer size.

Definition at line 87 of file ReBuffer.hh.

References Buffer, clAlloc::Free(), lCount, lGetIndex, and lPutIndex.

Referenced by clFlipBand::Clear(), GetPtr(), and clFilter::Uninitialize().

clReBuffer & clReBuffer::operator= const clReBuffer  ) 
 

Definition at line 220 of file ReBuffer.cc.

References Buffer, clAlloc::Copy(), lCount, lGetIndex, lPutIndex, and lSize.


Member Data Documentation

long clReBuffer::lSize [private]
 

Definition at line 38 of file ReBuffer.hh.

Referenced by operator=().

long clReBuffer::lPutIndex [private]
 

Definition at line 39 of file ReBuffer.hh.

Referenced by CheckSize(), Clear(), clReBuffer(), operator=(), and Put().

long clReBuffer::lGetIndex [private]
 

Definition at line 40 of file ReBuffer.hh.

Referenced by CheckSize(), Clear(), clReBuffer(), Get(), GetPtr(), Index(), and operator=().

long clReBuffer::lCount [private]
 

Definition at line 41 of file ReBuffer.hh.

Referenced by CheckSize(), Clear(), clReBuffer(), Get(), GetCount(), GetPtr(), operator=(), and Put().

clAlloc clReBuffer::Buffer [private]
 

Definition at line 42 of file ReBuffer.hh.

Referenced by CheckSize(), Clear(), Get(), GetPtr(), Index(), operator=(), and Put().


The documentation for this class was generated from the following files:
Generated on Tue Mar 2 19:47:12 2004 for libDSP by doxygen 1.3.6