Isis 3 Programmer Reference
Isis::UserInterface Class Reference

Command Line and Xml loader, validation, and access. More...

#include <UserInterface.h>

Inheritance diagram for Isis::UserInterface:
Inheritance graph
Collaboration diagram for Isis::UserInterface:
Collaboration graph

Public Member Functions

 UserInterface (const QString &xmlfile, int &argc, char *argv[])
 Constructs an UserInterface object. More...
 
 UserInterface (const QString &xmlfile, QVector< QString > &args)
 Constructs an UserInterface object. More...
 
 ~UserInterface ()
 Destroys the UserInterface object. More...
 
bool AbortOnError ()
 Returns true if the program should abort on error, and false if it should continue. More...
 
int BatchListSize ()
 Returns the size of the batchlist. More...
 
bool IsInteractive ()
 Indicates if the Isis Graphical User Interface is operating. More...
 
int ParentId ()
 Returns the parent id. More...
 
GuiTheGui ()
 
QString GetInfoFileName ()
 This method returns the filename where the debugging info is stored when the "-info" tag is used. More...
 
bool GetInfoFlag ()
 This method returns the flag state of info. More...
 
void SetBatchList (int i)
 Clears the gui parameters and sets the batch list information at line i as the new parameters. More...
 
void SetErrorList (int i)
 This method adds the line specified in the BatchList that the error occured on. More...
 
void SaveHistory ()
 Saves the user parameter information in the history of the program for later use. More...
 
void PutAsString (const QString &paramName, const QString &value)
 Allows the insertion of a value for any parameter. More...
 
void PutAsString (const QString &paramName, const std::vector< QString > &value)
 
void PutFileName (const QString &paramName, const QString &value)
 Allows the insertion of a value for a parameter of type "filename". More...
 
void PutFileName (const QString &paramName, const std::vector< QString > &value)
 
void PutDouble (const QString &paramName, const double &value)
 Allows the insertion of a value for a parameter of type "double". More...
 
void PutDouble (const QString &paramName, const std::vector< double > &value)
 
void PutInteger (const QString &paramName, const int &value)
 Allows the insertion of a value for a parameter of type "integer". More...
 
void PutInteger (const QString &paramName, const std::vector< int > &value)
 
void PutBoolean (const QString &paramName, const bool &value)
 Allows the insertion of a value for a parameter of type "boolean". More...
 
void PutBoolean (const QString &paramName, const std::vector< bool > &value)
 
void PutString (const QString &paramName, const QString &value)
 Allows the insertion of a value for any parameter. More...
 
void PutString (const QString &paramName, const std::vector< QString > &value)
 
QString GetAsString (const QString &paramName) const
 Allows the retrieval of a value for a parameter of any type. More...
 
void GetAsString (const QString &paramName, std::vector< QString > &values) const
 
QString GetFileName (const QString &paramName, QString extension="") const
 Allows the retrieval of a value for a parameter of type "filename". More...
 
void GetFileName (const QString &paramName, std::vector< QString > &values) const
 
QString GetString (const QString &paramName) const
 Allows the retrieval of a value for a parameter of type "string". More...
 
void GetString (const QString &paramName, std::vector< QString > &values) const
 
int GetInteger (const QString &paramName) const
 Allows the retrieval of a value for a parameter of type "integer". More...
 
void GetInteger (const QString &paramName, std::vector< int > &values) const
 
bool GetBoolean (const QString &paramName) const
 Allows the retrieval of a value for a parameter of type "boolean". More...
 
void GetBoolean (const QString &paramName, std::vector< bool > &values) const
 
double GetDouble (const QString &paramName) const
 Allows the retrieval of a value for a parameter of type "double". More...
 
void GetDouble (const QString &paramName, std::vector< double > &values) const
 
bool WasEntered (const QString &paramName) const
 Returns a true if the parameter has a value, and false if it does not. More...
 
void Clear (const QString &paramName)
 Clears the value(s) in the named parameter. More...
 
Isis::CubeAttributeInputGetInputAttribute (const QString &paramName)
 Gets the attributes for an input cube. More...
 
Isis::CubeAttributeOutputGetOutputAttribute (const QString &paramName)
 Gets the attributes for an output cube. More...
 
QString ProgramName () const
 Returns the Program name. More...
 
QString Brief () const
 Returns the brief description of the program. More...
 
QString Description () const
 Returns the full description of the program. More...
 
int NumGroups () const
 Returns the number of groups found in the XML. More...
 
QString GroupName (const int &group) const
 Returns the group name of group[index]. More...
 
int GroupIndex (const QString &grpName) const
 Given the group name get its index in group array. More...
 
int NumParams (const int &) const
 Returns the number of parameters in a group. More...
 
QString ParamName (const int &group, const int &param) const
 Returns the parameter name. More...
 
QString ParamType (const int &group, const int &param) const
 Returns the parameter type of a parameter in a specified group. More...
 
QString ParamBrief (const int &group, const int &param) const
 Returns the brief description of a parameter in a specified group. More...
 
QString ParamDescription (const int &group, const int &param) const
 Returns the long description of a parameter in a specified group. More...
 
QString ParamMinimum (const int &group, const int &param) const
 Returns the minimum value of a parameter in a specified group. More...
 
QString ParamMinimumInclusive (const int &group, const int &param) const
 Returns whether the minimum value is inclusive or not. More...
 
QString ParamMaximum (const int &group, const int &param) const
 Returns the maximum value of a parameter in a specified group. More...
 
QString ParamMaximumInclusive (const int &group, const int &param) const
 Returns whether the maximum value is inclusive or not. More...
 
QString ParamOdd (const int &group, const int &param) const
 Returns whether the selected parameter has a restriction on odd values or not. More...
 
int ParamGreaterThanSize (const int &group, const int &param) const
 Returns the number of values in the parameters greater than list. More...
 
int ParamGreaterThanOrEqualSize (const int &group, const int &param) const
 Returns the number of values in the parameters greater than or equal list. More...
 
int ParamLessThanSize (const int &group, const int &param) const
 Returns the number of values in the parameters less than list. More...
 
int ParamLessThanOrEqualSize (const int &group, const int &param) const
 Returns the number of values in the parameters less than or equal list. More...
 
int ParamNotEqualSize (const int &group, const int &param) const
 Returns the number of values in the not equal list. More...
 
QString ParamGreaterThan (const int &group, const int &param, const int &great) const
 Returns the name of the specified greaterThan parameter. More...
 
QString ParamGreaterThanOrEqual (const int &group, const int &param, const int &great) const
 Returns the name of the specified greaterThanOrEqual parameter. More...
 
QString ParamLessThan (const int &group, const int &param, const int &great) const
 Returns the name of the specified lessThan parameter. More...
 
QString ParamLessThanOrEqual (const int &group, const int &param, const int &les) const
 Returns the name of the specified lessThanOrEqual parameter. More...
 
