FFTFileCache Class Reference

#include <FFTFileCache.h>

Inherits FFTCache.

Inheritance diagram for FFTFileCache:

Inheritance graph
[legend]
Collaboration diagram for FFTFileCache:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 24 of file FFTFileCache.h.

Public Types

enum  StorageType { Compact, Rectangular, Polar }
enum  Type { MemoryCache, FileCache }

Public Member Functions

 FFTFileCache (QString fileBase, MatrixFile::Mode mode, StorageType storageType)
virtual ~FFTFileCache ()
MatrixFile::Mode getMode () const
virtual size_t getWidth () const
virtual size_t getHeight () const
virtual void resize (size_t width, size_t height)
virtual void reset ()
virtual float getMagnitudeAt (size_t x, size_t y) const
virtual float getNormalizedMagnitudeAt (size_t x, size_t y) const
virtual float getMaximumMagnitudeAt (size_t x) const
virtual float getPhaseAt (size_t x, size_t y) const
virtual void getValuesAt (size_t x, size_t y, float &real, float &imag) const
virtual bool haveSetColumnAt (size_t x) const
virtual void setColumnAt (size_t x, float *mags, float *phases, float factor)
virtual void setColumnAt (size_t x, float *reals, float *imags)
virtual void suspend ()
virtual Type getType ()

Static Public Member Functions

static size_t getCacheSize (size_t width, size_t height, StorageType type)

Protected Member Functions

float getFromReadBufStandard (size_t x, size_t y) const
float getFromReadBufCompactUnsigned (size_t x, size_t y) const
float getFromReadBufCompactSigned (size_t x, size_t y) const
void populateReadBuf (size_t x) const
float getNormalizationFactor (size_t col) const
void setNormalizationFactorToWritebuf (float newfactor)

Protected Attributes

char * m_writebuf
char * m_readbuf
size_t m_readbufCol
size_t m_readbufWidth
MatrixFilem_mfc
QMutex m_writeMutex
StorageType m_storageType
size_t m_factorSize


Member Enumeration Documentation

enum FFTFileCache::StorageType

Enumerator:
Compact 
Rectangular 
Polar 

Definition at line 27 of file FFTFileCache.h.

enum FFTCache::Type [inherited]

Enumerator:
MemoryCache 
FileCache 

Definition at line 52 of file FFTCache.h.


Constructor & Destructor Documentation

FFTFileCache::FFTFileCache ( QString  fileBase,
MatrixFile::Mode  mode,
StorageType  storageType 
)

Definition at line 32 of file FFTFileCache.cpp.

FFTFileCache::~FFTFileCache (  )  [virtual]

Definition at line 48 of file FFTFileCache.cpp.

References m_mfc, m_readbuf, and m_writebuf.


Member Function Documentation

MatrixFile::Mode FFTFileCache::getMode (  )  const [inline]

Definition at line 37 of file FFTFileCache.h.

References MatrixFile::getMode(), and m_mfc.

size_t FFTFileCache::getWidth (  )  const [virtual]

Implements FFTCache.

Definition at line 56 of file FFTFileCache.cpp.

References MatrixFile::getWidth(), and m_mfc.

size_t FFTFileCache::getHeight (  )  const [virtual]

Implements FFTCache.

Definition at line 62 of file FFTFileCache.cpp.

References MatrixFile::getHeight(), m_factorSize, and m_mfc.

Referenced by setColumnAt().

void FFTFileCache::resize ( size_t  width,
size_t  height 
) [virtual]

Implements FFTCache.

Definition at line 70 of file FFTFileCache.cpp.

References MatrixFile::getCellSize(), m_factorSize, m_mfc, m_readbuf, m_writebuf, m_writeMutex, and MatrixFile::resize().

void FFTFileCache::reset (  )  [virtual]

Implements FFTCache.

Definition at line 86 of file FFTFileCache.cpp.

References m_mfc, and MatrixFile::reset().

float FFTFileCache::getMagnitudeAt ( size_t  x,
size_t  y 
) const [virtual]

Implements FFTCache.

Definition at line 92 of file FFTFileCache.cpp.

