00001 /*************************************************************************** 00002 ** 00003 ** This file is part of QGpCompatibility. 00004 ** 00005 ** This file may be distributed and/or modified under the terms of the 00006 ** GNU General Public License version 2 or 3 as published by the Free 00007 ** Software Foundation and appearing in the file LICENSE.GPL included 00008 ** in the packaging of this file. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 ** more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 ** 00018 ** See http://www.geopsy.org for more information. 00019 ** 00020 ** Created : 2003-06-06 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (ULg, Liège, Belgium) 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef COMPATMULTIMODALCURVES_H 00029 #define COMPATMULTIMODALCURVES_H 00030 00031 #include <QGpCoreTools.h> 00032 #include "CompatMultiModalFrequency.h" 00033 #include "QGpCompatibilityDLLExport.h" 00034 00035 namespace QGpCompatibility { 00036 00037 class QGPCOMPATIBILITY_EXPORT CompatMultiModalCurves : public CompatMultiModalFrequency 00038 { 00039 public: 00041 CompatMultiModalCurves(); 00043 CompatMultiModalCurves(int modesCount, int omegasCount); 00045 CompatMultiModalCurves(const CompatMultiModalFrequency * o); 00047 CompatMultiModalCurves(const CompatMultiModalFrequency * o, 00048 int modesCount); 00050 CompatMultiModalCurves(const CompatMultiModalCurves * o); 00052 CompatMultiModalCurves(const CompatMultiModalCurves * o,int modesCount, double invalidValue); 00054 virtual ~CompatMultiModalCurves(); 00055 00056 void clearRefines(); 00058 void toStream(FILE * f); 00060 void valuesToReport(QDataStream& s) const; 00062 void reportToOmega(QDataStream& s); 00064 void reportToValues(QDataStream& s); 00066 int toPointVector(int imode,Point2D * pointList, double invalid_value); 00067 00069 double value(int i, int mode) const {return _values[mode][i];} 00071 void setValue(int i, int mode,double val) {_values[mode][i]=val;} 00075 void setValues(CompatMultiModalCurves * o); 00076 00077 void refinesToReport(QDataStream& s) const; 00078 void reportToRefines(QDataStream& s); 00079 int refinesCount() const {return _refines.count();} 00080 void refineSort() {qSort(_refines);} 00081 void clear(double invalid_value); 00082 void setRayleighModesCount(int rm) { 00083 if(rm<=_modesCount) _rayleighModesCount=rm; 00084 } 00085 uint rayleighModesCount() {return _rayleighModesCount;} 00086 protected: 00087 friend class CompatMultiModalData; 00089 double ** _values; 00090 uint _rayleighModesCount; 00092 void deleteValues(); 00094 void allocatesValues(); 00096 QList<Point2D> _refines; 00097 /*protected: 00098 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const; 00099 virtual bool xml_setProperty(CompatStringSection& propertyName, 00100 CompatStringSection& content);*/ 00101 }; 00102 00103 } // namespace QGpCompatibility 00104 00105 #endif // COMPATMULTIMODALCURVES_H