00001 // DCFlogifstream.h 00002 ////////////////////////////////////////////////////////////////////// 00003 // (c) Copyright 2001-2002 Brown Deer Technology, LLC. 00004 // All rights reserved. 00005 ////////////////////////////////////////////////////////////////////// 00006 00007 #ifndef DCFLOGIFSTREAM_H 00008 #define DCFLOGIFSTREAM_H 00009 00010 #ifdef USE_STD 00011 #include <string> 00012 using namespace std; 00013 #else 00014 #include <string.h> 00015 #endif 00016 00017 class DCFlogifstream 00018 { 00019 public: 00020 DCFlogifstream( const string filenamebase ); 00021 ~DCFlogifstream(); 00022 void resetDCF(); 00023 void resetUSR(); 00024 int nextDCF( string line ); 00025 int nextUSR( string line ); 00026 int getarg( const int narg, const string line, string arg ); 00027 00028 private: 00029 string _filenamelog; 00030 ifstream* _ifs; 00031 int _filenotfound; 00032 int _dcfeof; 00033 int _dcffilepos; 00034 int _usreof; 00035 int _usrfilepos; 00036 }; 00037 00038 inline 00039 void DCFlogifstream::resetDCF() 00040 { 00041 _dcffilepos = 0; 00042 _dcfeof = 0; 00043 } 00044 00045 inline 00046 void DCFlogifstream::resetUSR() 00047 { 00048 _usrfilepos = 0; 00049 _usreof = 0; 00050 } 00051 00052 #endif
1.3.6