Isis 3 Programmer Reference
|
Command Line and Xml loader, validation, and access. More...
#include <UserInterface.h>
Public Member Functions | |
UserInterface (const QString &xmlfile, int &argc, char *argv[]) | |
Constructs an UserInterface object. | |
UserInterface (const QString &xmlfile, QVector< QString > &args) | |
Constructs an UserInterface object. | |
~UserInterface () | |
Destroys the UserInterface object. | |
bool | AbortOnError () |
Returns true if the program should abort on error, and false if it should continue. | |
int | BatchListSize () |
Returns the size of the batchlist. | |
bool | IsInteractive () |
Indicates if the Isis Graphical User Interface is operating. | |
int | ParentId () |
Returns the parent id. | |
Gui * | TheGui () |
QString | GetParamPreference () |
Get the the preference path passed in by the user. | |
QString | GetInfoFileName () |
This method returns the filename where the debugging info is stored when the "-info" tag is used. | |
bool | GetInfoFlag () |
This method returns the flag state of info. | |
QString | BuildNewCommandLineFromPvl (Pvl temp) |
void | SetBatchList (int i) |
Clears the gui parameters and sets the batch list information at line i as the new parameters. | |
void | SetErrorList (int i) |
This method adds the line specified in the BatchList that the error occured on. | |
void | SaveHistory () |
Saves the user parameter information in the history of the program for later use. | |
void | PutAsString (const QString ¶mName, const QString &value) |
Allows the insertion of a value for any parameter. | |
void | PutAsString (const QString ¶mName, const std::vector< QString > &value) |
void | PutFileName (const QString ¶mName, const QString &value) |
Allows the insertion of a value for a parameter of type "filename". | |
void | PutFileName (const QString ¶mName, const std::vector< QString > &value) |
void | PutCubeName (const QString ¶mName, const QString &value) |
Allows the insertion of a value for a parameter of type "cubename". | |
void | PutDouble (const QString ¶mName, const double &value) |
Allows the insertion of a value for a parameter of type "double". | |
void | PutDouble (const QString ¶mName, const std::vector< double > &value) |
void | PutInteger (const QString ¶mName, const int &value) |
Allows the insertion of a value for a parameter of type "integer". | |
void | PutInteger (const QString ¶mName, const std::vector< int > &value) |
void | PutBoolean (const QString ¶mName, const bool &value) |
Allows the insertion of a value for a parameter of type "boolean". | |
void | PutBoolean (const QString ¶mName, const std::vector< bool > &value) |
void | PutString (const QString ¶mName, const QString &value) |
Allows the insertion of a value for any parameter. | |
void | PutString (const QString ¶mName, const std::vector< QString > &value) |
QString | GetAsString (const QString ¶mName) const |
Allows the retrieval of a value for a parameter of any type. | |
void | GetAsString (const QString ¶mName, std::vector< QString > &values) const |
QString | GetFileName (const QString ¶mName, QString extension="") const |
Allows the retrieval of a value for a parameter of type "filename". | |
void | GetFileName (const QString ¶mName, std::vector< QString > &values) const |
QString | GetCubeName (const QString ¶mName, QString extension="") const |
Retrieves of a value for a parameter of type "cubename". | |
QString | GetString (const QString ¶mName) const |
Allows the retrieval of a value for a parameter of type "string". | |
void | GetString (const QString ¶mName, std::vector< QString > &values) const |
int | GetInteger (const QString ¶mName) const |
Allows the retrieval of a value for a parameter of type "integer". | |
void | GetInteger (const QString ¶mName, std::vector< int > &values) const |
bool | GetBoolean (const QString ¶mName) const |
Allows the retrieval of a value for a parameter of type "boolean". | |
void | GetBoolean (const QString ¶mName, std::vector< bool > &values) const |
double | GetDouble (const QString ¶mName) const |
Allows the retrieval of a value for a parameter of type "double". | |
void | GetDouble (const QString ¶mName, std::vector< double > &values) const |
bool | WasEntered (const QString ¶mName) const |
Returns a true if the parameter has a value, and false if it does not. | |
void | Clear (const QString ¶mName) |
Clears the value(s) in the named parameter. | |
Isis::CubeAttributeInput & | GetInputAttribute (const QString ¶mName) |
Gets the attributes for an input cube. | |
Isis::CubeAttributeOutput & | GetOutputAttribute (const QString ¶mName) |
Gets the attributes for an output cube. | |
QString | ProgramName () const |
Returns the Program name. | |
QString | Brief () const |
Returns the brief description of the program. | |
QString | Description () const |
Returns the full description of the program. | |
int | NumGroups () const |
Returns the number of groups found in the XML. | |
QString | GroupName (const int &group) const |
Returns the group name of group[index]. | |
int | GroupIndex (const QString &grpName) const |
Given the group name get its index in group array. | |
nlohmann::json | GetParams () |
Creates a json object which could be used as a command line. | |
int | NumParams (const int &) const |
Returns the number of parameters in a group. | |
QString | ParamName (const int &group, const int ¶m) const |
Returns the parameter name. | |
QString | ParamType (const int &group, const int ¶m) const |
Returns the parameter type of a parameter in a specified group. | |
QString | ParamBrief (const int &group, const int ¶m) const |
Returns the brief description of a parameter in a specified group. | |
QString | ParamDescription (const int &group, const int ¶m) const |
Returns the long description of a parameter in a specified group. | |
QString | ParamMinimum (const int &group, const int ¶m) const |
Returns the minimum value of a parameter in a specified group. | |
QString | ParamMinimumInclusive (const int &group, const int ¶m) const |
Returns whether the minimum value is inclusive or not. | |
QString | ParamMaximum (const int &group, const int ¶m) const |
Returns the maximum value of a parameter in a specified group. | |
QString | ParamMaximumInclusive (const int &group, const int ¶m) const |
Returns whether the maximum value is inclusive or not. | |
QString | ParamOdd (const int &group, const int ¶m) const |
Returns whether the selected parameter has a restriction on odd values or not. | |
int | ParamGreaterThanSize (const int &group, const int ¶m) const |
Returns the number of values in the parameters greater than list. | |
int | ParamGreaterThanOrEqualSize (const int &group, const int ¶m) const |
Returns the number of values in the parameters greater than or equal list. | |
int | ParamLessThanSize (const int &group, const int ¶m) const |
Returns the number of values in the parameters less than list. | |
int | ParamLessThanOrEqualSize (const int &group, const int ¶m) const |
Returns the number of values in the parameters less than or equal list. | |
int | ParamNotEqualSize (const int &group, const int ¶m) const |
Returns the number of values in the not equal list. | |
QString | ParamGreaterThan (const int &group, const int ¶m, const int &great) const |
Returns the name of the specified greaterThan parameter. | |
QString | ParamGreaterThanOrEqual (const int &group, const int ¶m, const int &great) const |
Returns the name of the specified greaterThanOrEqual parameter. | |
QString | ParamLessThan (const int &group, const int ¶m, const int &great) const |
Returns the name of the specified lessThan parameter. | |
QString | ParamLessThanOrEqual (const int &group, const int ¶m, const int &les) const |
Returns the name of the specified lessThanOrEqual parameter. | |
QString | ParamNotEqual (const int &group, const int ¶m, const int ¬Eq) const |
Returns the name of the specified notEqual parameter. | |
int | ParamListSize (const int &group, const int ¶m) const |
Returns the number of options in the specified parameter's list. | |
QString | ParamListValue (const int &group, const int ¶m, const int &option) const |
Returns the option value for a specific option to a parameter. | |
QString | ParamListBrief (const int &group, const int ¶m, const int &option) const |
Returns the brief description for a specific option to a parameter. | |
QString | ParamListDescription (const int &group, const int ¶m, const int &option) const |
Returns the full description for a specific option to a parameter. | |
int | ParamListExcludeSize (const int &group, const int ¶m, const int &option) const |
Returns the number of items in a parameters list exclude section. | |
QString | ParamListExclude (const int &group, const int ¶m, const int &option, const int &exclude) const |
Returns the parameter name to be excluded if this option is selected. | |
int | ParamListIncludeSize (const int &group, const int ¶m, const int &option) const |
Returns the number of items in a parameters list include section. | |
QString | ParamListInclude (const int &group, const int ¶m, const int &option, const int &include) const |
Returns the parameter name to be included if this option is selected. | |
QString | ParamDefault (const int &group, const int ¶m) const |
Returns the default for a parameter in a specified group. | |
QString | ParamInternalDefault (const int &group, const int ¶m) const |
Returns the internal default for a parameter in a specified group. | |
QString | ParamFilter (const int &group, const int ¶m) const |
Returns the parameter filter for a parameter in a specified group. | |
QString | ParamPath (const int &group, const int ¶m) const |
Returns the default path for a filename/cube parameter. | |
QString | ParamFileMode (const int &group, const int ¶m) const |
Returns the file mode for a parameter in a specified group. | |
int | ParamExcludeSize (const int &group, const int ¶m) const |
Returns the number of parameters excluded in this parameter's exclusions. | |
QString | ParamExclude (const int &group, const int ¶m, const int &exclude) const |
Returns the name of the specified excluded parameter. | |
int | ParamIncludeSize (const int &group, const int ¶m) const |
Returns the number of parameters included in this parameter's inclusions. | |
QString | ParamInclude (const int &group, const int ¶m, const int &include) const |
Returns the name of the specified included parameter. | |
QString | PixelType (const int &group, const int ¶m) const |
Returns the default pixel type from the XML. | |
int | HelpersSize (const int &group, const int ¶m) const |
Returns the number of helpers the parameter has. | |
QString | HelperButtonName (const int &group, const int ¶m, const int &helper) const |
Returns the name of the helper button. | |
QString | HelperFunction (const int &group, const int ¶m, const int &helper) const |
Returns the name of the helper function. | |
QString | HelperBrief (const int &group, const int ¶m, const int &helper) const |
Returns the brief description of the helper button. | |
QString | HelperDescription (const int &group, const int ¶m, const int &helper) const |
Returns the long description of the helper button. | |
QString | HelperIcon (const int &group, const int ¶m, const int &helper) const |
Returns the name of the icon for the helper button. | |
bool | IsParamInPvlInclude (QString ¶mName, std::vector< QString > &exclude) |
Verify whether Parameter name is in the Include list Used in creation of DefFile. | |
void | CreatePVL (Isis::Pvl &pvlDef, QString guiGrpName, QString pvlObjName, QString pvlGrpName, std::vector< QString > &exclude) |
Create Pvl with the parameters in a user defined group given the Pvl object and group name. | |
void | VerifyAll () |
Verify all parameters. | |
bool | StringToBool (QString value) const |
Returns a boolean value based on the QString contents. | |
void | CommandLine (Isis::Pvl &lab) const |
Creates a QString which could be used as a command line. | |
QString | Version () const |
Returns the application version date. | |
Protected Member Functions | |
const IsisParameterData * | ReturnParam (const QString ¶mName) const |
Returns a pointer to a parameter whose name starts with paramName. | |
Protected Attributes | |
QString | name |
QString | brief |
QString | description |
std::vector< IsisGroupData > | groups |
std::vector< QString > | categorys |
std::vector< IsisChangeData > | changes |
Private Member Functions | |
void | loadBatchList (const QString file) |
Loads the user entered batchlist file into a private variable for later use. | |
void | loadCommandLine (QVector< QString > &args, bool ignoreAppName=true) |
This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv. | |
void | loadCommandLine (int argc, char *argv[]) |
This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv. | |
void | loadHistory (const QString file) |
Loads the previous history for the program. | |
void | evaluateOption (const QString name, const QString value) |
This interprets the "-" options for reserved parameters. | |
void | getNextParameter (unsigned int &curPos, QString &unresolvedParam, std::vector< QString > &value) |
This gets the next parameter in the list of arguments. | |
void | preProcess (QString fullReservedName, std::vector< QString > &reservedParams) |
This parses the command line and looks for the specified reserved parameter name passed. | |
std::vector< QString > | readArray (QString arrayString) |
This interprets an array value from the command line. | |
QString | resolveParameter (QString &name, std::vector< QString > &reservedParams, bool handleNoMatches=true) |
This resolves a reserved parameter token on the command line to its fullname. | |
void | StartParser (const char *xmlfile) |
Starts parsing an application xml file. | |
void | Verify (const IsisParameterData *param) |
Throws an Isis::iExceptionXxxxxxxx if the parameter value(s) is invalid. | |
void | CheckFileNamePreference (QString filename, QString paramname) |
This method checks whether the user preferences are set to allow overwrites of existing files. | |
Private Attributes | |
bool | p_abortOnError |
Boolean value representing whether to abort or continue on error. | |
std::vector< std::vector< QString > > | p_batchList |
Vector of batchlist data. | |
std::vector< char * > | p_cmdline |
This variable will contain argv. | |
QString | p_errList |
FileName to write batchlist line that caused error on. | |
Gui * | p_gui |
Pointer to the gui object. | |
bool | p_info |
Boolean value representing if it's in debug mode. | |
QString | p_infoFileName |
FileName to save debugging info. | |
bool | p_interactive |
Boolean value representing whether the program is interactive or not. | |
int | p_parentId |
This is a status to indicate if the GUI is running or not. | |
QString | p_progName |
Name of program to run. | |
QString | p_saveFile |
FileName to save last history to. | |
QString | p_preference |
XERCES::SAX2XMLReader * | parser |
The XML file parser. | |
IsisXMLApplication * | appHandler |
The application handler. | |
Command Line and Xml loader, validation, and access.
This object is used to load and query user input via the command line. It requires as input to the constructor 1) an Isis Application Xml file and 2) the command line arguments (argc and argv). The Xml file will be used to validate the user input given on the command line (if any). To access user input see the Aml class which is inherited.
2002-10-25 Jeff Anderson - Command line mode was not fully verifying the AML object. Invoked the VerifyAll method after loading each of the command line tokens.
2003-02-07 Jeff Anderson - Modified constructor so that it will not start the GUI if the program name is unitTest.
2003-02-12 Jeff Anderson - Strip off leading directory in front of argv[0] so that unit tests run with pathnames do not start the Isis Gui.
2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...
2003-12-16 Jeff Anderson - Added command line option -LAST and RESTORE=file.par
2004-02-26 Jeff Anderson - Added command line option -HELP
2004-02-26 Jeff Anderson - Modified to allow a parameter to appear multiple times on the command line
2004-02-29 Jeff Anderson - Added the -PID command line switch which allows interprocess communication to occur with the parent so that the parents GUI can be properly updated.
2005-02-22 Elizabeth Ribelin - Modified file to support Doxygen documentation
2005-10-03 Elizabeth Miller - changed
2005-12-21 Elizabeth Miller - Added command line options -BATCHLIST, -SAVE, -ERRLIST, -ONERROR, -PREFERENCE, and -PRINTFILE
2006-01-23 Elizabeth Miller - Renamed -HELP to -WEBHELP and made it accept abbreviations of reserve params
2007-07-12 Steven Koechle - Added -NOGUI flag
2007-10-04 Steven Koechle - Added -info flag. Debugging option to create a log of system info.
2008-02-22 Steven Koechle - Modified batchlist to take tab, command, and space characters as delimiters but also allow special cases like tab, as a single delimiter leaves quoted strings alone.
2008-04-16 Steven Lambright - Moved parameter verification call
2008-06-06 Steven Lambright - Changed corrupt history file message
2008-06-18 Steven Lambright - Fixed documentation
2008-09-23 Christopher Austin - Added a try/catch to SaveHistory(), where if the history file is corrupt, it simply overwrites it with the new single valid entry.
2008-01-07 Steven Lambright - Changed unit test and error on invalid parameter history files to conform with a FileName class change where expanded(...) always returns a full path.
2009-08-17 Steven Lambright - Parameters are now more correctly interpretted from argv resulting in fewer escape characters and problems such as " " (2 spaces) being interpretted properly. Array parameter values support improved.
2009-11-19 Kris Becker - Made argc pass by reference since Qt's QApplication/QCoreApplication requires it
2010-03-26 Sharmila Prasad - Remove the restriction of the number of columns in the batchlist file to 10.
2010-05-28 Steven Lambright - History fails silently now
2010-07-20 Steven Lambright - Array format on the command line is more tolerant to white space now.
2010-07-28 Steven Lambright - Fixed complicated escape sequence cases on array format parsing that have existed for a while now
2010-07-28 Christopher Austin - Fixed a -LAST issue causing IsisAml to throw an incorrect exception.
2010-10-28 Mackenzie Boyd - Modified error messages in LoadHistory()\
2011-08-19 Jeannie Backer - Modified unitTest to use $temporary variable instead of /tmp directory.
2011-08-31 Jai Rideout and Steven Lambright - Loading the history with -last no longer causes us to call PutAsString for parameters which match the defaults. This fixes an issue with the new spiceinit GUI with "WEB" added... -last would always throw an error.
2011-09-21 Steven Lambright - When the -batchlist does not understand a variable it would crash. This prevented users from entering variables like $base, $mro, etc. Now when -batchlist does not understand a variable it preserves it in the parameter list. Fixes #365.
2014-06-09 Ian Humphrey - Added PreProcess() and ResolveParameter() functions to replace redundant code in LoadCommandLine(). These functions evaulate -HELP and -WEBHELP flags regardless of errors on commandline. Fixes #552.
2014-06-10 Ian Humphrey - Fixed issue causing parameter name values on the -HELP flag to only evaluate if uppercase. Fixes #1735. Reorganized header and cpp layout. Renamed private member functions to follow code convention. Began modifying unitTest.cpp.
2014-06-11 Ian Humphrey - Added throws to evaluateOption() so that if the parameter is -HELP or -WEBHELP unitTest.cpp can catch and continue running.
2014-06-12 Ian Humphrey - Modified logic in loadCommandLine() throw statements so an exception is thrown when -BATCHLIST is used with -GUI, -SAVE, -LAST, or -RESTORE options. Added bool usedDashRestore.
2014-06-17 Ian Humphrey - Added to unitTest.xml to test -HELP=value. Renamed application name from 'hist' to 'unitTest'. Modified logic of resolveParameter() to give appropriate error message to user when using an invalid reserved parameter (e.g. -x).
2014-06-18 Ian Humphrey - Finished developing unitTest.cpp and reorganized. Added lacking [at]throws documentation to UserInterface.cpp.
2016-04-05 Jesse Mapel - Changed bad histroy file error message to reflect that the history file could be for a different application. Fixes #2366
2018-04-20 Adam Goins - Modified loadHistory() to print out the last command so that users can see the actual command that the -last arg loads. Fixes #4779.
2021-06-05 Kris Becker - Fixed path to ISIS documentation when -WEBHELP is used
Definition at line 139 of file UserInterface.h.
Isis::UserInterface::UserInterface | ( | const QString & | xmlfile, |
int & | argc, | ||
char * | argv[] ) |
Constructs an UserInterface object.
xmlfile | Name of the Isis application xml file to open. |
argc | Number of arguments on the command line. Must be pass by reference!! |
argv[] | Array of arguments |
Definition at line 71 of file UserInterface.cpp.
References Isis::Gui::checkX11(), Isis::FileName::dir(), loadCommandLine(), p_abortOnError, p_errList, p_gui, p_info, p_infoFileName, p_interactive, p_parentId, and p_saveFile.
Isis::UserInterface::UserInterface | ( | const QString & | xmlfile, |
QVector< QString > & | args ) |
Constructs an UserInterface object.
xmlfile | Name of the Isis application xml file to open. |
argc | Number of arguments on the command line. Must be pass by reference!! |
argv[] | Array of arguments |
Definition at line 35 of file UserInterface.cpp.
References Isis::FileName::dir(), loadCommandLine(), p_abortOnError, p_errList, p_gui, p_info, p_infoFileName, p_interactive, p_parentId, and p_saveFile.
Isis::UserInterface::~UserInterface | ( | ) |
Destroys the UserInterface object.
Definition at line 106 of file UserInterface.cpp.
References p_gui.
|
inline |
Returns true if the program should abort on error, and false if it should continue.
Definition at line 151 of file UserInterface.h.
References p_abortOnError.
Referenced by Isis::Application::Run().
|
inline |
Returns the size of the batchlist.
If there is no batchlist, it will return 0
Definition at line 161 of file UserInterface.h.
References p_batchList.
Referenced by loadCommandLine(), and Isis::Application::Run().
|
inherited |
Returns the brief description of the program.
Definition at line 1144 of file IsisAml.cpp.
Referenced by Isis::Application::History().
QString Isis::UserInterface::BuildNewCommandLineFromPvl | ( | Pvl | temp | ) |
Definition at line 546 of file UserInterface.cpp.
|
privateinherited |
This method checks whether the user preferences are set to allow overwrites of existing files.
It should be called if the parameter is an output and the given file name exists.
filename | Name of the file to be overwritten. |
paramname | Name of the output file parameter. |
iException::User | - "The file already exists. The user preference file customization group is set to disallow file overwrites." |
iException::User | - "Invalid entry in user preference file FileCustomization group." |
Definition at line 2555 of file IsisAml.cpp.
References Isis::IException::User.
Referenced by IsisAml::Verify().
|
inherited |
Clears the value(s) in the named parameter.
paramName | The name of the parameter to clear |
Definition at line 2037 of file IsisAml.cpp.
References IsisAml::ReturnParam().
Referenced by loadCommandLine(), and SetBatchList().
|
inherited |
Creates a QString which could be used as a command line.
cont | Pvl to put command line information in |
Definition at line 3099 of file IsisAml.cpp.
References Isis::PvlContainer::deleteKeyword(), IsisAml::GetAsString(), Isis::PvlContainer::hasKeyword(), IsisAml::ParamName(), IsisAml::ReturnParam(), Isis::IString::Trim(), and Isis::IString::UpCase().
Referenced by Isis::Application::History(), loadCommandLine(), and SaveHistory().
|
inherited |
Create Pvl with the parameters in a user defined group given the Pvl object and group name.
Create a PVL file from the parameters in a Group given the Gui group name, Pvl Object and Group names and the list of parameters to be included in the Pvl.
pvlDef | - output PVL |
guiGrpName | - Gui Group name |
pvlObjName | - output PVL Object name |
pvlGrpName | - output PVL Group name |
include | - vector of parameter names to be part of the output PVL |
Definition at line 1273 of file IsisAml.cpp.
References Isis::IString::DownCase(), IsisAml::GetAsString(), IsisAml::GetBoolean(), IsisAml::GetDouble(), IsisAml::GetInteger(), IsisAml::GroupIndex(), IsisAml::IsParamInPvlInclude(), IsisAml::NumParams(), IsisAml::ParamName(), IsisAml::ParamType(), Isis::toString(), and Isis::IException::User.
|
inherited |
Returns the full description of the program.
Definition at line 1154 of file IsisAml.cpp.
|
private |
This interprets the "-" options for reserved parameters.
name | "-OPTIONNAME" (name of the reserved parameter) |
value | Value of the option, if supplied (-name=value) |
Isis::IException::Programmer | - evaluating -WEBHELP throws an exception when unit testing to avoid exiting from the unit test |
Isis::IException::Programmer | - evaluating -HELP throws an exception when unit testing to avoid exiting from the unit test |
Isis::IException::User | - -ERRLIST expects a file name |
Isis::IException::User | - -ONERROR only accpets CONTINUE and ABORT as valid values |
Isis::IException::Unknown | - -GUI and -PID are incompatible arguments |
Definition at line 669 of file UserInterface.cpp.
References Isis::PvlKeyword::addValue(), loadBatchList(), loadHistory(), Isis::FileName::name(), IsisAml::NumGroups(), IsisAml::NumParams(), p_abortOnError, p_errList, p_info, p_infoFileName, p_interactive, p_parentId, p_progName, p_saveFile, IsisAml::ParamBrief(), IsisAml::ParamDefault(), IsisAml::ParamExclude(), IsisAml::ParamExcludeSize(), IsisAml::ParamGreaterThan(), IsisAml::ParamGreaterThanOrEqual(), IsisAml::ParamGreaterThanOrEqualSize(), IsisAml::ParamGreaterThanSize(), IsisAml::ParamInclude(), IsisAml::ParamIncludeSize(), IsisAml::ParamInternalDefault(), IsisAml::ParamLessThan(), IsisAml::ParamLessThanOrEqual(), IsisAml::ParamLessThanOrEqualSize(), IsisAml::ParamLessThanSize(), IsisAml::ParamListBrief(), IsisAml::ParamListExclude(), IsisAml::ParamListExcludeSize(), IsisAml::ParamListInclude(), IsisAml::ParamListIncludeSize(), IsisAml::ParamListSize(), IsisAml::ParamListValue(), IsisAml::ParamMaximum(), IsisAml::ParamMaximumInclusive(), IsisAml::ParamMinimum(), IsisAml::ParamMinimumInclusive(), IsisAml::ParamName(), IsisAml::ParamNotEqual(), IsisAml::ParamNotEqualSize(), IsisAml::ParamOdd(), IsisAml::ParamType(), Isis::IException::Programmer, IsisAml::ProgramName(), Isis::ProgramLauncher::RunSystemCommand(), Isis::Pvl::setTerminator(), Isis::toInt(), Isis::PvlObject::Traverse, Isis::IException::Unknown, and Isis::IException::User.
Referenced by loadCommandLine(), and preProcess().
|
inherited |
Allows the retrieval of a value for a parameter of any type.
The value will be returned as a QString no matter what the parameter type is.
paramName | The partial or full name of the parameter to be retrieved. |
iException | (IsisProgrammerError) The parameter has no value. |
Definition at line 570 of file IsisAml.cpp.
References Isis::IException::Programmer, and IsisAml::ReturnParam().
Referenced by IsisAml::CommandLine(), IsisAml::CreatePVL(), Isis::GuiParameter::SetToCurrent(), Isis::GuiParameter::Update(), and IsisAml::VerifyAll().
|
inherited |
Allows the retrieval of a value for a parameter of type "boolean".
paramName | The partial or full name of the parameter to be retrieved. |
iException::Programmer | (IsisErrorUser) The parameter has no value. |
Definition at line 1049 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), Isis::toBool(), and Isis::IException::User.
Referenced by IsisAml::CreatePVL().
|
inherited |
Retrieves of a value for a parameter of type "cubename".
paramName | The partial or full name of the parameter to be retrieved. |
extension | A default extension to add if it does not already exist on the file name. For example, "txt" will make /mydir/myfile into /mydir/myfile.txt |
Definition at line 724 of file IsisAml.cpp.
References Isis::FileName::addExtension(), Isis::FileName::attributes(), Isis::FileName::expanded(), Isis::IException::Programmer, IsisAml::ReturnParam(), and Isis::IException::User.
|
inherited |
Allows the retrieval of a value for a parameter of type "double".
paramName | The partial or full name of the parameter to be retrieved. |
iException::Programmer | (IsisErrorUser) The parameter has no value. |
Definition at line 966 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), Isis::IString::ToDouble(), and Isis::IException::User.
Referenced by IsisAml::CreatePVL(), and IsisAml::VerifyAll().
|
inherited |
Allows the retrieval of a value for a parameter of type "filename".
paramName | The partial or full name of the parameter to be retrieved. |
extension | A default extension to add if it does not already exist on the file name. For example, "txt" will make /mydir/myfile into /mydir/myfile.txt |
Definition at line 641 of file IsisAml.cpp.
References Isis::FileName::addExtension(), Isis::FileName::expanded(), Isis::IException::Programmer, IsisAml::ReturnParam(), and Isis::IException::User.
QString Isis::UserInterface::GetInfoFileName | ( | ) |
This method returns the filename where the debugging info is stored when the "-info" tag is used.
Definition at line 120 of file UserInterface.cpp.
References p_infoFileName.
Referenced by Isis::Application::FunctionCleanup(), and Isis::Application::FunctionError().
bool Isis::UserInterface::GetInfoFlag | ( | ) |
This method returns the flag state of info.
This returns if its in debugging mode(the -info tag was specified).
Definition at line 131 of file UserInterface.cpp.
References p_info.
Referenced by Isis::Application::FunctionCleanup(), and Isis::Application::FunctionError().
|
inherited |
Gets the attributes for an input cube.
paramName | The name of the parameter to get the attributes for |
iException::Programmer | "Parameter is not a cube." |
iException::Programmer | "Parameter in not an input cube" |
Definition at line 2059 of file IsisAml.cpp.
References Isis::IException::Programmer, and IsisAml::ReturnParam().
|
inherited |
Allows the retrieval of a value for a parameter of type "integer".
paramName | The partial or full name of the parameter to be retrieved. |
iException::Programmer | (IsisErrorUser) The parameter has no value. |
Definition at line 883 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), Isis::IString::ToInteger(), and Isis::IException::User.
Referenced by IsisAml::CreatePVL(), and IsisAml::VerifyAll().
|
private |
This gets the next parameter in the list of arguments.
curPos will be changed to be the end of the current argument (still needs incremented to get the next argument).
curPos | End of previous argument |
name | Resulting parameter name |
value | Resulting array of parameter values (usually just 1 element) |
Isis::IException::User | - parameters cannot start with "=" |
Definition at line 956 of file UserInterface.cpp.
References p_cmdline, readArray(), and Isis::IException::User.
Referenced by loadCommandLine(), preProcess(), and SetBatchList().
|
inherited |
Gets the attributes for an output cube.
paramName | The name of the parameter to get the attributes for |
iException::Programmer | "Parameter is not a cube" |
iException::Programmer | "Parameter in not an output" |
Definition at line 2105 of file IsisAml.cpp.
References Isis::IException::Programmer, and IsisAml::ReturnParam().
|
inline |
Get the the preference path passed in by the user.
Otherwise an empty string
Definition at line 195 of file UserInterface.h.
|
inherited |
Creates a json object which could be used as a command line.
Definition at line 1205 of file IsisAml.cpp.
References IsisAml::ParamName(), and IsisAml::ReturnParam().
|
inherited |
Allows the retrieval of a value for a parameter of type "string".
paramName | The partial or full name of the parameter to be retrieved. |
iException::Programmer | (IsisErrorUser) The parameter has no value. |
Definition at line 769 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), and Isis::IException::User.
Referenced by IsisAml::VerifyAll().
|
inherited |
Given the group name get its index in group array.
Given group name return its index in the Gui.
grpName |
Definition at line 1191 of file IsisAml.cpp.
References Isis::IString::DownCase().
Referenced by IsisAml::CreatePVL().
|
inherited |
Returns the group name of group[index].
index | The array index of the group. |
Definition at line 1176 of file IsisAml.cpp.
|
inherited |
Returns the brief description of the helper button.
group | The group index |
param | The parameter index |
helper | The helper index |
Definition at line 1977 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers().
|
inherited |
Returns the name of the helper button.
group | The group index |
param | The parameter index |
helper | The helper index |
Definition at line 1947 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers().
|
inherited |
Returns the long description of the helper button.
group | The group index |
param | The parameter index |
helper | The helper index |
Definition at line 1992 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers().
|
inherited |
Returns the name of the helper function.
group | The group index |
param | The parameter index |
helper | The helper index |
Definition at line 1962 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers().
|
inherited |
Returns the name of the icon for the helper button.
group | The group index |
param | The parameter index |
helper | The helper index |
Definition at line 2007 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers().
|
inherited |
Returns the number of helpers the parameter has.
group | The group index |
param | The parameter index |
Definition at line 1933 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::AddHelpers(), and Isis::GuiFileNameParameter::GuiFileNameParameter().
|
inline |
Indicates if the Isis Graphical User Interface is operating.
Definition at line 170 of file UserInterface.h.
References p_gui.
Referenced by Isis::Application::Application(), Isis::Application::FunctionCleanup(), Isis::Application::FunctionError(), Isis::Application::History(), Isis::Application::ProcessGuiEvents(), Isis::Application::Run(), Isis::Application::UpdateProgress(), and Isis::Application::UpdateProgress().
|
inherited |
Verify whether Parameter name is in the Include list Used in creation of DefFile.
Verify if the Parameter is in the Included list.
paramName | - parameter name |
include | - include list |
Definition at line 1331 of file IsisAml.cpp.
References Isis::IString::DownCase().
Referenced by IsisAml::CreatePVL().
|
private |
Loads the user entered batchlist file into a private variable for later use.
file | The batchlist file to load |
Isis::IException::User | - The batchlist file could not be opened |
Isis::IException::User | - The number of columns in the batchlist file must be consistent |
Isis::IException::User | - The batchlist does not contain any data |
Definition at line 323 of file UserInterface.cpp.
References Isis::IString::Compress(), Isis::TextFile::Open(), p_batchList, Isis::IString::Replace(), Isis::IString::ToQt(), and Isis::IException::User.
Referenced by evaluateOption().
|
private |
This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv.
argc | Number of arguments on the command line |
argv[] | Array of arguments |
Isis::IException::User | - Invalid value for reserve parameter |
Isis::IException::User | - Invalid command line |
Isis::IException::User | - -BATCHLIST cannot be used with -GUI, -SAVE, -RESTORE, or -LAST |
Isis::IException::User | - -ERRLIST and -ONERROR=continue cannot be used without -BATCHLIST |
Definition at line 424 of file UserInterface.cpp.
References BatchListSize(), IsisAml::Clear(), IsisAml::CommandLine(), evaluateOption(), getNextParameter(), p_abortOnError, p_cmdline, p_errList, p_interactive, p_progName, p_saveFile, preProcess(), IsisAml::PutAsString(), resolveParameter(), and Isis::IException::User.
|
private |
This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv.
args | QVector of arguments |
Isis::IException::User | - Invalid value for reserve parameter |
Isis::IException::User | - Invalid command line |
Isis::IException::User | - -BATCHLIST cannot be used with -GUI, -SAVE, -RESTORE, or -LAST |
Isis::IException::User | - -ERRLIST and -ONERROR=continue cannot be used without -BATCHLIST |
Definition at line 391 of file UserInterface.cpp.
References loadCommandLine().
Referenced by loadCommandLine(), UserInterface(), and UserInterface().
|
private |
Loads the previous history for the program.
file | FileName to get the history entry from |
Isis::IException::User | - The file does not contain any parameters to restore |
Isis::IException::User | - The file does not contain a valid parameter history file |
Isis::IException::User | - Parameter history file does not exist |
Definition at line 571 of file UserInterface.cpp.
References Isis::PvlContainer::name(), Isis::PvlObject::object(), p_progName, IsisAml::ProgramName(), IsisAml::PutAsString(), IsisAml::ReturnParam(), and Isis::IException::User.
Referenced by evaluateOption().
|
inherited |
Returns the number of groups found in the XML.
Definition at line 1164 of file IsisAml.cpp.
Referenced by evaluateOption(), and SetBatchList().
|
inherited |
Returns the number of parameters in a group.
group | The group to measure. |
Definition at line 1349 of file IsisAml.cpp.
Referenced by IsisAml::CreatePVL(), evaluateOption(), and SetBatchList().
|
inherited |
Returns the brief description of a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1376 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the default for a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1668 of file IsisAml.cpp.
Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().
|
inherited |
Returns the long description of a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1390 of file IsisAml.cpp.
|
inherited |
Returns the name of the specified excluded parameter.
group | The group index |
param | The parameter index |
exclude | The exclude index |
Definition at line 1623 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of parameters excluded in this parameter's exclusions.
group | The group index |
param | The parameter index |
Definition at line 1894 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the file mode for a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1748 of file IsisAml.cpp.
Referenced by Isis::GuiCubeParameter::SelectAttribute(), and Isis::GuiFileNameParameter::SelectFile().
|
inherited |
Returns the parameter filter for a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1708 of file IsisAml.cpp.
Referenced by Isis::GuiFileNameParameter::SelectFile().
|
inherited |
Returns the name of the specified greaterThan parameter.
group | The group index |
param | The parameter index |
great | The greaterThan index |
Definition at line 1543 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the name of the specified greaterThanOrEqual parameter.
group | The group index |
param | The parameter index |
great | The greaterThanOrEqual index |
Definition at line 1559 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of values in the parameters greater than or equal list.
group | The group index |
param | The parameter index |
Definition at line 1488 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of values in the parameters greater than list.
group | The group index |
param | The parameter index |
Definition at line 1475 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the name of the specified included parameter.
group | The group index |
param | The parameter index |
include | The include index |
Definition at line 1639 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of parameters included in this parameter's inclusions.
group | The group index |
param | The parameter index |
Definition at line 1907 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the internal default for a parameter in a specified group.
.
group | The group index |
param | The parameter index |
Definition at line 1688 of file IsisAml.cpp.
Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiParameter::IsModified(), Isis::GuiFileNameParameter::SelectFile(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().
|
inherited |
Returns the name of the specified lessThan parameter.
group | The group index |
param | The parameter index |
les | The lessThan index |
Definition at line 1575 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the name of the specified lessThanOrEqual parameter.
group | The group index |
param | The parameter index |
les | The lessThanOrEqual index |
Definition at line 1591 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of values in the parameters less than or equal list.
group | The group index |
param | The parameter index |
Definition at line 1515 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of values in the parameters less than list.
group | The group index |
param | The parameter index |
Definition at line 1502 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the brief description for a specific option to a parameter.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
Definition at line 1799 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the full description for a specific option to a parameter.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
Definition at line 1815 of file IsisAml.cpp.
|
inherited |
Returns the parameter name to be excluded if this option is selected.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
exclude | The exclusion number within the parameters list. |
Definition at line 1847 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the number of items in a parameters list exclude section.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
Definition at line 1831 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the parameter name to be included if this option is selected.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
include | The inclusion number within the parameters list. |
Definition at line 1879 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the number of items in a parameters list include section.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
Definition at line 1863 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the number of options in the specified parameter's list.
group | The group index |
param | The parameter index |
Definition at line 1769 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the option value for a specific option to a parameter.
group | The group index |
param | The parameter index |
option | The option number within the parameters list. |
Definition at line 1783 of file IsisAml.cpp.
Referenced by evaluateOption().
|
inherited |
Returns the maximum value of a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1418 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns whether the maximum value is inclusive or not.
group | The group index |
param | The parameter index |
Definition at line 1446 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the minimum value of a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1404 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns whether the minimum value is inclusive or not.
group | The group index |
param | The parameter index |
Definition at line 1432 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the parameter name.
group | The group index where the parameter can be found. |
param | The index of the parameter to name. |
Definition at line 1362 of file IsisAml.cpp.
Referenced by IsisAml::CommandLine(), IsisAml::CreatePVL(), evaluateOption(), IsisAml::GetParams(), Isis::GuiParameter::GuiParameter(), Isis::GuiCubeParameter::SelectAttribute(), and SetBatchList().
|
inherited |
Returns the name of the specified notEqual parameter.
group | The group index |
param | The parameter index |
notEq | The notEqual index |
Definition at line 1607 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the number of values in the not equal list.
group | The group index |
param | The parameter index |
Definition at line 1529 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns whether the selected parameter has a restriction on odd values or not.
group | The group index |
param | The parameter index |
Definition at line 1461 of file IsisAml.cpp.
Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inherited |
Returns the default path for a filename/cube parameter.
group | The group index |
param | The parameter index |
Definition at line 1728 of file IsisAml.cpp.
Referenced by Isis::GuiFileNameParameter::SelectFile().
|
inherited |
Returns the parameter type of a parameter in a specified group.
group | The group index |
param | The parameter index |
Definition at line 1654 of file IsisAml.cpp.
Referenced by IsisAml::CreatePVL(), evaluateOption(), and Isis::GuiParameter::GuiParameter().
|
inline |
Returns the parent id.
Definition at line 179 of file UserInterface.h.
References p_parentId.
Referenced by Isis::Application::HasParent().
|
inherited |
Returns the default pixel type from the XML.
group | The group index |
param | The parameter index |
Definition at line 1920 of file IsisAml.cpp.
Referenced by Isis::GuiParameter::GuiParameter(), and Isis::GuiCubeParameter::SelectAttribute().
|
private |
This parses the command line and looks for the specified reserved parameter name passed.
Resolves and evaluates the passed reserved parameter. This method ignores invalid parameters (
Example: preProcess("-HELP", options) will try to resolve any reserved parameters and will evaluate if one resolves to -HELP.
fullReservedName | the full name of reserved parameter being looked for |
reservedParams | the list of reserved parameters for resolving parameter name |
Definition at line 1043 of file UserInterface.cpp.
References evaluateOption(), getNextParameter(), p_cmdline, and resolveParameter().
Referenced by loadCommandLine().
|
inherited |
Returns the Program name.
Definition at line 1133 of file IsisAml.cpp.
Referenced by evaluateOption(), Isis::Application::History(), loadHistory(), SaveHistory(), and Isis::Application::UpdateProgress().
|
inherited |
Allows the insertion of a value for any parameter.
No validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The QString representation of the value to be placed in the parameters value data member. For parameters of type integer, the QString must be convertable to an integer. For parameters of type double, the QString must be convertable to a double. For parameters of type boolean, the QString must be one of: (TRUE, FALSE, YES, NO, or a partial match of any of these beginning with the first character). |
IException | The parameter already has a value in its "value" data member.Overwriting an existing value is not allowed. Use "Clear" to erase all values in the value data member instead of overwriting an existing value. |
Definition at line 68 of file IsisAml.cpp.
References IsisAml::ReturnParam(), and Isis::IException::User.
Referenced by loadCommandLine(), loadHistory(), and SetBatchList().
|
inherited |
Allows the insertion of a value for a parameter of type "boolean".
A validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The boolean value to be placed in the boolean's value data member. |
iException | (IsisProgrammerError) The parameter already has a value in its "value" data member.Overwriting an existing value is not allowed. Use "Clear" to erase all values in the value data member instead of overwriting an existing value. |
iException | (IsisProgrammerError) The parameter is not of type "boolean". |
Definition at line 479 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), and IsisAml::Verify().
|
inherited |
Allows the insertion of a value for a parameter of type "cubename".
A validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The QString representation of the value to be placed in the cubename's value data member. |
Definition at line 273 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), and IsisAml::Verify().
|
inherited |
Allows the insertion of a value for a parameter of type "double".
A validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The double value to be placed in the double's value data member. |
iException | (IsisProgrammerError) The parameter already has a value in its "value" data member.Overwriting an existing value is not allowed. Use "Clear" to erase all values in the value data member instead of overwriting an existing value. |
iException | (IsisProgrammerError) The parameter is not of type "double". |
Definition at line 395 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), Isis::toString(), and IsisAml::Verify().
|
inherited |
Allows the insertion of a value for a parameter of type "filename".
A validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The QString representation of the value to be placed in the filename's value data member. |
Definition at line 198 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), and IsisAml::Verify().
|
inherited |
Allows the insertion of a value for a parameter of type "integer".
A validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The integer value to be placed in the integer's value data member. |
iException | (IsisProgrammerError) The parameter is not of type "int". |
Definition at line 311 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), Isis::toString(), and IsisAml::Verify().
|
inherited |
Allows the insertion of a value for any parameter.
No validity check is performed on the value passed in.
paramName | The partial or full name of the parameter to be modified. |
value | The QString representation of the value to be placed in the parameters value data member. For parameters of type integer, the QString must be convertable to an integer. For parameters of type double, the QString must be convertable to a double. For parameters of type boolean, the QString must be one of: (TRUE, FALSE, YES, NO, or a partial match of any of these beginning with the first character). |
Definition at line 131 of file IsisAml.cpp.
References Isis::IException::Programmer, IsisAml::ReturnParam(), and IsisAml::Verify().
|
private |
This interprets an array value from the command line.
arrayString | Parameter value containing an array of format (a,b,c) |
Isis::IException::User | - arrays not starting with '(' are invalid |
Isis::IException::User | - arrays ending in a backslash are invalid |
Isis::IException::User | - invalid array format |
Isis::IException::User | - invalid array format |
Definition at line 1089 of file UserInterface.cpp.
References Isis::IException::User.
Referenced by getNextParameter().
|
private |
This resolves a reserved parameter token on the command line to its fullname.
Matches with the list of reserved parameters (options). Resolution necessary for evaluateOption().
Example: an -h token on the command line will resolve to -HELP
unresolvedParam | the parameter name that needs to be resolved |
reservedParams | the list of reserved parameters for resolving parameter name |
handleNoMatches | boolean value defaulted to true for handling invalid reserved parameters |
Isis::IException::User | - unresolved reserved parameter is ambigious |
Isis::IException::User | - reserved parameter cannot be matched (invalid) |
Definition at line 1216 of file UserInterface.cpp.
References Isis::IException::User.
Referenced by loadCommandLine(), and preProcess().
|
protectedinherited |
Returns a pointer to a parameter whose name starts with paramName.
paramName | The name of the parameter to return |
iException::User | (Parameter is not unique) |
iException::User | (Unknown Parameter) |
Definition at line 2152 of file IsisAml.cpp.
References Isis::IString::UpCase(), and Isis::IException::User.
Referenced by IsisAml::Clear(), IsisAml::CommandLine(), IsisAml::GetAsString(), IsisAml::GetBoolean(), IsisAml::GetCubeName(), IsisAml::GetDouble(), IsisAml::GetFileName(), IsisAml::GetInputAttribute(), IsisAml::GetInteger(), IsisAml::GetOutputAttribute(), IsisAml::GetParams(), IsisAml::GetString(), loadHistory(), IsisAml::PutAsString(), IsisAml::PutBoolean(), IsisAml::PutCubeName(), IsisAml::PutDouble(), IsisAml::PutFileName(), IsisAml::PutInteger(), IsisAml::PutString(), IsisAml::VerifyAll(), and IsisAml::WasEntered().
void Isis::UserInterface::SaveHistory | ( | ) |
Saves the user parameter information in the history of the program for later use.
Definition at line 262 of file UserInterface.cpp.
References IsisAml::CommandLine(), p_saveFile, IsisAml::ProgramName(), Isis::Pvl::read(), Isis::toInt(), and Isis::PvlObject::Traverse.
Referenced by Isis::Application::Run().
void Isis::UserInterface::SetBatchList | ( | int | i | ) |
Clears the gui parameters and sets the batch list information at line i as the new parameters.
i | The line number to retrieve parameter information from |
Isis::IException::User | - Invalid command line |
Definition at line 144 of file UserInterface.cpp.
References IsisAml::Clear(), getNextParameter(), IsisAml::NumGroups(), IsisAml::NumParams(), p_batchList, p_cmdline, p_progName, IsisAml::ParamName(), IsisAml::PutAsString(), Isis::toInt(), Isis::IString::Token(), Isis::IString::ToQt(), Isis::IException::User, and IsisAml::VerifyAll().
Referenced by Isis::Application::Run().
void Isis::UserInterface::SetErrorList | ( | int | i | ) |
This method adds the line specified in the BatchList that the error occured on.
The BatchList line is added exactly as it is seen, so the BatchList command can be run on the errorlist file created.
i | The line of the batchlist to write to the error file |
Isis::IException::User | - Unable to create error list - Disk may be full or directory permissions not writeable |
Definition at line 235 of file UserInterface.cpp.
References p_batchList, p_errList, and Isis::IException::User.
Referenced by Isis::Application::Run().
|
privateinherited |
Starts parsing an application xml file.
xmlfile | The xml file to parse |
iException::Programmer | (Error during XML parser initialization) |
Definition at line 3192 of file IsisAml.cpp.
References IsisAml::appHandler, IsisAml::parser, and Isis::IException::Programmer.
Referenced by IsisAml::IsisAml().
|
inherited |
Returns a boolean value based on the QString contents.
value | The value to convert to a boolean |
iException::Programmer | (Invalid boolean value) |
Definition at line 3056 of file IsisAml.cpp.
References Isis::IException::Programmer.
Referenced by IsisAml::Verify(), and IsisAml::VerifyAll().
|
inline |
Definition at line 186 of file UserInterface.h.
References p_gui.
Referenced by Isis::Application::FunctionCleanup(), Isis::Application::FunctionError(), Isis::Application::GuiReportError(), Isis::Application::ProcessGuiEvents(), Isis::Application::Run(), Isis::Application::UpdateProgress(), and Isis::Application::UpdateProgress().
|
privateinherited |
Throws an Isis::iExceptionXxxxxxxx if the parameter value(s) is invalid.
param | The parameter data |
iException::User |
Definition at line 2205 of file IsisAml.cpp.
References IsisAml::CheckFileNamePreference(), Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::IException::Programmer, IsisAml::StringToBool(), Isis::IString::ToDouble(), Isis::toInt(), Isis::IString::ToInteger(), Isis::IString::UpCase(), and Isis::IException::User.
Referenced by IsisAml::PutBoolean(), IsisAml::PutCubeName(), IsisAml::PutDouble(), IsisAml::PutFileName(), IsisAml::PutInteger(), IsisAml::PutString(), and IsisAml::VerifyAll().
|
inherited |
Verify all parameters.
Definition at line 2575 of file IsisAml.cpp.
References IsisAml::GetAsString(), IsisAml::GetDouble(), IsisAml::GetInteger(), IsisAml::GetString(), Isis::IException::Programmer, IsisAml::ReturnParam(), IsisAml::StringToBool(), Isis::IException::User, and IsisAml::Verify().
Referenced by Isis::Application::Run(), and SetBatchList().
|
inherited |
Returns the application version date.
Definition at line 3176 of file IsisAml.cpp.
Referenced by Isis::Application::History().
|
inherited |
Returns a true if the parameter has a value, and false if it does not.
paramName | The name of the parameter to check if it was entered |
Definition at line 2020 of file IsisAml.cpp.
References IsisAml::ReturnParam().
Referenced by Isis::GuiParameter::SetToCurrent(), and Isis::GuiParameter::Update().
|
privateinherited |
The application handler.
Definition at line 350 of file IsisAml.h.
Referenced by IsisAml::StartParser().
|
inherited |
Definition at line 127 of file IsisAmlData.h.
|
inherited |
Definition at line 130 of file IsisAmlData.h.
|
inherited |
Definition at line 131 of file IsisAmlData.h.
|
inherited |
Definition at line 128 of file IsisAmlData.h.
|
inherited |
Definition at line 129 of file IsisAmlData.h.
|
inherited |
Definition at line 126 of file IsisAmlData.h.
|
private |
Boolean value representing whether to abort or continue on error.
Definition at line 228 of file UserInterface.h.
Referenced by AbortOnError(), evaluateOption(), loadCommandLine(), UserInterface(), and UserInterface().
|
private |
Vector of batchlist data.
Definition at line 230 of file UserInterface.h.
Referenced by BatchListSize(), loadBatchList(), SetBatchList(), and SetErrorList().
|
private |
This variable will contain argv.
Definition at line 232 of file UserInterface.h.
Referenced by getNextParameter(), loadCommandLine(), preProcess(), and SetBatchList().
|
private |
FileName to write batchlist line that caused error on.
Definition at line 234 of file UserInterface.h.
Referenced by evaluateOption(), loadCommandLine(), SetErrorList(), UserInterface(), and UserInterface().
|
private |
Pointer to the gui object.
Definition at line 236 of file UserInterface.h.
Referenced by IsInteractive(), TheGui(), UserInterface(), UserInterface(), and ~UserInterface().
|
private |
Boolean value representing if it's in debug mode.
Definition at line 238 of file UserInterface.h.
Referenced by evaluateOption(), GetInfoFlag(), UserInterface(), and UserInterface().
|
private |
FileName to save debugging info.
Definition at line 240 of file UserInterface.h.
Referenced by evaluateOption(), GetInfoFileName(), UserInterface(), and UserInterface().
|
private |
Boolean value representing whether the program is interactive or not.
Definition at line 242 of file UserInterface.h.
Referenced by evaluateOption(), loadCommandLine(), UserInterface(), and UserInterface().
|
private |
This is a status to indicate if the GUI is running or not.
Definition at line 244 of file UserInterface.h.
Referenced by evaluateOption(), ParentId(), UserInterface(), and UserInterface().
|
private |
Definition at line 249 of file UserInterface.h.
|
private |
Name of program to run.
Definition at line 246 of file UserInterface.h.
Referenced by evaluateOption(), loadCommandLine(), loadHistory(), and SetBatchList().
|
private |
FileName to save last history to.
Definition at line 248 of file UserInterface.h.
Referenced by evaluateOption(), loadCommandLine(), SaveHistory(), UserInterface(), and UserInterface().
|
privateinherited |
The XML file parser.
Definition at line 348 of file IsisAml.h.
Referenced by IsisAml::StartParser().