USGS

Isis 3.0 Object Programmers' Reference

Home

UserInterface.h
Go to the documentation of this file.
1 #ifndef UserInterface_h
2 #define UserInterface_h
3 
25 #include "FileName.h"
26 #include "Gui.h"
27 #include "IsisAml.h"
28 #include "PvlTokenizer.h"
29 
30 class Gui;
31 
32 namespace Isis {
150  class UserInterface : public IsisAml {
151  public:
152  UserInterface(const QString &xmlfile, int &argc, char *argv[]);
153  ~UserInterface();
154 
161  bool AbortOnError() {
162  return p_abortOnError;
163  };
164 
172  return p_batchList.size();
173  };
174 
180  bool IsInteractive() {
181  return p_gui != NULL;
182  };
183 
189  int ParentId() {
190  return p_parentId;
191  };
192 
196  Gui *TheGui() {
197  return p_gui;
198  };
199 
200  QString GetInfoFileName();
201  bool GetInfoFlag();
202 
203  void SetBatchList(int i);
204  void SetErrorList(int i);
205 
206  void SaveHistory();
207 
208  private:
209  void loadBatchList(const QString file);
210  void loadCommandLine(int argc, char *argv[]);
211  void loadHistory(const QString file);
212 
213  void evaluateOption(const QString name, const QString value);
214  void getNextParameter(unsigned int &curPos,
215  QString &unresolvedParam,
216  std::vector<QString> &value);
217  void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
218  std::vector<QString> readArray(QString arrayString);
219  QString resolveParameter(QString &name,
220  std::vector<QString> &reservedParams,
221  bool handleNoMatches = true);
222 
226  std::vector<std::vector<QString> > p_batchList;
228  std::vector<char *> p_cmdline;
230  QString p_errList;
234  bool p_info;
236  QString p_infoFileName;
242  QString p_progName;
244  QString p_saveFile;
245  };
246 };
247 
248 #endif