QString ParamNotEqual (const int &group, const int &param, const int &notEq) const
 Returns the name of the specified notEqual parameter. More...
 
int ParamListSize (const int &group, const int &param) const
 Returns the number of options in the specified parameter's list. More...
 
QString ParamListValue (const int &group, const int &param, const int &option) const
 Returns the option value for a specific option to a parameter. More...
 
QString ParamListBrief (const int &group, const int &param, const int &option) const
 Returns the brief description for a specific option to a parameter. More...
 
QString ParamListDescription (const int &group, const int &param, const int &option) const
 Returns the full description for a specific option to a parameter. More...
 
int ParamListExcludeSize (const int &group, const int &param, const int &option) const
 Returns the number of items in a parameters list exclude section. More...
 
QString ParamListExclude (const int &group, const int &param, const int &option, const int &exclude) const
 Returns the parameter name to be excluded if this option is selected. More...
 
int ParamListIncludeSize (const int &group, const int &param, const int &option) const
 Returns the number of items in a parameters list include section. More...
 
QString ParamListInclude (const int &group, const int &param, const int &option, const int &include) const
 Returns the parameter name to be included if this option is selected. More...
 
QString ParamDefault (const int &group, const int &param) const
 Returns the default for a parameter in a specified group. More...
 
QString ParamInternalDefault (const int &group, const int &param) const
 Returns the internal default for a parameter in a specified group. More...
 
QString ParamFilter (const int &group, const int &param) const
 Returns the parameter filter for a parameter in a specified group. More...
 
QString ParamPath (const int &group, const int &param) const
 Returns the default path for a filename/cube parameter. More...
 
QString ParamFileMode (const int &group, const int &param) const
 Returns the file mode for a parameter in a specified group. More...
 
int ParamExcludeSize (const int &group, const int &param) const
 Returns the number of parameters excluded in this parameter's exclusions. More...
 
QString ParamExclude (const int &group, const int &param, const int &exclude) const
 Returns the name of the specified excluded parameter. More...
 
int ParamIncludeSize (const int &group, const int &param) const
 Returns the number of parameters included in this parameter's inclusions. More...
 
QString ParamInclude (const int &group, const int &param, const int &include) const
 Returns the name of the specified included parameter. More...
 
QString PixelType (const int &group, const int &param) const
 Returns the default pixel type from the XML. More...
 
int HelpersSize (const int &group, const int &param) const
 Returns the number of helpers the parameter has. More...
 
QString HelperButtonName (const int &group, const int &param, const int &helper) const
 Returns the name of the helper button. More...
 
QString HelperFunction (const int &group, const int &param, const int &helper) const
 Returns the name of the helper function. More...
 
QString HelperBrief (const int &group, const int &param, const int &helper) const
 Returns the brief description of the helper button. More...
 
QString HelperDescription (const int &group, const int &param, const int &helper) const
 Returns the long description of the helper button. More...
 
QString HelperIcon (const int &group, const int &param, const int &helper) const
 Returns the name of the icon for the helper button. More...
 
bool IsParamInPvlInclude (QString &paramName, std::vector< QString > &exclude)
 Verify whether Parameter name is in the Include list Used in creation of DefFile. More...
 
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. More...
 
void VerifyAll ()
 Verify all parameters. More...
 
bool StringToBool (QString value) const
 Returns a boolean value based on the QString contents. More...
 
void CommandLine (Isis::Pvl &lab) const
 Creates a QString which could be used as a command line. More...
 
QString Version () const
 Returns the application version date. More...
 

Protected Member Functions

const IsisParameterDataReturnParam (const QString &paramName) const
 Returns a pointer to a parameter whose name starts with paramName. More...
 

Protected Attributes

QString name
 
QString brief
 
QString description
 
std::vector< IsisGroupDatagroups
 
std::vector< QString > categorys
 
std::vector< IsisChangeDatachanges
 

Private Member Functions

void loadBatchList (const QString file)
 Loads the user entered batchlist file into a private variable for later use. More...
 
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. More...
 
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. More...
 
void loadHistory (const QString file)
 Loads the previous history for the program. More...
 
void evaluateOption (const QString name, const QString value)
 This interprets the "-" options for reserved parameters. More...
 
void getNextParameter (unsigned int &curPos, QString &unresolvedParam, std::vector< QString > &value)
 This gets the next parameter in the list of arguments. More...
 
void preProcess (QString fullReservedName, std::vector< QString > &reservedParams)
 This parses the command line and looks for the specified reserved parameter name passed. More...
 
std::vector< QString > readArray (QString arrayString)
 This interprets an array value from the command line. More...
 
QString resolveParameter (QString &name, std::vector< QString > &reservedParams, bool handleNoMatches=true)
 This resolves a reserved parameter token on the command line to its fullname. More...
 
void StartParser (const char *xmlfile)
 Starts parsing an application xml file. More...
 
void Verify (const IsisParameterData *param)
 Throws an Isis::iExceptionXxxxxxxx if the parameter value(s) is invalid. More...
 
void CheckFileNamePreference (QString filename, QString paramname)
 This method checks whether the user preferences are set to allow overwrites of existing files. More...
 

Private Attributes

bool p_abortOnError
 Boolean value representing whether to abort or continue on error. More...
 
std::vector< std::vector< QString > > p_batchList
 Vector of batchlist data. More...
 
std::vector< char * > p_cmdline
 This variable will contain argv. More...
 
QString p_errList
 FileName to write batchlist line that caused error on. More...
 
Guip_gui
 Pointer to the gui object. More...
 
bool p_info
 Boolean value representing if it's in debug mode. More...
 
QString p_infoFileName
 FileName to save debugging info. More...
 
bool p_interactive
 Boolean value representing whether the program is interactive or not. More...
 
int p_parentId
 This is a status to indicate if the GUI is running or not. More...
 
QString p_progName
 Name of program to run. More...
 
QString p_saveFile
 FileName to save last history to. More...
 
XERCES::SAX2XMLReader * parser
 The XML file parser. More...
 
IsisXMLApplicationappHandler
 The application handler. More...
 

Detailed Description

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.

