My Project
|
00001 /* 00002 $Id: ReadWriteTextFile.hh 1596 2006-06-30 07:15:00Z suzuki $ 00003 */ 00004 00005 00006 #ifndef READWRITETEXTFILE 00007 #define READWRITETEXTFILE 00008 00009 #include "Header.hh" 00010 #include <sys/file.h> 00011 00012 00014 00020 class ReadWriteTextFile 00021 { 00022 private: 00023 string FileName; 00024 FILE *fin; 00025 vector<string> v; 00026 UInt4 LockFlag; 00027 protected: 00028 00029 public: 00030 ReadWriteTextFile( string _FileName, UInt4 _LockFlag=0 ); 00034 ~ReadWriteTextFile(); 00039 void ReSetTarget( string _FileName, UInt4 _LockFlag=0 ); 00040 00041 void Read(); 00047 vector<string> Put(){ return v; }; 00048 /* 00049 The contents of the target file can be obtained 00050 with this method. 00051 */ 00052 void Write( vector<string> StrVec ); 00060 }; 00061 00062 #endif