References Compact, getFromReadBufCompactUnsigned(), getFromReadBufStandard(), getNormalizationFactor(), getValuesAt(), m_storageType, Polar, and Rectangular.

Referenced by getNormalizedMagnitudeAt(), and getValuesAt().

float FFTFileCache::getNormalizedMagnitudeAt ( size_t  x,
size_t  y 
) const [virtual]

Implements FFTCache.

Definition at line 122 of file FFTFileCache.cpp.

References Compact, getFromReadBufCompactUnsigned(), getMagnitudeAt(), getNormalizationFactor(), and m_storageType.

float FFTFileCache::getMaximumMagnitudeAt ( size_t  x  )  const [virtual]

Implements FFTCache.

Definition at line 146 of file FFTFileCache.cpp.

References getNormalizationFactor().

float FFTFileCache::getPhaseAt ( size_t  x,
size_t  y 
) const [virtual]

Implements FFTCache.

Definition at line 152 of file FFTFileCache.cpp.

References Compact, getFromReadBufCompactSigned(), getFromReadBufStandard(), getValuesAt(), m_storageType, Polar, princargf(), and Rectangular.

Referenced by getValuesAt().

void FFTFileCache::getValuesAt ( size_t  x,
size_t  y,
float &  real,
float &  imag 
) const [virtual]

Implements FFTCache.

Definition at line 179 of file FFTFileCache.cpp.

References getFromReadBufStandard(), getMagnitudeAt(), getPhaseAt(), m_storageType, and Rectangular.

Referenced by getMagnitudeAt(), and getPhaseAt().

bool FFTFileCache::haveSetColumnAt ( size_t  x  )  const [virtual]

Implements FFTCache.

Definition at line 198 of file FFTFileCache.cpp.

References MatrixFile::haveSetColumnAt(), and m_mfc.

void FFTFileCache::setColumnAt ( size_t  x,
float *  mags,
float *  phases,
float  factor 
) [virtual]

Implements FFTCache.

Definition at line 204 of file FFTFileCache.cpp.

References Compact, getHeight(), m_mfc, m_storageType, m_writebuf, m_writeMutex, Polar, Rectangular, MatrixFile::setColumnAt(), and setNormalizationFactorToWritebuf().

void FFTFileCache::setColumnAt ( size_t  x,
float *  reals,
float *  imags 
) [virtual]

Implements FFTCache.

Definition at line 244 of file FFTFileCache.cpp.

References Compact, getHeight(), m_mfc, m_storageType, m_writebuf, m_writeMutex, Polar, princargf(), Rectangular, MatrixFile::setColumnAt(), and setNormalizationFactorToWritebuf().

virtual void FFTFileCache::suspend (  )  [inline, virtual]

Reimplemented from FFTCache.

Definition at line 57 of file FFTFileCache.h.

References m_mfc, and MatrixFile::suspend().

size_t FFTFileCache::getCacheSize ( size_t  width,
size_t  height,
StorageType  type 
) [static]

Definition at line 297 of file FFTFileCache.cpp.

References Compact.

virtual Type FFTFileCache::getType (  )  [inline, virtual]

Implements FFTCache.

Definition at line 61 of file FFTFileCache.h.

References FFTCache::FileCache.

float FFTFileCache::getFromReadBufStandard ( size_t  x,
size_t  y 
) const [inline, protected]

Definition at line 69 of file FFTFileCache.h.

References MatrixFile::getHeight(), m_mfc, m_readbuf, m_readbufCol, m_readbufWidth, and populateReadBuf().

Referenced by getMagnitudeAt(), getNormalizationFactor(), getPhaseAt(), and getValuesAt().

float FFTFileCache::getFromReadBufCompactUnsigned ( size_t  x,
size_t  y 
) const [inline, protected]

Definition at line 79 of file FFTFileCache.h.

References MatrixFile::getHeight(), m_mfc, m_readbuf, m_readbufCol, m_readbufWidth, and populateReadBuf().

Referenced by getMagnitudeAt(), and getNormalizedMagnitudeAt().

float FFTFileCache::getFromReadBufCompactSigned ( size_t  x,
size_t  y 
) const [inline, protected]

