USGS

Isis 3.0 Developer's Reference (API)

Home

UserInterface.h

Go to the documentation of this file.
00001 #ifndef UserInterface_h
00002 #define UserInterface_h
00003 
00025 #include "IsisAml.h"
00026 #include "PvlTokenizer.h"
00027 #include "Filename.h"
00028 #include "Gui.h"
00029 
00030 class Gui;
00031 
00032 namespace Isis {
00130   class UserInterface : public IsisAml {
00131     public:
00132       UserInterface(const std::string &xmlfile, int &argc, char *argv[]);
00133       ~UserInterface();
00134 
00140       bool IsInteractive() {
00141         return p_gui != NULL;
00142       };
00143 
00147       Gui *TheGui() {
00148         return p_gui;
00149       };
00150 
00151 
00158       int BatchListSize() {
00159         return p_batchList.size();
00160       };
00161 
00167       int ParentId() {
00168         return p_parentId;
00169       };
00170 
00177       bool AbortOnError() {
00178         return p_abortOnError;
00179       };
00180 
00181       void SaveHistory();
00182       void SetBatchList(int i);
00183       void SetErrorList(int i);
00184 
00185       bool GetInfoFlag();
00186       std::string GetInfoFileName();
00187 
00188     private:
00189       std::vector<char *> p_cmdline; 
00190       int p_parentId;               
00193       void LoadCommandLine(int argc, char *argv[]);
00194       void LoadBatchList(const std::string file);
00195       void LoadHistory(const std::string file);
00196       void EvaluateOption(const std::string name, const std::string value);
00197       void GetNextParameter(unsigned int &curPos,
00198                             std::string &name, std::vector<std::string> &value);
00199       std::vector<std::string> ReadArray(iString arrayString);
00200 
00202       bool p_abortOnError;
00203       std::string p_saveFile;        
00204       std::string p_progName;        
00205 
00207       std::string p_errList;
00208 
00210       std::vector<std::vector<std::string> > p_batchList;
00211 
00212       bool p_interactive;  
00214       bool p_info;  
00215       std::string p_infoFileName;  
00216       Gui *p_gui;                  
00217   };
00218 };
00219 
00220 #endif