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

JobCInterpreter.h

Go to the documentation of this file.
00001 
00002 // $Id: JobCInterpreter.h,v 1.3 2001/08/14 20:35:26 messier Exp $
00003 //
00004 // Class to convert text commands into "JobCommands"'s
00005 //
00006 // messier@huhepl.harvard.edu
00008 #ifndef STRING
00009 #include <string>
00010 #define STRING
00011 #endif
00012 #ifndef VECTOR
00013 #include <vector>
00014 #define VECTOR
00015 #endif
00016 
00017 using namespace std;
00018 
00019 class JobCommand;
00020 
00021 class JobCInterpreter {
00022   friend class JobCInterpreter& operator<<(JobCInterpreter& jci,const char *c);
00023 public:
00024   JobCInterpreter();
00025   JobCInterpreter(bool echo);
00026   ~JobCInterpreter();
00027 
00028   void ReadFile(const string& filename);
00029   void EchoOn();
00030   void EchoOff();
00031   
00032   JobCommand *PopJobCommand();
00033   
00034 private:
00035   void Interp(const char* cmd);
00036   void PushJobCommand(JobCommand *c);
00037 
00038   bool fEchoCommand;            // Should we echo commands as they are poped?
00039   string fBuffer;               // Input text buffer
00040   unsigned int        fCmdIndx; // Index of next command to return
00041   vector<JobCommand*> fCmdList; // List of job commands
00042 };
00043 

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