Author
2002-05-29 Jeff Anderson
History:
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.
History:
2003-02-07 Jeff Anderson - Modified constructor so that it will not start the GUI if the program name is unitTest.
History:
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.
History:
2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...
History:
2003-12-16 Jeff Anderson - Added command line option -LAST and RESTORE=file.par
History:
2004-02-26 Jeff Anderson - Added command line option -HELP
History:
2004-02-26 Jeff Anderson - Modified to allow a parameter to appear multiple times on the command line
History:
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.
History:
2005-02-22 Elizabeth Ribelin - Modified file to support Doxygen documentation
History:
2005-10-03 Elizabeth Miller - changed
History:
2005-12-21 Elizabeth Miller - Added command line options -BATCHLIST, -SAVE, -ERRLIST, -ONERROR, -PREFERENCE, and -PRINTFILE
History:
2006-01-23 Elizabeth Miller - Renamed -HELP to -WEBHELP and made it accept abbreviations of reserve params
History:
2007-07-12 Steven Koechle - Added -NOGUI flag
History:
2007-10-04 Steven Koechle - Added -info flag. Debugging option to create a log of system info.
History:
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.
History:
2008-04-16 Steven Lambright - Moved parameter verification call
History:
2008-06-06 Steven Lambright - Changed corrupt history file message
History:
2008-06-18 Steven Lambright - Fixed documentation
History:
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.
History:
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.
History:
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.
History:
2009-11-19 Kris Becker - Made argc pass by reference since Qt's QApplication/QCoreApplication requires it
History:
2010-03-26 Sharmila Prasad - Remove the restriction of the number of columns in the batchlist file to 10.
History:
2010-05-28 Steven Lambright - History fails silently now
History:
2010-07-20 Steven Lambright - Array format on the command line is more tolerant to white space now.
History:
2010-07-28 Steven Lambright - Fixed complicated escape sequence cases on array format parsing that have existed for a while now
History:
2010-07-28 Christopher Austin - Fixed a -LAST issue causing IsisAml to throw an incorrect exception.
History:
2010-10-28 Mackenzie Boyd - Modified error messages in LoadHistory()\
History:
2011-08-19 Jeannie Backer - Modified unitTest to use $temporary variable instead of /tmp directory.
History:
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.
History:
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.
History:
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.
History:
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.
History:
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.
History:
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.
History:
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).
History:
2014-06-18 Ian Humphrey - Finished developing unitTest.cpp and reorganized. Added lacking [at]throws documentation to UserInterface.cpp.
History:
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
History:
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.
History:
2021-06-05 Kris Becker - Fixed path to ISIS documentation when -WEBHELP is used

Definition at line 140 of file UserInterface.h.

Constructor & Destructor Documentation

◆ UserInterface() [1/2]

Isis::UserInterface::UserInterface ( const QString &  xmlfile,
int &  argc,
char *  argv[] 
)

Constructs an UserInterface object.

Parameters
xmlfileName of the Isis application xml file to open.
argcNumber 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(), Isis::FileName::fileExists(), loadCommandLine(), p_abortOnError, p_errList, p_gui, p_info, p_infoFileName, p_interactive, p_parentId, and p_saveFile.

◆ UserInterface() [2/2]

Isis::UserInterface::UserInterface ( const QString &  xmlfile,
QVector< QString > &  args 
)

Constructs an UserInterface object.

Parameters
xmlfileName of the Isis application xml file to open.
argcNumber 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(), Isis::FileName::fileExists(), loadCommandLine(), p_abortOnError, p_errList, p_gui, p_info, p_infoFileName, p_interactive, p_parentId, and p_saveFile.

◆ ~UserInterface()

Isis::UserInterface::~UserInterface ( )

Destroys the UserInterface object.

Definition at line 105 of file UserInterface.cpp.

References p_gui.

Member Function Documentation

◆ AbortOnError()

bool Isis::UserInterface::AbortOnError ( )
inline

Returns true if the program should abort on error, and false if it should continue.

Returns
bool True for abort, False for continue

Definition at line 152 of file UserInterface.h.

References p_abortOnError.

◆ BatchListSize()

int Isis::UserInterface::BatchListSize ( )
inline

Returns the size of the batchlist.

If there is no batchlist, it will return 0

Returns
int The size of the batchlist

Definition at line 162 of file UserInterface.h.

References p_batchList.

Referenced by loadCommandLine().

◆ Brief()

QString IsisAml::Brief ( ) const
inherited

Returns the brief description of the program.

Returns
The brief description.

Definition at line 1068 of file IsisAml.cpp.

◆ CheckFileNamePreference()

void IsisAml::CheckFileNamePreference ( QString  filename,
QString  paramname 
)
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.

Parameters
filenameName of the file to be overwritten.
paramnameName of the output file parameter.
Exceptions
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."
Author
2010-07-19 Jeannie Walldren
History:
2010-07-19 Jeannie Walldren - Original version.

Definition at line 2367 of file IsisAml.cpp.

References Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), and Isis::IException::User.

◆ Clear()

void IsisAml::Clear ( const QString &  paramName)
inherited

Clears the value(s) in the named parameter.

Parameters
paramNameThe name of the parameter to clear

Definition at line 1852 of file IsisAml.cpp.

References Isis::CubeAttribute< ChildClass >::setAttributes().

Referenced by Isis::Gui::InvokeHelper(), loadCommandLine(), Isis::Gui::ResetParameters(), SetBatchList(), Isis::Gui::StartProcess(), and Isis::Gui::UpdateHistory().

◆ CommandLine()

void IsisAml::CommandLine ( Isis::Pvl cont) const
inherited

Creates a QString which could be used as a command line.

Parameters
contPvl to put command line information in

Definition at line 2910 of file IsisAml.cpp.

