Isis 3 Programmer Reference
|
Application program XML file parameter manager. More...
#include <IsisAml.h>
Public Member Functions | |
IsisAml (const QString &xmlfile) | |
Constructs an IsisAml object and internalizes the XML data in the given file name. | |
~IsisAml () | |
Destructs an IsisAml object. | |
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 | 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 | |
XERCES::SAX2XMLReader * | parser |
The XML file parser. | |
IsisXMLApplication * | appHandler |
The application handler. | |
Application program XML file parameter manager.
This class is used to manage the data in an application XML file pertaining to the program parameters. The data is stored, accessed, and modified through this class and its helper classes.
2002-10-31 Stuart Sides - Added check to make sure all parameters have some type of value or are excluded by some other parameter.
2002-11-05 Stuart Sides - Modified GetString member to return the matching list member (if a list exists) instead of the value itself.
2002-12-10 Stuart Sides - modified GetFileName member to return the filename(s) with environment variables expanded.
2003-01-24 Stuart Sides - took out schema checking for the time being. It will need to be put back in after the user preferences object is finished.
2003-01-27 Stuart Sides - modified GetFileName.
2003-02-07 Stuart Sides - fixed VerifyAll to better check list/option/includes,excludes
2003-02-13 Stuart Sides - allowed list/option/included parameters to use the default value instead of just the value.
2003-02-20 Stuart Sides - fixed problem where excludes/includes were throwing an error when they should not have.
2003-03-12 Stuart Sides - added member to construct a command line from the internalized data and return it as a string (CommandLine).
2003-03-12 Stuart Sides - added member to construct a command line from the internalized data and return it as a string (CommandLine).
2003-03-13 Stuart Sides - modified member CommandLine to take a Label reference instead of returning a Label.
2003-03-13 Stuart Sides - socumented new member CommandLine.
2003-04-03 Stuart Sides - fixed bug where integer parameters that need to be odd were not being checked.
2003-05-16 Stuart Sides - modified schema from astrogeology... isis.astrogeology...
2003-05-30 Stuart Sides - fixed uninitialized variable compiler error when -O1 flag was added.
2003-06-04 Stuart Sides - fixed a problem where the GetString member was not returning the full list option value.
2003-06-05 Stuart Sides - added the member "Version" to the class. It will return the date of the most recent change to the application. This involved parsing the history/change entries, which was being ignored previously.
2003-07-02 Stuart Sides - added the new parameter type "cube"
2003-07-03 Stuart Sides - added the members "Brief and Description" to return the application brief and full description.
2003-08-01 Stuart Sides - made get and put FileName work for cubes too.
2003-08-26 Jeff Anderson - added extension option to GetFileName method.
2003-08-27 Stuart Sides - fixed bug where not all parameters would get internalized if there where html tags inside a description of a parameter
2003-12-03 Jeff Anderson - modified CommandLine method to output all parameters except those in option list excludes.
2004-01-21 Stuart Sides - added members for accessing a parameters exclude(s).
2004-02-26 Stuart Sides - added parsing and get members for the default path in the XML
2004-03-03 Stuart Sides - added member function PixelType so IsisGui can get the pixel type of a cube
2004-09-01 Stuart Sides - modified so the parameter names don't get capitalized as they are read from the applications xml file. This caused other modifications to the ReturnParam member, so it would find the requested parameter in a case insensitive way.
2005-10-03 Elizabeth Miller - changed
2005-12-13 Stuart Sides - Took out an "exit(1)" in the GetString method. Couldn't find a reason for it to be there.
2005-12-28 Elizabeth Miller - Added extra methods and private vars to retrieve info needed for gui and command line help
2006-02-13 Elizabeth Miller - Added GuiHelper Capabilities
2006-10-17 Steven Lambright - Fixed problem with boolean inclusion/exclusion
2010-07-19 Jeannie Walldren - Added check whether user preferences are set to allow file overwrite in Verify() method
2010-07-21 Sharmila Prasad - Modified for doxygen documentation Warning
2010-07-22 Steven Lambright - Array values for parameters are now written to the history file
2011-08-16 Sharmila Prasad - Added API to CreatePVL from a GUI Group and Get GUI Group index given the Group name
2012-11-20 Janet Barrett - Fixed the GetString method so that it doesn't stop searching for a matched string until an exact match is found or it has gone through the entire list. Fixes #554.
2016-08-28 Kelvin Rodriguez - Moved 'using namespace std' statements to be after #includes to squash implicit declaration warnings in clang. Part of porting to OSX 10.11.
2017-08-08 Adam Goins - Added an additional catch statement to display the file name of an XML file that threw an error while parsing.
IsisAml::IsisAml | ( | const QString & | xmlfile | ) |
Constructs an IsisAml object and internalizes the XML data in the given file name.
xmlfile | Indicates the pull path of the XML file to be parsed. |
Definition at line 41 of file IsisAml.cpp.
References StartParser().
IsisAml::~IsisAml | ( | ) |
Destructs an IsisAml object.
Definition at line 48 of file IsisAml.cpp.
QString IsisAml::Brief | ( | ) | const |
Returns the brief description of the program.
Definition at line 1144 of file IsisAml.cpp.
Referenced by Isis::Application::History().
|
private |
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 Verify().
void IsisAml::Clear | ( | const QString & | paramName | ) |
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 ReturnParam().
Referenced by Isis::UserInterface::loadCommandLine(), and Isis::UserInterface::SetBatchList().
void IsisAml::CommandLine | ( | Isis::Pvl & | cont | ) | const |
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(), GetAsString(), Isis::PvlContainer::hasKeyword(), ParamName(), ReturnParam(), Isis::IString::Trim(), and Isis::IString::UpCase().
Referenced by Isis::Application::History(), Isis::UserInterface::loadCommandLine(), and Isis::UserInterface::SaveHistory().
void IsisAml::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.
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(), GetAsString(), GetBoolean(), GetDouble(), GetInteger(), GroupIndex(), IsParamInPvlInclude(), NumParams(), ParamName(), ParamType(), Isis::toString(), and Isis::IException::User.
QString IsisAml::Description | ( | ) | const |
Returns the full description of the program.
Definition at line 1154 of file IsisAml.cpp.
QString IsisAml::GetAsString | ( | const QString & | paramName | ) | const |
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 ReturnParam().
Referenced by CommandLine(), CreatePVL(), Isis::GuiParameter::SetToCurrent(), Isis::GuiParameter::Update(), and VerifyAll().
bool IsisAml::GetBoolean | ( | const QString & | paramName | ) | const |
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, ReturnParam(), Isis::toBool(), and Isis::IException::User.
Referenced by CreatePVL().
QString IsisAml::GetCubeName | ( | const QString & | paramName, |
QString | extension = "" ) const |
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, ReturnParam(), and Isis::IException::User.
double IsisAml::GetDouble | ( | const QString & | paramName | ) | const |
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, ReturnParam(), Isis::IString::ToDouble(), and Isis::IException::User.
Referenced by CreatePVL(), and VerifyAll().
QString IsisAml::GetFileName | ( | const QString & | paramName, |
QString | extension = "" ) const |
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, ReturnParam(), and Isis::IException::User.
Isis::CubeAttributeInput & IsisAml::GetInputAttribute | ( | const QString & | paramName | ) |
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 ReturnParam().
int IsisAml::GetInteger | ( | const QString & | paramName | ) | const |
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, ReturnParam(), Isis::IString::ToInteger(), and Isis::IException::User.
Referenced by CreatePVL(), and VerifyAll().
Isis::CubeAttributeOutput & IsisAml::GetOutputAttribute | ( | const QString & | paramName | ) |
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 ReturnParam().
json IsisAml::GetParams | ( | ) |
Creates a json object which could be used as a command line.
Definition at line 1205 of file IsisAml.cpp.
References ParamName(), and ReturnParam().
QString IsisAml::GetString | ( | const QString & | paramName | ) | const |
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, ReturnParam(), and Isis::IException::User.
Referenced by VerifyAll().
int IsisAml::GroupIndex | ( | const QString & | grpName | ) | const |
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 CreatePVL().
QString IsisAml::GroupName | ( | const int & | index | ) | const |
Returns the group name of group[index].
index | The array index of the group. |
Definition at line 1176 of file IsisAml.cpp.
QString IsisAml::HelperBrief | ( | const int & | group, |
const int & | param, | ||
const int & | helper ) const |
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().
QString IsisAml::HelperButtonName | ( | const int & | group, |
const int & | param, | ||
const int & | helper ) const |
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().
QString IsisAml::HelperDescription | ( | const int & | group, |
const int & | param, | ||
const int & | helper ) const |
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().
QString IsisAml::HelperFunction | ( | const int & | group, |
const int & | param, | ||
const int & | helper ) const |
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().
QString IsisAml::HelperIcon | ( | const int & | group, |
const int & | param, | ||
const int & | helper ) const |
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().
int IsisAml::HelpersSize | ( | const int & | group, |
const int & | param ) const |
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().
bool IsisAml::IsParamInPvlInclude | ( | QString & | paramName, |
std::vector< QString > & | exclude ) |
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 CreatePVL().
int IsisAml::NumGroups | ( | ) | const |
Returns the number of groups found in the XML.
Definition at line 1164 of file IsisAml.cpp.
Referenced by Isis::UserInterface::evaluateOption(), and Isis::UserInterface::SetBatchList().
int IsisAml::NumParams | ( | const int & | group | ) | const |
Returns the number of parameters in a group.
group | The group to measure. |
Definition at line 1349 of file IsisAml.cpp.
Referenced by CreatePVL(), Isis::UserInterface::evaluateOption(), and Isis::UserInterface::SetBatchList().
QString IsisAml::ParamBrief | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamDefault | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiParameter::IsModified(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().
QString IsisAml::ParamDescription | ( | const int & | group, |
const int & | param ) const |
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.
QString IsisAml::ParamExclude | ( | const int & | group, |
const int & | param, | ||
const int & | exclude ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamExcludeSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamFileMode | ( | const int & | group, |
const int & | param ) const |
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().
QString IsisAml::ParamFilter | ( | const int & | group, |
const int & | param ) const |
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().
QString IsisAml::ParamGreaterThan | ( | const int & | group, |
const int & | param, | ||
const int & | great ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamGreaterThanOrEqual | ( | const int & | group, |
const int & | param, | ||
const int & | great ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamGreaterThanOrEqualSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamGreaterThanSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamInclude | ( | const int & | group, |
const int & | param, | ||
const int & | include ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamIncludeSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamInternalDefault | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), Isis::GuiParameter::GuiParameter(), Isis::GuiParameter::IsModified(), Isis::GuiFileNameParameter::SelectFile(), Isis::GuiParameter::SetToDefault(), and Isis::GuiParameter::Update().
QString IsisAml::ParamLessThan | ( | const int & | group, |
const int & | param, | ||
const int & | les ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamLessThanOrEqual | ( | const int & | group, |
const int & | param, | ||
const int & | les ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamLessThanOrEqualSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamLessThanSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamListBrief | ( | const int & | group, |
const int & | param, | ||
const int & | option ) const |
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 Isis::UserInterface::evaluateOption().
QString IsisAml::ParamListDescription | ( | const int & | group, |
const int & | param, | ||
const int & | option ) const |
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.
QString IsisAml::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.
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 Isis::UserInterface::evaluateOption().
int IsisAml::ParamListExcludeSize | ( | const int & | group, |
const int & | param, | ||
const int & | option ) const |
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 Isis::UserInterface::evaluateOption().
QString IsisAml::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.
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 Isis::UserInterface::evaluateOption().
int IsisAml::ParamListIncludeSize | ( | const int & | group, |
const int & | param, | ||
const int & | option ) const |
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 Isis::UserInterface::evaluateOption().
int IsisAml::ParamListSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption().
QString IsisAml::ParamListValue | ( | const int & | group, |
const int & | param, | ||
const int & | option ) const |
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 Isis::UserInterface::evaluateOption().
QString IsisAml::ParamMaximum | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamMaximumInclusive | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamMinimum | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamMinimumInclusive | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamName | ( | const int & | group, |
const int & | param ) const |
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 CommandLine(), CreatePVL(), Isis::UserInterface::evaluateOption(), GetParams(), Isis::GuiParameter::GuiParameter(), Isis::GuiCubeParameter::SelectAttribute(), and Isis::UserInterface::SetBatchList().
QString IsisAml::ParamNotEqual | ( | const int & | group, |
const int & | param, | ||
const int & | notEq ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
int IsisAml::ParamNotEqualSize | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamOdd | ( | const int & | group, |
const int & | param ) const |
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 Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::ParamPath | ( | const int & | group, |
const int & | param ) const |
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().
QString IsisAml::ParamType | ( | const int & | group, |
const int & | param ) const |
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 CreatePVL(), Isis::UserInterface::evaluateOption(), and Isis::GuiParameter::GuiParameter().
QString IsisAml::PixelType | ( | const int & | group, |
const int & | param ) const |
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().
QString IsisAml::ProgramName | ( | ) | const |
Returns the Program name.
Definition at line 1133 of file IsisAml.cpp.
Referenced by Isis::UserInterface::evaluateOption(), Isis::Application::History(), Isis::UserInterface::loadHistory(), Isis::UserInterface::SaveHistory(), and Isis::Application::UpdateProgress().
void IsisAml::PutAsString | ( | const QString & | paramName, |
const QString & | value ) |
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 ReturnParam(), and Isis::IException::User.
Referenced by Isis::UserInterface::loadCommandLine(), Isis::UserInterface::loadHistory(), and Isis::UserInterface::SetBatchList().
void IsisAml::PutBoolean | ( | const QString & | paramName, |
const bool & | value ) |
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, ReturnParam(), and Verify().
void IsisAml::PutCubeName | ( | const QString & | paramName, |
const QString & | value ) |
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, ReturnParam(), and Verify().
void IsisAml::PutDouble | ( | const QString & | paramName, |
const double & | value ) |
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, ReturnParam(), Isis::toString(), and Verify().
void IsisAml::PutFileName | ( | const QString & | paramName, |
const QString & | value ) |
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, ReturnParam(), and Verify().
void IsisAml::PutInteger | ( | const QString & | paramName, |
const int & | value ) |
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, ReturnParam(), Isis::toString(), and Verify().
void IsisAml::PutString | ( | const QString & | paramName, |
const QString & | value ) |
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, ReturnParam(), and Verify().
|
protected |
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 Clear(), CommandLine(), GetAsString(), GetBoolean(), GetCubeName(), GetDouble(), GetFileName(), GetInputAttribute(), GetInteger(), GetOutputAttribute(), GetParams(), GetString(), Isis::UserInterface::loadHistory(), PutAsString(), PutBoolean(), PutCubeName(), PutDouble(), PutFileName(), PutInteger(), PutString(), VerifyAll(), and WasEntered().
|
private |
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 appHandler, parser, and Isis::IException::Programmer.
Referenced by IsisAml().
bool IsisAml::StringToBool | ( | QString | value | ) | const |
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 Verify(), and VerifyAll().
|
private |
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 CheckFileNamePreference(), Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::IException::Programmer, StringToBool(), Isis::IString::ToDouble(), Isis::toInt(), Isis::IString::ToInteger(), Isis::IString::UpCase(), and Isis::IException::User.
Referenced by PutBoolean(), PutCubeName(), PutDouble(), PutFileName(), PutInteger(), PutString(), and VerifyAll().
void IsisAml::VerifyAll | ( | ) |
Verify all parameters.
Definition at line 2575 of file IsisAml.cpp.
References GetAsString(), GetDouble(), GetInteger(), GetString(), Isis::IException::Programmer, ReturnParam(), StringToBool(), Isis::IException::User, and Verify().
Referenced by Isis::Application::Run(), and Isis::UserInterface::SetBatchList().
QString IsisAml::Version | ( | ) | const |
Returns the application version date.
Definition at line 3176 of file IsisAml.cpp.
Referenced by Isis::Application::History().
bool IsisAml::WasEntered | ( | const QString & | paramName | ) | const |
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 ReturnParam().
Referenced by Isis::GuiParameter::SetToCurrent(), and Isis::GuiParameter::Update().
|
private |
|
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 |