DinverCore/NewModel.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of DinverCore.
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: 2010-12-22
00021 **  Authors:
00022 **    Marc Wathelet (LGIT, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef NEWMODEL_H
00027 #define NEWMODEL_H
00028 
00029 #include "ParentIndex.h"
00030 #include "DinverCoreDLLExport.h"
00031 
00032 namespace DinverCore {
00033 
00034   class DINVERCORE_EXPORT NewModel
00035   {
00036   public:
00037     inline NewModel();
00038     inline ~NewModel();
00039 
00040     void setModelIndex(int i) {_modelIndex=i;}
00041     void setValidParent(bool v) {_validParent=v;}
00042     void setParentIndex(ParentIndex * p) {_parentIndex=p;}
00043     void setValidMisfit(bool v) {_validMisfit=v;}
00044     void setMisfit(double m) {_misfit=m;}
00045     void addNavigatorHit(int activeModelIndex) {_navigatorHits.append(activeModelIndex);}
00046 
00047     int modelIndex() const {return _modelIndex;}
00048     bool isValidParent() const {return _validParent;}
00049     ParentIndex * parentIndex() const {return _parentIndex;}
00050     bool isValidMisfit() const {return _validMisfit;}
00051     double misfit() const {return _misfit;}
00052     const QVector<int>& navigatorHits() const {return _navigatorHits;}
00053   private:
00054     int _modelIndex;
00055     bool _validMisfit;
00056     double _misfit;
00057     bool _validParent;
00058     ParentIndex * _parentIndex;
00059     QVector<int> _navigatorHits;
00060   };
00061 
00062   inline NewModel::NewModel()
00063   {
00064     _modelIndex=-1;
00065     _validParent=false;
00066     _parentIndex=0;
00067     _validMisfit=false;
00068   }
00069 
00070   inline NewModel::~NewModel()
00071   {
00072     delete _parentIndex;
00073   }
00074 
00075 } // namespace DinverCore
00076 
00077 #endif // NEWMODEL_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines