![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: csvReaderWriter.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 ** Created: 4/4/07 MEM 00008 *******************************************************************************/ 00009 00012 00020 00021 #ifndef DtCSVReaderWriter_H_ 00022 #define DtCSVReaderWriter_H_ 00023 00024 #include "stdio.h" 00025 #include <vlutil/vlString.h> 00026 #include "vrfutil/rdrWritr.h" 00027 #include "vrfutil/rwRegistry.h" 00028 #include "vrfutil/putSelfCbInfo.h" 00029 #include "vrfutil/getSelfCbInfo.h" 00030 #include <vlutil/vlMachineTypes.h> 00031 #include "tdbutil/symStr.h" 00032 #include <vlutil/vlFilename.h> 00033 #include <list> 00034 00035 #include "vrfutil/vrfutilDefines.h" 00036 class DT_DLL_vrfutil DtCSVReaderWriter : public DtReaderWriter 00037 { 00038 public: 00039 00040 00042 DtCSVReaderWriter(); 00043 00047 DtCSVReaderWriter(const DtString& name, DtReaderWriterRegistry* 00048 parentRegistry = NULL, bool readonly = false); 00049 DtCSVReaderWriter(const DtSymbolString& name, DtReaderWriterRegistry* 00050 parentRegistry = NULL, bool readonly = false); 00051 00053 DtCSVReaderWriter(const DtString& name, const DtCSVReaderWriter& orig, 00054 DtReaderWriterRegistry* parentRegistry = NULL); 00055 DtCSVReaderWriter(const DtSymbolString& name, const DtCSVReaderWriter& orig, 00056 DtReaderWriterRegistry* parentRegistry = NULL); 00057 00059 const DtCSVReaderWriter& operator=(const DtCSVReaderWriter& orig); 00060 00062 virtual ~DtCSVReaderWriter(); 00063 00068 virtual void putSelf(FILE* fp, int indentLevel = 0, 00069 bool writeUnspecified = false, const DtFilename& path = 00070 DtFilename::nullFilename()); 00071 00075 virtual void getSelf( FILE* fp); 00076 00079 virtual void writeSelf(FILE* fp, int indentLevel = 0, 00080 bool writeUnspecified = false, 00081 const DtFilename& path = DtFilename::nullFilename()); 00082 00086 virtual const char* readerWriterType() const; 00087 00089 typedef std::vector<std::string> DtCSVLineEntry; 00090 00091 protected: 00092 00094 virtual void putData(FILE *fp, int indentLevel = 0); 00095 virtual bool getData(FILE *fp); 00096 00097 //Not virtual, simple reads in a line of a csv file for parsing 00098 bool readLine(FILE * fp, DtString& line ); 00099 00100 }; 00101 00102 00103 00104 #endif