Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

IoRerootStreamItr.h

Go to the documentation of this file.
00001 
00002 // $Id: IoRerootStreamItr.h,v 1.4 2003/02/12 02:45:48 kasahara Exp $
00003 //
00004 // Class for walking over a reroot input file
00005 //
00006 // messier@huhepl.harvard.edu
00008 #ifndef IOREROOTSTREAMITR_H
00009 #define IOREROOTSTREAMITR_H
00010 #ifndef IODATASTREAMITR_H
00011 #include "IoModules/IoDataStreamItr.h"
00012 #endif
00013 #ifndef MINFAST_H
00014 #include "MINF_Classes/MINFast.h"
00015 #define MINFAST_H
00016 #endif
00017 
00018 class IoRerootStreamItr : public IoDataStreamItr
00019 {
00020 public:
00021   IoRerootStreamItr(const char* sourceName = "");
00022   virtual ~IoRerootStreamItr();
00023 
00024   bool        IsValid()   const { return fIsValid; }
00025   const char* GetFormat() const { return "reroot"; }
00026 
00027   int LoadRecords(MomNavigator* mom);
00028   int Increment(int n=1, MomNavigator* m=0);
00029   int Decrement(int n=1, MomNavigator* m=0);
00030   JobCResult GoTo(const VldContext& vld, MomNavigator* m=0);
00031   int GoToEOF();
00032   
00033 private:
00034   bool IsOpenFile() const;
00035 
00036   struct Cleaner {
00037     void UseMe() { /* keep compliers quiet if we use the class */ } 
00038     ~Cleaner() {
00039       if (gMINFast) { delete gMINFast; gMINFast = 0; }
00040     }
00041   };
00042 
00043   JobCResult OpenFile();
00044   void       CloseFile();
00045 
00046   long int fIndex;    // Index in the current file
00047   long int fBOFIndex; // Index position at the begin of the file
00048   long int fEOFIndex; // Index position at the end of the file
00049   bool fIsValid;      // validity of this iterator
00050 };
00051 
00052 #endif
00053 

Generated on Mon Feb 15 11:06:48 2010 for loon by  doxygen 1.3.9.1