00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OMGFILEWRITER_H
00022 #define OMGFILEWRITER_H
00023
00024 #include <QString>
00025 #include <QFile>
00026 #include <QTextStream>
00027
00033 class OMG_LIB_EXPORT OmgFileWriter
00034 {
00035
00036 public:
00037
00039 enum FileType { MATLAB,
00040 ESRI_ASCII ,
00041 PLAIN };
00043 OmgFileWriter();
00049 OmgFileWriter(const QString theFileName, FileType theFileFormat);
00051 ~OmgFileWriter();
00056 bool writeElement(float theElementFloat);
00060 bool writeNoData();
00065 bool writeString(QString theQString);
00069 const QString fileName();
00070
00074 void close();
00075
00079 bool sendLineBreak();
00084 bool isWriteable() {return isWriteableFlag;};
00089 QString seperator() {return seperatorString;};
00093 void setSeperator(QString theQString) {seperatorString=theQString;};
00094
00096 void setInputNoData (float theValue);
00097
00099 void setOutputNoData (float theValue);
00100 private:
00101
00103 QFile mFile;
00106 QTextStream mTextStream;
00107
00108
00109 QString seperatorString;
00110
00112 QString fileNameString;
00113
00116 bool isWriteableFlag;
00117
00119 float mInputNoData;
00121 float mOutputNoData;
00122
00123
00124 };
00125
00126
00127
00128 #endif
00129