00001 /*************************************************************************** 00002 ** 00003 ** This file is part of GeopsyCore. 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 : 2009-08-14 00022 ** Authors : 00023 ** Marc Wathelet 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef ASCIISIGNALFORMATRULE_H 00029 #define ASCIISIGNALFORMATRULE_H 00030 00031 #include <QGpCoreTools.h> 00032 00033 #include "Signal.h" 00034 #include "GeopsyCoreDLLExport.h" 00035 00036 namespace GeopsyCore { 00037 00038 class GEOPSYCORE_EXPORT AsciiSignalFormatRule : public XMLClass 00039 { 00040 public: 00041 AsciiSignalFormatRule(); 00042 AsciiSignalFormatRule(const AsciiSignalFormatRule& o); 00043 00044 virtual const QString& xml_tagName() const {return xmlRuleTag;} 00045 static const QString xmlRuleTag; 00046 00047 int channel() const {return _channel;} 00048 void setChannel(int c) {_channel=c;} 00049 00050 const MetaDataIndex& data() const {return _data;} 00051 void setData(const MetaDataIndex& d) {_data=d;} 00052 00053 bool constant() const {return _constant;} 00054 void setConstant(bool c) {_constant=c;} 00055 00056 bool mandatory() const {return _mandatory;} 00057 void setMandatory(bool m) {_mandatory=m;} 00058 00059 int patternIndex() const {return _patternIndex;} 00060 void setPatternIndex(int i) {if(_patternIndex<0x40000000) _patternIndex=i;} 00061 00062 QString pattern() const {return _pattern;} 00063 void setPattern(QString p) {_pattern=p;} 00064 00065 QVariant value() const {return _value;} 00066 void setValue(QVariant v) {_value=v;} 00067 00068 double factor() const {return _factor;} 00069 void setFactor(double f) {_factor=f;} 00070 protected: 00071 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const; 00072 virtual XMLMember xml_member(XML_MEMBER_ARGS); 00073 virtual bool xml_setProperty(XML_SETPROPERTY_ARGS); 00074 private: 00075 int _channel; 00076 unsigned int _patternIndex:30; 00077 unsigned int _constant:1; 00078 unsigned int _mandatory:1; 00079 MetaDataIndex _data; 00080 QString _pattern; 00081 QVariant _value; 00082 double _factor; 00083 }; 00084 00085 } // namespace GeopsyCore 00086 00087 #endif // ASCIISIGNALFORMATRULE_H