Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

qwavwavedatainterface.h

00001 /***************************************************************************
00002                           wavedata.h  -  description
00003                              -------------------
00004     begin                : Mon Nov 18 2002
00005     copyright            : (C) 2002 by Peter Eschler
00006     email                : eschler@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Library General Public License as       *
00013  *   published by  the Free Software Foundation; either version 2 of the   *
00014  *   License, or (at your option) any later version.                       *
00015  *                                                                         *
00016  ***************************************************************************/
00017  
00018 #ifndef QwavWAVEDATAINTERFACE_H
00019 #define QwavWAVEDATAINTERFACE_H
00020 
00021 //---------------------------------------------------------------------------
00022 // Includes: standard
00023 //---------------------------------------------------------------------------
00024 
00025 #include <string>
00026 
00027 //---------------------------------------------------------------------------
00028 // Includes: project
00029 //---------------------------------------------------------------------------
00030 
00031 #include "qwavdefines.h"
00032 #include "qwavexceptions.h"
00033 #include "qwavpeakvector.h"
00034 #include "qwavmarkerinterface.h"
00035 
00036 using namespace std;
00037 
00038 Qwav_BEGIN_NAMESPACE
00039 
00040 class QwavPeakInterpolationStragegy;
00041 
00042 //---------------------------------------------------------------------------
00043 // Class: QwavWaveDataInterface
00044 //---------------------------------------------------------------------------
00045 
00072 class QWAV_EXPORTIMPORT QwavWaveDataInterface : public QwavMarkerInterface
00073 {
00074 public:      
00078     virtual float       sampleRate  (void)                  const = 0;
00079 
00083     virtual long        nrOfSamples (void)                  const = 0;
00084 
00088     virtual uint        nrOfChannels(void)                  const = 0;
00089 
00101     virtual bool readFile (const string& filename) 
00102       throw(FileOpenError,FileReadError) = 0;
00103     
00109     virtual bool writeFile(const string& filename)
00110       throw(FileOpenError,FileReadError) = 0;      
00111       
00112 
00118     virtual QwavPeakInfo           getPeak(QwavPeakInterpolator* s,
00119                                        int   pixel,
00120                                        int   nPixels,
00121                                        Float zoomFac=1.0,
00122                                        uint  channel=1) const =0;
00123 
00137     virtual const Float& operator[] (uint index) const = 0;
00138 
00144     virtual bool isOpen() const = 0;
00145     
00146 protected:
00150 //    QwavWaveDataInterface() : QwavMarkerInterface() {};
00151 //    virtual ~WaveDataInterface() {};  
00152 
00153 private:
00154      
00155 };
00156 
00157 Qwav_END_NAMESPACE
00158 
00159 
00160 #endif // QwavWAVEDATAINTERFACE_H

Generated on Mon Jan 20 00:24:54 2003 for Qwav by doxygen1.2.16