VR-Link API Documentation for HLA 1.3
csvReader.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00007 #pragma once
00008 
00009 #include <omtReader/omtReader.h>
00010 #include <QtCore/QFile>
00011 #include <QtCore/QTextStream>
00012 
00013 
00016 class DT_DLL_OMTREADER DtCSVReader 
00017 {  
00018 
00019 public:
00020    DtCSVReader( const QString & filename );
00021    virtual ~DtCSVReader();
00022         
00024    virtual bool readLine();
00025    
00028    virtual QString stringVar( int start, int end ) const;
00029 
00033    virtual int intVar( int pos, bool * validNum ) const;
00034 
00035    virtual void setSeparator(char newSeparator);
00036    virtual char separator();
00037 
00039    virtual int numColumns() const;
00040 
00041    const QString& currLine() const;
00042 
00043 protected:
00044    char        mySeparator;
00045    QFile       myFile;
00046    QTextStream myTS;
00047    bool        myValidFile;
00048    QString     myCurrLine;
00049 };
00050 
00051 inline const QString& DtCSVReader::currLine() const
00052 {
00053    return myCurrLine;
00054 }
00055 
00056 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)