Definition at line 89 of file FFTFileCache.h.

References MatrixFile::getHeight(), m_mfc, m_readbuf, m_readbufCol, m_readbufWidth, and populateReadBuf().

Referenced by getPhaseAt().

void FFTFileCache::populateReadBuf ( size_t  x  )  const [protected]

Definition at line 305 of file FFTFileCache.cpp.

References MatrixFile::getCellSize(), MatrixFile::getColumnAt(), MatrixFile::getHeight(), MatrixFile::haveSetColumnAt(), m_mfc, m_readbuf, m_readbufCol, and m_readbufWidth.

Referenced by getFromReadBufCompactSigned(), getFromReadBufCompactUnsigned(), getFromReadBufStandard(), and getNormalizationFactor().

float FFTFileCache::getNormalizationFactor ( size_t  col  )  const [inline, protected]

Definition at line 101 of file FFTFileCache.h.

References Compact, getFromReadBufStandard(), MatrixFile::getHeight(), m_factorSize, m_mfc, m_readbuf, m_readbufCol, m_readbufWidth, m_storageType, and populateReadBuf().

Referenced by getMagnitudeAt(), getMaximumMagnitudeAt(), and getNormalizedMagnitudeAt().

void FFTFileCache::setNormalizationFactorToWritebuf ( float  newfactor  )  [inline, protected]

Definition at line 123 of file FFTFileCache.h.

References Compact, MatrixFile::getHeight(), m_factorSize, m_mfc, m_storageType, and m_writebuf.

Referenced by setColumnAt().


Member Data Documentation

char* FFTFileCache::m_writebuf [protected]

Definition at line 64 of file FFTFileCache.h.

Referenced by resize(), setColumnAt(), setNormalizationFactorToWritebuf(), and ~FFTFileCache().

char* FFTFileCache::m_readbuf [mutable, protected]

Definition at line 65 of file FFTFileCache.h.

Referenced by getFromReadBufCompactSigned(), getFromReadBufCompactUnsigned(), getFromReadBufStandard(), getNormalizationFactor(), populateReadBuf(), resize(), and ~FFTFileCache().

size_t FFTFileCache::m_readbufCol [mutable, protected]

Definition at line 66 of file FFTFileCache.h.

Referenced by getFromReadBufCompactSigned(), getFromReadBufCompactUnsigned(), getFromReadBufStandard(), getNormalizationFactor(), and populateReadBuf().

size_t FFTFileCache::m_readbufWidth [mutable, protected]

Definition at line 67 of file FFTFileCache.h.

Referenced by getFromReadBufCompactSigned(), getFromReadBufCompactUnsigned(), getFromReadBufStandard(), getNormalizationFactor(), and populateReadBuf().

MatrixFile* FFTFileCache::m_mfc [protected]

Definition at line 139 of file FFTFileCache.h.

Referenced by getFromReadBufCompactSigned(), getFromReadBufCompactUnsigned(), getFromReadBufStandard(), getHeight(), getMode(), getNormalizationFactor(), getWidth(), haveSetColumnAt(), populateReadBuf(), reset(), resize(), setColumnAt(), setNormalizationFactorToWritebuf(), suspend(), and ~FFTFileCache().

QMutex FFTFileCache::m_writeMutex [protected]

Definition at line 140 of file FFTFileCache.h.

Referenced by resize(), and setColumnAt().

StorageType FFTFileCache::m_storageType [protected]

Definition at line 141 of file FFTFileCache.h.

Referenced by getMagnitudeAt(), getNormalizationFactor(), getNormalizedMagnitudeAt(), getPhaseAt(), getValuesAt(), setColumnAt(), and setNormalizationFactorToWritebuf().

size_t FFTFileCache::m_factorSize [protected]

Definition at line 142 of file FFTFileCache.h.

Referenced by getHeight(), getNormalizationFactor(), resize(), and setNormalizationFactorToWritebuf().


The documentation for this class was generated from the following files:
Generated on Wed Feb 20 15:45:33 2008 for SonicVisualiser by  doxygen 1.5.1