VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes

Inputs data from a comma delimited file format. More...

+ Collaboration diagram for DtCSVReader:

Public Member Functions

 DtCSVReader (const DtFilename &filename)
 
virtual ~DtCSVReader ()
 
virtual bool readLine ()
 Read the next line of the file. Returns false if no more lines. More...
 
virtual DtString stringVar (int start, int end) const
 Returns one or more fields as a string. More...
 
virtual int intVar (int pos, bool *validNum) const
 Returns the field number "pos" as an integer. More...
 
virtual void setSeparator (char newSeparator)
 
virtual char separator ()
 
virtual int numColumns () const
 Returns the number of columns on the line, given the separator. More...
 
const DtStringcurrLine () const
 

Protected Attributes

char mySeparator
 
DtFilename myFile
 
std::ifstream myTS
 
bool myValidFile
 
DtString myCurrLine
 

Detailed Description

Inputs data from a comma delimited file format.

Constructor & Destructor Documentation

DtCSVReader::DtCSVReader ( const DtFilename filename)
virtual DtCSVReader::~DtCSVReader ( )
virtual

Member Function Documentation

const DtString & DtCSVReader::currLine ( ) const
inline
virtual int DtCSVReader::intVar ( int  pos,
bool validNum 
) const
virtual

Returns the field number "pos" as an integer.

validNum indicates if the conversion to an integer was possible.

virtual int DtCSVReader::numColumns ( ) const
virtual

Returns the number of columns on the line, given the separator.

virtual bool DtCSVReader::readLine ( )
virtual

Read the next line of the file. Returns false if no more lines.

virtual char DtCSVReader::separator ( )
virtual
virtual void DtCSVReader::setSeparator ( char  newSeparator)
virtual
virtual DtString DtCSVReader::stringVar ( int  start,
int  end 
) const
virtual

Returns one or more fields as a string.

See QTextStream::section() for details.

Member Data Documentation

DtString DtCSVReader::myCurrLine
protected
DtFilename DtCSVReader::myFile
protected
char DtCSVReader::mySeparator
protected
std::ifstream DtCSVReader::myTS
protected
bool DtCSVReader::myValidFile
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)