References Isis::PvlObject::addGroup(), Isis::PvlKeyword::addValue(), Isis::PvlObject::clear(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::hasKeyword(), Isis::IString::Trim(), and Isis::IString::UpCase().

Referenced by SaveHistory().

◆ CreatePVL()

void IsisAml::CreatePVL ( Isis::Pvl pvlDef,
QString  guiGrpName,
QString  pvlObjName,
QString  pvlGrpName,
std::vector< QString > &  exclude 
)
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.

Author
Sharmila Prasad (8/11/2011)
Parameters
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 1134 of file IsisAml.cpp.

References Isis::IString::DownCase(), Isis::toString(), and Isis::IException::User.

◆ Description()

QString IsisAml::Description ( ) const
inherited

Returns the full description of the program.

Returns
The full description.

Definition at line 1078 of file IsisAml.cpp.

◆ evaluateOption()

void Isis::UserInterface::evaluateOption ( const QString  name,
const QString  value 
)
private

This interprets the "-" options for reserved parameters.

Parameters
name"-OPTIONNAME" (name of the reserved parameter)
valueValue of the option, if supplied (-name=value)
Exceptions
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
History:
2021-06-05 Kris Becker - Fixed path to ISIS docs

Definition at line 649 of file UserInterface.cpp.

References Isis::PvlObject::addGroup(), Isis::PvlKeyword::addValue(), Isis::PvlObject::findGroup(), 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(), IsisAml::PixelType(), 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().

◆ GetAsString()

QString IsisAml::GetAsString ( const QString &  paramName) const
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.

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
Returns
A QString representation of the value for the specified parameter.
Exceptions
iException(IsisProgrammerError) The parameter has no value.

Definition at line 537 of file IsisAml.cpp.

References Isis::IException::Programmer.

Referenced by Isis::PipelineApplication::AddParameter(), Isis::Pipeline::SetInputFile(), Isis::Pipeline::SetOutputFile(), Isis::GuiParameter::SetToCurrent(), and Isis::GuiParameter::Update().

◆ GetBoolean()

bool IsisAml::GetBoolean ( const QString &  paramName) const
inherited

Allows the retrieval of a value for a parameter of type "boolean".

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
Returns
The value of the parameter.
Exceptions
iException::Programmer(IsisErrorUser) The parameter has no value.

Definition at line 973 of file IsisAml.cpp.

References Isis::IException::Programmer, Isis::toBool(), and Isis::IException::User.

◆ GetDouble()

double IsisAml::GetDouble ( const QString &  paramName) const
inherited

Allows the retrieval of a value for a parameter of type "double".

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
Returns
The value of the parameter.
Exceptions
iException::Programmer(IsisErrorUser) The parameter has no value.

Definition at line 891 of file IsisAml.cpp.

References Isis::IException::Programmer, Isis::IString::ToDouble(), and Isis::IException::User.

Referenced by Isis::ProcessByQuickFilter::GetFilterParameters().

◆ GetFileName()

QString IsisAml::GetFileName ( const QString &  paramName,
QString  extension = "" 
) const
inherited

Allows the retrieval of a value for a parameter of type "filename".

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
extensionA 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
Returns
The value of the parameter.

Definition at line 607 of file IsisAml.cpp.

References Isis::FileName::addExtension(), Isis::FileName::expanded(), Isis::IException::Programmer, and Isis::IException::User.

Referenced by Isis::Pipeline::SetInputFile(), Isis::Pipeline::SetInputListFile(), Isis::ProcessImport::SetOutputCube(), Isis::Process::SetOutputCubeStretch(), and Isis::Pipeline::SetOutputListFile().

◆ GetInfoFileName()

QString Isis::UserInterface::GetInfoFileName ( )

This method returns the filename where the debugging info is stored when the "-info" tag is used.

Returns
QString Name of file containing debugging ingo.

Definition at line 119 of file UserInterface.cpp.

References p_infoFileName.

◆ GetInfoFlag()

bool Isis::UserInterface::GetInfoFlag ( )

This method returns the flag state of info.

This returns if its in debugging mode(the -info tag was specified).

Returns
bool Flag state on info.

Definition at line 130 of file UserInterface.cpp.

References p_info.

◆ GetInputAttribute()

Isis::CubeAttributeInput & IsisAml::GetInputAttribute ( const QString &  paramName)
inherited

Gets the attributes for an input cube.

Parameters
paramNameThe name of the parameter to get the attributes for
Returns
CubeAttributeInput
Exceptions
iException::Programmer"Parameter is not a cube."
iException::Programmer"Parameter in not an input cube"

Definition at line 1874 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::CubeAttribute< ChildClass >::setAttributes().

Referenced by Isis::Pipeline::SetInputFile().

◆ GetInteger()

int IsisAml::GetInteger ( const QString &  paramName) const
inherited

Allows the retrieval of a value for a parameter of type "integer".

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
Returns
The value of the parameter.
Exceptions
iException::Programmer(IsisErrorUser) The parameter has no value.

Definition at line 807 of file IsisAml.cpp.

References Isis::IException::Programmer, Isis::IString::ToInteger(), and Isis::IException::User.

Referenced by Isis::ProcessByQuickFilter::GetFilterParameters().

◆ getNextParameter()

void Isis::UserInterface::getNextParameter ( unsigned int &  curPos,
QString &  name,
std::vector< QString > &  value 
)
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).

Parameters
curPosEnd of previous argument
nameResulting parameter name
valueResulting array of parameter values (usually just 1 element)
Exceptions
Isis::IException::User- parameters cannot start with "="

Definition at line 934 of file UserInterface.cpp.

References p_cmdline, readArray(), and Isis::IException::User.

Referenced by loadCommandLine(), preProcess(), and SetBatchList().

◆ GetOutputAttribute()

Isis::CubeAttributeOutput & IsisAml::GetOutputAttribute ( const QString &  paramName)
inherited

Gets the attributes for an output cube.

Parameters
paramNameThe name of the parameter to get the attributes for
Returns
CubeAttributeOutput
Exceptions
iException::Programmer"Parameter is not a cube"
iException::Programmer"Parameter in not an output"

Definition at line 1919 of file IsisAml.cpp.

References Isis::CubeAttribute< ChildClass >::addAttributes(), Isis::IException::Programmer, and Isis::CubeAttribute< ChildClass >::setAttributes().

Referenced by Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCubeStretch().

◆ GetString()

QString IsisAml::GetString ( const QString &  paramName) const
inherited

Allows the retrieval of a value for a parameter of type "string".

Parameters
paramNameThe partial or full name of the parameter to be retrieved.
Returns
The value of the parameter.
Exceptions
iException::Programmer(IsisErrorUser) The parameter has no value.

Definition at line 692 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::IException::User.

◆ GroupIndex()

int IsisAml::GroupIndex ( const QString &  grpName) const
inherited

Given the group name get its index in group array.

Given group name return its index in the Gui.

Author
Sharmila Prasad (8/11/2011)
Parameters
grpName
Returns
int

Definition at line 1112 of file IsisAml.cpp.

References Isis::IString::DownCase().

◆ GroupName()

QString IsisAml::GroupName ( const int &  index) const
inherited

Returns the group name of group[index].

Parameters
indexThe array index of the group.
Returns
The group name.

Definition at line 1098 of file IsisAml.cpp.

◆ HelperBrief()

QString IsisAml::HelperBrief ( const int &  group,
const int &  param,
const int &  helper 
) const
inherited

Returns the brief description of the helper button.

Parameters
groupThe group index
paramThe parameter index
helperThe helper index
Returns
QString The brief description of the helper button

Definition at line 1796 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers().

◆ HelperButtonName()

QString IsisAml::HelperButtonName ( const int &  group,
const int &  param,
const int &  helper 
) const
inherited

Returns the name of the helper button.

Parameters
groupThe group index
paramThe parameter index
helperThe helper index
Returns
QString The name of the helper

Definition at line 1768 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers().

◆ HelperDescription()

QString IsisAml::HelperDescription ( const int &  group,
const int &  param,
const int &  helper 
) const
inherited

Returns the long description of the helper button.

Parameters
groupThe group index
paramThe parameter index
helperThe helper index
Returns
QString The long description of the helper button

Definition at line 1810 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers().

◆ HelperFunction()

QString IsisAml::HelperFunction ( const int &  group,
const int &  param,
const int &  helper 
) const
inherited

Returns the name of the helper function.

Parameters
groupThe group index
paramThe parameter index
helperThe helper index
Returns
QString The name of the helper function

Definition at line 1782 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers().

