Isis 3 Developer Reference
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 {
155  class UserInterface : public IsisAml {
156  public:
157  UserInterface(const QString &xmlfile, int &argc, char *argv[]);
158  ~UserInterface();
159 
166  bool AbortOnError() {
167  return p_abortOnError;
168  };
169 
177  return p_batchList.size();
178  };
179 
185  bool IsInteractive() {
186  return p_gui != NULL;
187  };
188 
194  int ParentId() {
195  return p_parentId;
196  };
197 
201  Gui *TheGui() {
202  return p_gui;
203  };
204 
205  QString GetInfoFileName();
206  bool GetInfoFlag();
207 
208  void SetBatchList(int i);
209  void SetErrorList(int i);
210 
211  void SaveHistory();
212 
213  private:
214  void loadBatchList(const QString file);
215  void loadCommandLine(int argc, char *argv[]);
216  void loadHistory(const QString file);
217 
218  void evaluateOption(const QString name, const QString value);
219  void getNextParameter(unsigned int &curPos,
220  QString &unresolvedParam,
221  std::vector<QString> &value);
222  void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
223  std::vector<QString> readArray(QString arrayString);
224  QString resolveParameter(QString &name,
225  std::vector<QString> &reservedParams,
226  bool handleNoMatches = true);
227 
229  bool p_abortOnError;
231  std::vector<std::vector<QString> > p_batchList;
233  std::vector<char *> p_cmdline;
235  QString p_errList;
237  Gui *p_gui;
239  bool p_info;
241  QString p_infoFileName;
243  bool p_interactive;
245  int p_parentId;
247  QString p_progName;
249  QString p_saveFile;
250  };
251 };
252 
253 #endif
QString name
Definition: IsisAmlData.h:144
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition: UserInterface.h:185
Gui * TheGui()
Definition: UserInterface.h:201
int BatchListSize()
Returns the size of the batchlist.
Definition: UserInterface.h:176
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the "-info" tag is used...
Definition: UserInterface.cpp:100
void SaveHistory()
Saves the user parameter information in the history of the program for later use. ...
Definition: UserInterface.cpp:242
int ParentId()
Returns the parent id.
Definition: UserInterface.h:194
bool GetInfoFlag()
This method returns the flag state of info.
Definition: UserInterface.cpp:111
~UserInterface()
Destroys the UserInterface object.
Definition: UserInterface.cpp:86
Application program XML file parameter manager.
Definition: IsisAml.h:154
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:155
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition: UserInterface.h:166
void SetBatchList(int i)
Clears the gui parameters and sets the batch list information at line i as the new parameters...
Definition: UserInterface.cpp:124
void SetErrorList(int i)
This method adds the line specified in the BatchList that the error occured on.
Definition: UserInterface.cpp:215
Gui for Isis Applications.
Definition: Gui.h:90
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
Definition: UserInterface.cpp:52