QGpCoreWave/MagnetoTelluricCurve.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of QGpCoreWave.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
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 Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created: 2010-05-20
00022 **  Authors:
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef MAGNETOTELLURICCURVE_H
00028 #define MAGNETOTELLURICCURVE_H
00029 
00030 #include <QGpCoreTools.h>
00031 
00032 #include "MagnetoTelluricPoint.h"
00033 #include "QGpCoreWaveDLLExport.h"
00034 
00035 namespace QGpCoreWave {
00036 
00037   class MagnetoTelluricFactory;
00038 
00039   class QGPCOREWAVE_EXPORT MagnetoTelluricCurve : public Curve<MagnetoTelluricPoint>, public XMLClass
00040   {
00041   public:
00042     MagnetoTelluricCurve() {}
00043     inline MagnetoTelluricCurve(const MagnetoTelluricCurve& o);
00044     //MagnetoTelluricCurve(int n) : Curve<ComplexStatisticalPoint>(n) {}
00045     //inline MagnetoTelluricCurve(const Curve<ComplexStatisticalPoint>& o);
00046     //~MagnetoTelluricCurve();
00047 
00048     inline bool operator==(const MagnetoTelluricCurve& o) const;
00049     //void operator=(const Curve<ComplexStatisticalPoint>& o);
00050 
00051     virtual const QString& xml_tagName() const {return xmlMagnetoTelluricCurveTag;}
00052     static const QString xmlMagnetoTelluricCurveTag;
00053 
00054     void clear();
00055     void sort() {setFunction();}
00056     void linkX(const QVector<double>& x);
00057 
00058     void setName(QString n) {_name=n;}
00059     QString name() const {return _name;}
00060 
00061     void addLog(QString s) {_log+=s;}
00062     QString log() const {return _log;}
00063 
00064     double misfit(int& nValues, int& nData, const MagnetoTelluricFactory& f, MisfitType type, double minMisfit) const;
00065   protected:
00066     void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00067     void xml_writeChildren(XML_WRITECHILDREN_ARGS) const;
00068     XMLMember xml_member(XML_MEMBER_ARGS);
00069     bool xml_setProperty(XML_SETPROPERTY_ARGS);
00070   private:
00071     QString _name;
00072     QString _log;
00073   };
00074 
00075   inline bool MagnetoTelluricCurve::operator==(const MagnetoTelluricCurve& o) const
00076   {
00077     return _name==o._name &&
00078            _log==o._log &&
00079            Curve<MagnetoTelluricPoint>::operator==(o);
00080   }
00081 
00082   inline MagnetoTelluricCurve::MagnetoTelluricCurve(const MagnetoTelluricCurve& o)
00083     : Curve<MagnetoTelluricPoint>(o), XMLClass()
00084   {
00085     _name=o._name;
00086     _log=o._log;
00087   }
00088 
00089 } // namespace QGpCoreWave
00090 
00091 #endif // MAGNETOTELLURICCURVE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines