Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omgfilewriter.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           filewriter.h  -  description
00003                              -------------------
00004     begin                : Tue May 13 2003
00005     copyright            : (C) 2003 by Tim Sutton
00006     email                : t.sutton@reading.ac.uk
00007  ***************************************************************************/
00008 
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
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     /* The separater that will be used between each
00108     *  value as its written to file */
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 

Generated on Mon Apr 28 15:08:30 2008 for openModellerDesktop by  doxygen 1.4.1-20050210