Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SIGNALFILEFORMAT_H
00029 #define SIGNALFILEFORMAT_H
00030
00031 #include <QGpCoreTools.h>
00032
00033 #include "GeopsyCoreDLLExport.h"
00034
00035 namespace GeopsyCore {
00036
00037 class AbstractFileFormat;
00038
00039 class GEOPSYCORE_EXPORT SignalFileFormat
00040 {
00041 public:
00042
00043
00044 enum Format {
00045 Unknown=0,
00046 Seg2,
00047 SuLittleEndian,
00048 SuBigEndian,
00049 Tomo,
00050 RD3,
00051 NiSismo,
00052 SacLittleEndian,
00053 SacBigEndian,
00054 Radan,
00055 Gse2,
00056 City2,
00057 Ascii,
00058 GeopsySignal,
00059 Saf,
00060 MultiGse2,
00061 Sismalp,
00062 Wav,
00063 SegYLittleEndian,
00064 SegYBigEndian,
00065 Temporary,
00066 SyscomXmr,
00067 SyscomSmr,
00068 SyscomVmrx,
00069 GuralpGcf,
00070 AsciiGeoSig,
00071 MiniSeed,
00072 AsciiOneColumn,
00073 PasscalSegYBigEndian,
00074 PasscalSegYLittleEndian,
00075 SegD,
00076 Custom,
00077 Fourier,
00078 FormatCount
00079 };
00080 enum Storage {Single, Multi};
00081
00082 SignalFileFormat(Format f=Unknown, AbstractFileFormat * customFormat=0);
00083 SignalFileFormat(const SignalFileFormat& o);
00084 ~SignalFileFormat();
00085
00086 void operator=(const SignalFileFormat& o);
00087 bool operator==(const SignalFileFormat& o) const;
00088 bool operator<(const SignalFileFormat& o) const;
00089
00090 Format id() const {return _id;}
00091 const AbstractFileFormat * customFormat() const {return _customFormat;}
00092 bool isReadOnly() const;
00093 Storage storage() const;
00094
00095 QString toString() const;
00096 QString caption() const;
00097 QString captionFilter() const;
00098 QString filter() const;
00099 QString suffix() const;
00100
00101 static SignalFileFormat fromContent(QString fileName);
00102 static SignalFileFormat fromSuffix(QString fileName, bool defaultEndianess=true);
00103 static SignalFileFormat fromString(QString f);
00104 static QList< QPair<QString, SignalFileFormat> > importList();
00105 private:
00106 Format _id;
00107 AbstractFileFormat * _customFormat;
00108 };
00109
00110 #define SIGNALFILEFORMAT_READONLY \
00111 case SignalFileFormat::RD3: \
00112 case SignalFileFormat::NiSismo: \
00113 case SignalFileFormat::Radan: \
00114 case SignalFileFormat::City2: \
00115 case SignalFileFormat::Sismalp: \
00116 case SignalFileFormat::PasscalSegYLittleEndian: \
00117 case SignalFileFormat::PasscalSegYBigEndian: \
00118 case SignalFileFormat::Temporary: \
00119 case SignalFileFormat::SyscomXmr: \
00120 case SignalFileFormat::SyscomSmr: \
00121 case SignalFileFormat::SyscomVmrx: \
00122 case SignalFileFormat::GuralpGcf: \
00123 case SignalFileFormat::AsciiGeoSig: \
00124 case SignalFileFormat::SegD: \
00125 case SignalFileFormat::Fourier: \
00126 case SignalFileFormat::FormatCount: \
00127 case SignalFileFormat::Unknown:
00128
00129 }
00130
00131 #endif // SIGNALFILEFORMAT_H