VR-Link API Documentation for HLA Evolved
csvReader.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
7 #pragma once
8 
9 #include <omtReader/omtReader.h>
10 #include <QtCore/QFile>
11 #include <QtCore/QTextStream>
12 
13 
17 {
18 
19 public:
20  DtCSVReader( const QString & filename );
21  virtual ~DtCSVReader();
22 
24  virtual bool readLine();
25 
28  virtual QString stringVar( int start, int end ) const;
29 
33  virtual int intVar( int pos, bool * validNum ) const;
34 
35  virtual void setSeparator(char newSeparator);
36  virtual char separator();
37 
39  virtual int numColumns() const;
40 
41  const QString& currLine() const;
42 
43 protected:
45  QFile myFile;
46  QTextStream myTS;
48  QString myCurrLine;
49 };
50 
51 inline const QString& DtCSVReader::currLine() const
52 {
53  return myCurrLine;
54 }
55 
56 

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)