VR-Forces 4.1 Class Documentation
csvReader.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2002 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: csvReader.h,v $ $Revision: 1.9 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef CSVReader_H
13 #define CSVReader_H
14 
15 #include "ngutil/ngutilDefines.h"
16 #include <QtCore/QFile>
17 #include <QtCore/QTextStream>
18 
19 
22 {
23 
24 public:
25  DtCSVReader( const QString & filename );
26  virtual ~DtCSVReader();
27 
29  virtual bool readLine();
30 
33  virtual QString stringVar( int start, int end ) const;
34 
38  virtual int intVar( int pos, bool * validNum ) const;
39 
40  virtual void setSeparator(char newSeparator);
41  virtual char separator();
42 
44  virtual int numColumns() const;
45 
46  const QString& currLine() const;
47 
48 protected:
50  QFile myFile;
51  QTextStream myTS;
53  QString myCurrLine;
54 };
55 
56 inline const QString& DtCSVReader::currLine() const
57 {
58  return myCurrLine;
59 }
60 
61 #endif //CSVReader_H
62 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)