MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / toInt

Function toInt

isis/src/core/src/IString.cpp:94–105  ·  view source on GitHub ↗

* Global function to convert from a string to an integer. This function is * preferred over the QString::toInt() method since this function will throw an * IException if the conversion is unsuccessful. * * @param string QString to be converted to an integer. * @return The integer equivalent to the string */

Source from the content-addressed store, hash-verified

92 * @return The integer equivalent to the string
93 */
94 int toInt(const QString &string) {
95 bool ok = true;
96
97 int result = string.toInt(&ok);
98
99 if (!ok) {
100 QString message = QObject::tr("Failed to convert string [%1] to an integer").arg(string);
101 throw IException(IException::Unknown, message, _FILEINFO_);
102 }
103
104 return result;
105 }
106
107
108 /**

Callers 15

eisstitchFunction · 0.85
translateCoreInfoFunction · 0.85
ciss2isisFunction · 0.85
IsisMainFunction · 0.85
ReadVimsBILFunction · 0.85
DarkCurrentMethod · 0.85
FindDarkFilesMethod · 0.85
ApolloPanoramicCameraMethod · 0.85
apolloremrxFunction · 0.85
apollofindrxFunction · 0.85
readPvlMethod · 0.85
readProtobufMethod · 0.85

Calls 1

IExceptionClass · 0.50

Tested by 2

mainFunction · 0.68
TEST_FFunction · 0.68