VR-Forces 4.0.4 Class Documentation
include/vrfGuiCore/csvReader.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: csvReader.h,v $ $Revision: 1.9 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrfGuiCore/vrfGuiCore.h>
00015 
00016 #include <fstream>
00017 #include <string>
00018 
00019 namespace makVrf
00020 {
00022    class DT_DLL_VRFGUICORE DtCSVReader 
00023    {  
00024 
00025    public:
00026       DtCSVReader( const std::string & filename );
00027       virtual ~DtCSVReader();
00028            
00030       virtual bool readLine();
00031       
00033       virtual std::string column(int) const;
00034 
00038       virtual int intVar( int column ) const;
00039 
00040       virtual void setSeparator(char newSeparator);
00041       virtual char separator();
00042 
00044       virtual int numColumns() const;
00045 
00046       const std::string& currLine() const;
00047 
00048    protected:
00049       char           mySeparator;
00050       std::string    myFile;
00051       std::ifstream  myTS;
00052       std::string    myCurrLine;
00053    };
00054 
00055    inline const std::string& DtCSVReader::currLine() const
00056    {
00057       return myCurrLine;
00058    }
00059 }
00060 

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)