VR-Forces 4.0.4 Class Documentation
include/ngutil/csvReader.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2002 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: csvReader.h,v $ $Revision: 1.9 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef CSVReader_H
00013 #define CSVReader_H
00014 
00015 #include "ngutil/ngutilDefines.h"
00016 #include <QtCore/QFile>
00017 #include <QtCore/QTextStream>
00018 
00019 
00021 class DT_DLL_ngutil DtCSVReader 
00022 {  
00023 
00024 public:
00025    DtCSVReader( const QString & filename );
00026    virtual ~DtCSVReader();
00027         
00029    virtual bool readLine();
00030    
00033    virtual QString stringVar( int start, int end ) const;
00034 
00038    virtual int intVar( int pos, bool * validNum ) const;
00039 
00040    virtual void setSeparator(char newSeparator);
00041    virtual char separator();
00042 
00044    virtual int numColumns() const;
00045 
00046    const QString& currLine() const;
00047 
00048 protected:
00049    char        mySeparator;
00050    QFile       myFile;
00051    QTextStream myTS;
00052    bool        myValidFile;
00053    QString     myCurrLine;
00054 };
00055 
00056 inline const QString& DtCSVReader::currLine() const
00057 {
00058    return myCurrLine;
00059 }
00060 
00061 #endif //CSVReader_H
00062 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)