◆ HelperIcon()

QString IsisAml::HelperIcon ( const int &  group,
const int &  param,
const int &  helper 
) const
inherited

Returns the name of the icon for the helper button.

Parameters
groupThe group index
paramThe parameter index
helperThe helper index
Returns
QString The name of the helper icon

Definition at line 1824 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers().

◆ HelpersSize()

int IsisAml::HelpersSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of helpers the parameter has.

Parameters
groupThe group index
paramThe parameter index
Returns
int The number of helpers the parameter has

Definition at line 1755 of file IsisAml.cpp.

Referenced by Isis::GuiParameter::AddHelpers(), and Isis::GuiFileNameParameter::GuiFileNameParameter().

◆ IsInteractive()

bool Isis::UserInterface::IsInteractive ( )
inline

Indicates if the Isis Graphical User Interface is operating.

Returns
bool

Definition at line 171 of file UserInterface.h.

References p_gui.

Referenced by Isis::Application::GuiLog(), and Isis::Application::Log().

◆ IsParamInPvlInclude()

bool IsisAml::IsParamInPvlInclude ( QString &  paramName,
std::vector< QString > &  exclude 
)
inherited

Verify whether Parameter name is in the Include list Used in creation of DefFile.

Verify if the Parameter is in the Included list.

Author
Sharmila Prasad (8/11/2011)
Parameters
paramName- parameter name
include- include list
Returns
bool

Definition at line 1191 of file IsisAml.cpp.

References Isis::IString::DownCase().

◆ loadBatchList()

void Isis::UserInterface::loadBatchList ( const QString  file)
private

Loads the user entered batchlist file into a private variable for later use.

Parameters
fileThe batchlist file to load
History:
2010-03-26 Sharmila Prasad - Remove the restriction of the number of columns in the batchlist file to 10.
Exceptions
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 322 of file UserInterface.cpp.

References Isis::IString::Compress(), Isis::TextFile::GetLine(), Isis::TextFile::LineCount(), Isis::TextFile::Open(), p_batchList, Isis::IString::Replace(), Isis::IString::ToQt(), and Isis::IException::User.

Referenced by evaluateOption().

◆ loadCommandLine() [1/2]

void Isis::UserInterface::loadCommandLine ( int  argc,
char *  argv[] 
)
private

This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv.

Parameters
argcNumber of arguments on the command line
argv[]Array of arguments
Exceptions
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 423 of file UserInterface.cpp.

References BatchListSize(), IsisAml::Clear(), evaluateOption(), getNextParameter(), Isis::FileName::name(), p_abortOnError, p_cmdline, p_errList, p_interactive, p_progName, p_saveFile, preProcess(), IsisAml::PutAsString(), resolveParameter(), and Isis::IException::User.

◆ loadCommandLine() [2/2]

void Isis::UserInterface::loadCommandLine ( QVector< QString > &  args,
bool  ignoreAppName = true 
)
private

This is used to load the command line into p_cmdline and the Aml object using information contained in argc and argv.

Parameters
argsQVector of arguments
Exceptions
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 390 of file UserInterface.cpp.

Referenced by UserInterface().

◆ loadHistory()

void Isis::UserInterface::loadHistory ( const QString  file)
private

Loads the previous history for the program.

Parameters
fileFileName to get the history entry from
Exceptions
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 550 of file UserInterface.cpp.

References Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::PvlObject::group(), Isis::PvlObject::groups(), Isis::PvlContainer::isNamed(), Isis::PvlContainer::keywords(), Isis::PvlContainer::name(), Isis::PvlObject::object(), Isis::PvlObject::objects(), p_progName, IsisAml::ProgramName(), IsisAml::PutAsString(), IsisAml::ReturnParam(), and Isis::IException::User.

Referenced by evaluateOption().

◆ NumGroups()

int IsisAml::NumGroups ( ) const
inherited

Returns the number of groups found in the XML.

Returns
The number of groups.

Definition at line 1087 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::Gui::Gui(), and SetBatchList().

◆ NumParams()

int IsisAml::NumParams ( const int &  group) const
inherited

Returns the number of parameters in a group.

Parameters
groupThe group to measure.
Returns
The number of parameters.

Definition at line 1207 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::Gui::Gui(), and SetBatchList().

◆ ParamBrief()

QString IsisAml::ParamBrief ( const int &  group,
const int &  param 
) const
inherited

Returns the brief description of a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The brief description.

Definition at line 1232 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamDefault()

QString IsisAml::ParamDefault ( const int &  group,
const int &  param 
) const
inherited

Returns the default for a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The default for the specified parameter.

