Isis 3.0
Back | 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 {
152  class UserInterface : public IsisAml {
153  public:
154  UserInterface(const QString &xmlfile, int &argc, char *argv[]);
155  ~UserInterface();
156 
163  bool AbortOnError() {
164  return p_abortOnError;
165  };
166 
174  return p_batchList.size();
175  };
176 
182  bool IsInteractive() {
183  return p_gui != NULL;
184  };
185 
191  int ParentId() {
192  return p_parentId;
193  };
194 
198  Gui *TheGui() {
199  return p_gui;
200  };
201 
202  QString GetInfoFileName();
203  bool GetInfoFlag();
204 
205  void SetBatchList(int i);
206  void SetErrorList(int i);
207 
208  void SaveHistory();
209 
210  private:
211  void loadBatchList(const QString file);
212  void loadCommandLine(int argc, char *argv[]);
213  void loadHistory(const QString file);
214 
215  void evaluateOption(const QString name, const QString value);
216  void getNextParameter(unsigned int &curPos,
217  QString &unresolvedParam,
218  std::vector<QString> &value);
219  void preProcess(QString fullReservedName, std::vector<QString> &reservedParams);
220  std::vector<QString> readArray(QString arrayString);
221  QString resolveParameter(QString &name,
222  std::vector<QString> &reservedParams,
223  bool handleNoMatches = true);
224 
226  bool p_abortOnError;
228  std::vector<std::vector<QString> > p_batchList;
230  std::vector<char *> p_cmdline;
232  QString p_errList;
234  Gui *p_gui;
236  bool p_info;
238  QString p_infoFileName;
240  bool p_interactive;
242  int p_parentId;
244  QString p_progName;
246  QString p_saveFile;
247  };
248 };
249 
250 #endif
QString name
Definition: IsisAmlData.h:144
bool IsInteractive()
Indicates if the Isis Graphical User Interface is operating.
Definition: UserInterface.h:182
Gui * TheGui()
Definition: UserInterface.h:198
int BatchListSize()
Returns the size of the batchlist.
Definition: UserInterface.h:173
QString GetInfoFileName()
This method returns the filename where the debugging info is stored when the &quot;-info&quot; 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:191
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:152
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:152
bool AbortOnError()
Returns true if the program should abort on error, and false if it should continue.
Definition: UserInterface.h:163
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:86
UserInterface(const QString &xmlfile, int &argc, char *argv[])
Constructs an UserInterface object.
Definition: UserInterface.cpp:52

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:30:49