Definition at line 1505 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiBooleanParameter::IsModified(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().

◆ ParamDescription()

QString IsisAml::ParamDescription ( const int &  group,
const int &  param 
) const
inherited

Returns the long description of a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The long description

Definition at line 1245 of file IsisAml.cpp.

◆ ParamExclude()

QString IsisAml::ParamExclude ( const int &  group,
const int &  param,
const int &  exclude 
) const
inherited

Returns the name of the specified excluded parameter.

Parameters
groupThe group index
paramThe parameter index
excludeThe exclude index
Returns
The name of the excluded parameter

Definition at line 1462 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiBooleanParameter::Exclusions(), and Isis::GuiParameter::GuiParameter().

◆ ParamExcludeSize()

int IsisAml::ParamExcludeSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of parameters excluded in this parameter's exclusions.

Parameters
groupThe group index
paramThe parameter index
Returns
The number of items in the parameters exclude list

Definition at line 1719 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiBooleanParameter::Exclusions(), and Isis::GuiParameter::GuiParameter().

◆ ParamFileMode()

QString IsisAml::ParamFileMode ( const int &  group,
const int &  param 
) const
inherited

Returns the file mode for a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The file mode for the parameter.

Definition at line 1581 of file IsisAml.cpp.

Referenced by Isis::GuiCubeParameter::SelectAttribute(), and Isis::GuiFileNameParameter::SelectFile().

◆ ParamFilter()

QString IsisAml::ParamFilter ( const int &  group,
const int &  param 
) const
inherited

Returns the parameter filter for a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The paramter filter.

Definition at line 1543 of file IsisAml.cpp.

Referenced by Isis::GuiFileNameParameter::SelectFile().

◆ ParamGreaterThan()

QString IsisAml::ParamGreaterThan ( const int &  group,
const int &  param,
const int &  great 
) const
inherited

Returns the name of the specified greaterThan parameter.

Parameters
groupThe group index
paramThe parameter index
greatThe greaterThan index
Returns
The name of the greaterThan parameter

Definition at line 1387 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamGreaterThanOrEqual()

QString IsisAml::ParamGreaterThanOrEqual ( const int &  group,
const int &  param,
const int &  great 
) const
inherited

Returns the name of the specified greaterThanOrEqual parameter.

Parameters
groupThe group index
paramThe parameter index
greatThe greaterThanOrEqual index
Returns
The name of the greaterThanOrEqual parameter

Definition at line 1402 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamGreaterThanOrEqualSize()

int IsisAml::ParamGreaterThanOrEqualSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of values in the parameters greater than or equal list.

Parameters
groupThe group index
paramThe parameter index
Returns
Number of values in the parameters greater than or equal list

Definition at line 1336 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamGreaterThanSize()

int IsisAml::ParamGreaterThanSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of values in the parameters greater than list.

Parameters
groupThe group index
paramThe parameter index
Returns
Number of values in the parameters greater than list

Definition at line 1324 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamInclude()

QString IsisAml::ParamInclude ( const int &  group,
const int &  param,
const int &  include 
) const
inherited

Returns the name of the specified included parameter.

Parameters
groupThe group index
paramThe parameter index
includeThe include index
Returns
The name of the included parameter

Definition at line 1477 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiBooleanParameter::Exclusions(), and Isis::GuiParameter::GuiParameter().

◆ ParamIncludeSize()

int IsisAml::ParamIncludeSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of parameters included in this parameter's inclusions.

Parameters
groupThe group index
paramThe parameter index
Returns
The number of items in the parameters include list

Definition at line 1731 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiBooleanParameter::Exclusions(), and Isis::GuiParameter::GuiParameter().

◆ ParamInternalDefault()

QString IsisAml::ParamInternalDefault ( const int &  group,
const int &  param 
) const
inherited

Returns the internal default for a parameter in a specified group.

.

Parameters
groupThe group index
paramThe parameter index
Returns
The internal default for the specified parameter.

Definition at line 1524 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiParameter::IsModified(), Isis::GuiFileNameParameter::SelectFile(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().

◆ ParamLessThan()

QString IsisAml::ParamLessThan ( const int &  group,
const int &  param,
const int &  les 
) const
inherited

Returns the name of the specified lessThan parameter.

Parameters
groupThe group index
paramThe parameter index
lesThe lessThan index
Returns
The name of the lessThan parameter

Definition at line 1417 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamLessThanOrEqual()

QString IsisAml::ParamLessThanOrEqual ( const int &  group,
const int &  param,
const int &  les 
) const
inherited

Returns the name of the specified lessThanOrEqual parameter.

Parameters
groupThe group index
paramThe parameter index
lesThe lessThanOrEqual index
Returns
The name of the lessThanOrEqual parameter

Definition at line 1432 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamLessThanOrEqualSize()

int IsisAml::ParamLessThanOrEqualSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of values in the parameters less than or equal list.

Parameters
groupThe group index
paramThe parameter index
Returns
Number of values in the parameters less than or equal list

Definition at line 1361 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamLessThanSize()

int IsisAml::ParamLessThanSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of values in the parameters less than list.

Parameters
groupThe group index
paramThe parameter index
Returns
Number of values in the parameters less than list

Definition at line 1349 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamListBrief()

QString IsisAml::ParamListBrief ( const int &  group,
const int &  param,
const int &  option 
) const
inherited

Returns the brief description for a specific option to a parameter.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
Returns
The brief description of the option.

Definition at line 1630 of file IsisAml.cpp.

Referenced by evaluateOption().

◆ ParamListDescription()

QString IsisAml::ParamListDescription ( const int &  group,
const int &  param,
const int &  option 
) const
inherited

Returns the full description for a specific option to a parameter.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
Returns
The full description of the option.

Definition at line 1645 of file IsisAml.cpp.

◆ ParamListExclude()

QString IsisAml::ParamListExclude ( const int &  group,
const int &  param,
const int &  option,
const int &  exclude 
) const
inherited

Returns the parameter name to be excluded if this option is selected.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
excludeThe exclusion number within the parameters list.
Returns
The parameter name to be excluded if this option is selected.

Definition at line 1675 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiComboBoxParameter::Exclusions(), and Isis::GuiListParameter::Exclusions().

◆ ParamListExcludeSize()

int IsisAml::ParamListExcludeSize ( const int &  group,
const int &  param,
const int &  option 
) const
inherited

Returns the number of items in a parameters list exclude section.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
Returns
The number of items in the parameters list exclude section.

Definition at line 1660 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiComboBoxParameter::Exclusions(), and Isis::GuiListParameter::Exclusions().

◆ ParamListInclude()

QString IsisAml::ParamListInclude ( const int &  group,
const int &  param,
const int &  option,
const int &  include 
) const
inherited

Returns the parameter name to be included if this option is selected.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
includeThe inclusion number within the parameters list.
Returns
The parameter name to be included if this option is selected.

Definition at line 1705 of file IsisAml.cpp.

Referenced by evaluateOption().

◆ ParamListIncludeSize()

int IsisAml::ParamListIncludeSize ( const int &  group,
const int &  param,
const int &  option 
) const
inherited

Returns the number of items in a parameters list include section.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
Returns
The number of items in the parameters list include section.

Definition at line 1690 of file IsisAml.cpp.

Referenced by evaluateOption().

◆ ParamListSize()

int IsisAml::ParamListSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of options in the specified parameter's list.

Parameters
groupThe group index
paramThe parameter index
Returns
The number of options contained in the parameter's list. If the parameter does not contain a list, zero will be returned.

Definition at line 1601 of file IsisAml.cpp.

Referenced by evaluateOption().

◆ ParamListValue()

QString IsisAml::ParamListValue ( const int &  group,
const int &  param,
const int &  option 
) const
inherited

Returns the option value for a specific option to a parameter.

Parameters
groupThe group index
paramThe parameter index
optionThe option number within the parameters list.
Returns
The value of the option.

Definition at line 1615 of file IsisAml.cpp.

Referenced by evaluateOption().

◆ ParamMaximum()

QString IsisAml::ParamMaximum ( const int &  group,
const int &  param 
) const
inherited

Returns the maximum value of a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The maximum

Definition at line 1271 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamMaximumInclusive()

QString IsisAml::ParamMaximumInclusive ( const int &  group,
const int &  param 
) const
inherited

Returns whether the maximum value is inclusive or not.

Parameters
groupThe group index
paramThe parameter index
Returns
Whether maximum is inclusive or not

Definition at line 1297 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamMinimum()

QString IsisAml::ParamMinimum ( const int &  group,
const int &  param 
) const
inherited

Returns the minimum value of a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The minimum

Definition at line 1258 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamMinimumInclusive()

QString IsisAml::ParamMinimumInclusive ( const int &  group,
const int &  param 
) const
inherited

Returns whether the minimum value is inclusive or not.

Parameters
groupThe group index
paramThe parameter index
Returns
Whether minimum is inclusive or not

Definition at line 1284 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamName()

QString IsisAml::ParamName ( const int &  group,
const int &  param 
) const
inherited

Returns the parameter name.

Parameters
groupThe group index where the parameter can be found.
paramThe index of the parameter to name.
Returns
The name of the parameter.

Definition at line 1219 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiCubeParameter::SelectAttribute(), and SetBatchList().

◆ ParamNotEqual()

QString IsisAml::ParamNotEqual ( const int &  group,
const int &  param,
const int &  notEq 
) const
inherited

Returns the name of the specified notEqual parameter.

Parameters
groupThe group index
paramThe parameter index
notEqThe notEqual index
Returns
The name of the notEqual parameter

Definition at line 1447 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamNotEqualSize()

int IsisAml::ParamNotEqualSize ( const int &  group,
const int &  param 
) const
inherited

Returns the number of values in the not equal list.

Parameters
groupThe group index
paramThe parameter index
Returns
Number of values in the parameters not equal list

Definition at line 1374 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamOdd()

QString IsisAml::ParamOdd ( const int &  group,
const int &  param 
) const
inherited

Returns whether the selected parameter has a restriction on odd values or not.

Parameters
groupThe group index
paramThe parameter index
Returns
Whether the parameter restricts odd values or not

Definition at line 1311 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParamPath()

QString IsisAml::ParamPath ( const int &  group,
const int &  param 
) const
inherited

Returns the default path for a filename/cube parameter.

Parameters
groupThe group index
paramThe parameter index
Returns
The default path.

Definition at line 1562 of file IsisAml.cpp.

Referenced by Isis::GuiFileNameParameter::SelectFile().

◆ ParamType()

QString IsisAml::ParamType ( const int &  group,
const int &  param 
) const
inherited

Returns the parameter type of a parameter in a specified group.

Parameters
groupThe group index
paramThe parameter index
Returns
The type of parameter.

Definition at line 1492 of file IsisAml.cpp.

Referenced by evaluateOption(), and Isis::GuiParameter::GuiParameter().

◆ ParentId()

int Isis::UserInterface::ParentId ( )
inline

Returns the parent id.

Returns
int The parent id

Definition at line 180 of file UserInterface.h.

References p_parentId.

Referenced by Isis::Application::Application(), Isis::Application::HasParent(), and Isis::Application::SendParentData().

◆ PixelType()

QString IsisAml::PixelType ( const int &  group,
const int &  param 
) const
inherited

Returns the default pixel type from the XML.

Parameters
groupThe group index
paramThe parameter index
Returns
The default pixel type

Definition at line 1743 of file IsisAml.cpp.

Referenced by evaluateOption(), Isis::GuiParameter::GuiParameter(), and Isis::GuiCubeParameter::SelectAttribute().

◆ preProcess()

void Isis::UserInterface::preProcess ( QString  fullReservedName,
std::vector< QString > &  reservedParams 
)
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 (

See also
resolveParameter() ).

Example: preProcess("-HELP", options) will try to resolve any reserved parameters and will evaluate if one resolves to -HELP.

Parameters
fullReservedNamethe full name of reserved parameter being looked for
reservedParamsthe list of reserved parameters for resolving parameter name

Definition at line 1021 of file UserInterface.cpp.

References evaluateOption(), getNextParameter(), p_cmdline, and resolveParameter().

Referenced by loadCommandLine().

◆ ProgramName()

QString IsisAml::ProgramName ( ) const
inherited

Returns the Program name.

Returns
The name of the program.

Definition at line 1057 of file IsisAml.cpp.

Referenced by evaluateOption(), loadHistory(), SaveHistory(), Isis::Gui::ShowWarning(), Isis::Gui::StopProcessing(), Isis::Gui::UpdateCommandLine(), and Isis::Gui::UpdateHistory().

◆ PutAsString()

void IsisAml::PutAsString ( const QString &  paramName,
const QString &  value 
)
inherited

Allows the insertion of a value for any parameter.

No validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe 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).
Exceptions
IExceptionThe 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 65 of file IsisAml.cpp.

References Isis::IException::User.

Referenced by Isis::Gui::InvokeHelper(), loadCommandLine(), loadHistory(), SetBatchList(), Isis::Gui::StartProcess(), and Isis::Gui::UpdateHistory().

◆ PutBoolean()

void IsisAml::PutBoolean ( const QString &  paramName,
const bool &  value 
)
inherited

Allows the insertion of a value for a parameter of type "boolean".

A validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe boolean value to be placed in the boolean's value data member.
Exceptions
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 446 of file IsisAml.cpp.

References Isis::IException::Programmer.

◆ PutDouble()

void IsisAml::PutDouble ( const QString &  paramName,
const double &  value 
)
inherited

Allows the insertion of a value for a parameter of type "double".

A validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe double value to be placed in the double's value data member.
Exceptions
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 361 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::toString().

◆ PutFileName()

void IsisAml::PutFileName ( const QString &  paramName,
const QString &  value 
)
inherited

Allows the insertion of a value for a parameter of type "filename".

A validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe QString representation of the value to be placed in the filename's value data member.

Definition at line 195 of file IsisAml.cpp.

References Isis::IException::Programmer.

◆ PutInteger()

void IsisAml::PutInteger ( const QString &  paramName,
const int &  value 
)
inherited

Allows the insertion of a value for a parameter of type "integer".

A validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe integer value to be placed in the integer's value data member.
Exceptions
iException(IsisProgrammerError) The parameter is not of type "int".

Definition at line 275 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::toString().

◆ PutString()

void IsisAml::PutString ( const QString &  paramName,
const QString &  value 
)
inherited

Allows the insertion of a value for any parameter.

No validity check is performed on the value passed in.

Parameters
paramNameThe partial or full name of the parameter to be modified.
valueThe 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 128 of file IsisAml.cpp.

References Isis::IException::Programmer.

◆ readArray()

std::vector< QString > Isis::UserInterface::readArray ( QString  arrayString)
private

This interprets an array value from the command line.

Parameters
arrayStringParameter value containing an array of format (a,b,c)
Returns
std::vector<QString> Values in the array QString
Exceptions
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 1067 of file UserInterface.cpp.

References Isis::IException::User.

Referenced by getNextParameter().

◆ resolveParameter()

QString Isis::UserInterface::resolveParameter ( QString &  unresolvedParam,
std::vector< QString > &  reservedParams,
bool  handleNoMatches = true 
)
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

Parameters
unresolvedParamthe parameter name that needs to be resolved
reservedParamsthe list of reserved parameters for resolving parameter name
handleNoMatchesboolean value defaulted to true for handling invalid reserved parameters
Returns
QString the resolved parameter name
Exceptions
Isis::IException::User- unresolved reserved parameter is ambigious
Isis::IException::User- reserved parameter cannot be matched (invalid)

Definition at line 1194 of file UserInterface.cpp.

References Isis::IException::User.

Referenced by loadCommandLine(), and preProcess().

◆ ReturnParam()

const IsisParameterData * IsisAml::ReturnParam ( const QString &  paramName) const
protectedinherited

Returns a pointer to a parameter whose name starts with paramName.

Parameters
paramNameThe name of the parameter to return
Returns
IsisParameterData
Exceptions
iException::User(Parameter is not unique)
iException::User(Unknown Parameter)

Definition at line 1965 of file IsisAml.cpp.

References Isis::IString::UpCase(), and Isis::IException::User.

Referenced by loadHistory().

◆ SaveHistory()

◆ SetBatchList()

void Isis::UserInterface::SetBatchList ( int  i)

Clears the gui parameters and sets the batch list information at line i as the new parameters.

Parameters
iThe line number to retrieve parameter information from
Exceptions
Isis::IException::User- Invalid command line

Definition at line 143 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().

◆ SetErrorList()

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.

Parameters
iThe line of the batchlist to write to the error file
Exceptions
Isis::IException::User- Unable to create error list - Disk may be full or directory permissions not writeable

Definition at line 234 of file UserInterface.cpp.

References p_batchList, p_errList, and Isis::IException::User.

◆ StartParser()

void IsisAml::StartParser ( const char *  xmlfile)
privateinherited

Starts parsing an application xml file.

Parameters
xmlfileThe xml file to parse
Exceptions
iException::Programmer(Error during XML parser initialization)

Definition at line 3003 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::IException::toString().

◆ StringToBool()

bool IsisAml::StringToBool ( QString  value) const
inherited

Returns a boolean value based on the QString contents.

Parameters
valueThe value to convert to a boolean
Returns
boolean value based on QString contents
Exceptions
iException::Programmer(Invalid boolean value)

Definition at line 2867 of file IsisAml.cpp.

References Isis::IException::Programmer.

◆ TheGui()

Gui* Isis::UserInterface::TheGui ( )
inline
Returns
the Gui

Definition at line 187 of file UserInterface.h.

References p_gui.

Referenced by Isis::GuiEditFile::GuiEditFile(), Isis::Application::GuiLog(), and Isis::Application::Log().

◆ Verify()

void IsisAml::Verify ( const IsisParameterData param)
privateinherited

Throws an Isis::iExceptionXxxxxxxx if the parameter value(s) is invalid.

Parameters
paramThe parameter data
Exceptions
iException::User
History:
2010-07-19 Jeannie Walldren - Added check for FileCustomization preference if an existing output file is selected

Definition at line 2017 of file IsisAml.cpp.

References Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::IException::Programmer, Isis::IString::ToDouble(), Isis::toInt(), Isis::IString::ToInteger(), Isis::IString::UpCase(), and Isis::IException::User.

◆ VerifyAll()

void IsisAml::VerifyAll ( )
inherited

Verify all parameters.

Definition at line 2387 of file IsisAml.cpp.

References Isis::IException::Programmer, and Isis::IException::User.

Referenced by SetBatchList(), and Isis::Gui::StartProcess().

◆ Version()

QString IsisAml::Version ( ) const
inherited

Returns the application version date.

Returns
The application version date

Definition at line 2987 of file IsisAml.cpp.

◆ WasEntered()

bool IsisAml::WasEntered ( const QString &  paramName) const
inherited

Returns a true if the parameter has a value, and false if it does not.

Parameters
paramNameThe name of the parameter to check if it was entered
Returns
True if the parameter was entered, and false if it was not

Definition at line 1836 of file IsisAml.cpp.

Referenced by Isis::PipelineApplication::AddParameter(), Isis::Pipeline::SetInputFile(), Isis::Pipeline::SetOutputFile(), Isis::Pipeline::SetOutputListFile(), Isis::GuiParameter::SetToCurrent(), and Isis::GuiParameter::Update().

Member Data Documentation

◆ appHandler

IsisXMLApplication* IsisAml::appHandler
privateinherited

The application handler.

Definition at line 342 of file IsisAml.h.

◆ p_abortOnError

bool Isis::UserInterface::p_abortOnError
private

Boolean value representing whether to abort or continue on error.

Definition at line 217 of file UserInterface.h.

Referenced by AbortOnError(), evaluateOption(), loadCommandLine(), and UserInterface().

◆ p_batchList

std::vector<std::vector<QString> > Isis::UserInterface::p_batchList
private

Vector of batchlist data.

Definition at line 219 of file UserInterface.h.

Referenced by BatchListSize(), loadBatchList(), SetBatchList(), and SetErrorList().

◆ p_cmdline

std::vector<char *> Isis::UserInterface::p_cmdline
private

This variable will contain argv.

Definition at line 221 of file UserInterface.h.

Referenced by getNextParameter(), loadCommandLine(), preProcess(), and SetBatchList().

◆ p_errList

QString Isis::UserInterface::p_errList
private

FileName to write batchlist line that caused error on.

Definition at line 223 of file UserInterface.h.

Referenced by evaluateOption(), loadCommandLine(), SetErrorList(), and UserInterface().

◆ p_gui

Gui* Isis::UserInterface::p_gui
private

Pointer to the gui object.

Definition at line 225 of file UserInterface.h.

Referenced by IsInteractive(), TheGui(), UserInterface(), and ~UserInterface().

◆ p_info

bool Isis::UserInterface::p_info
private

Boolean value representing if it's in debug mode.

Definition at line 227 of file UserInterface.h.

Referenced by evaluateOption(), GetInfoFlag(), and UserInterface().

◆ p_infoFileName

QString Isis::UserInterface::p_infoFileName
private

FileName to save debugging info.

Definition at line 229 of file UserInterface.h.

Referenced by evaluateOption(), GetInfoFileName(), and UserInterface().

◆ p_interactive

bool Isis::UserInterface::p_interactive
private

Boolean value representing whether the program is interactive or not.

Definition at line 231 of file UserInterface.h.

Referenced by evaluateOption(), loadCommandLine(), and UserInterface().

◆ p_parentId

int Isis::UserInterface::p_parentId
private

This is a status to indicate if the GUI is running or not.

Definition at line 233 of file UserInterface.h.

Referenced by evaluateOption(), ParentId(), and UserInterface().

◆ p_progName

QString Isis::UserInterface::p_progName
private

Name of program to run.

Definition at line 235 of file UserInterface.h.

Referenced by evaluateOption(), loadCommandLine(), loadHistory(), and SetBatchList().

◆ p_saveFile

QString Isis::UserInterface::p_saveFile
private

FileName to save last history to.

Definition at line 237 of file UserInterface.h.

Referenced by evaluateOption(), loadCommandLine(), SaveHistory(), and UserInterface().

◆ parser

XERCES::SAX2XMLReader* IsisAml::parser
privateinherited

The XML file parser.

Definition at line 340 of file IsisAml.h.


The documentation for this class was generated from the following files: