Loading isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp +14 −8 Original line number Diff line number Diff line Loading @@ -85,19 +85,26 @@ namespace Isis { */ void PvlTranslationTable::AddTable(const QString &transFile) { p_trnsTbl.read(FileName(transFile).expanded()); validateTable(); } /** * Adds the contents of a translation table to the searchable groups/keys * Also performs a verification, to ensure that the translation table * is valid * * @param transStm The stream to be added. */ void PvlTranslationTable::AddTable(std::istream &transStm) { transStm >> p_trnsTbl; validateTable(); } /** * Performs verification to ensure that p_trnsTbl is valid * */ void PvlTranslationTable::validateTable() { // pair< name, size > of acceptable keywords. // A size of -1 means non-zero size. vector< pair<QString, int> > validKeywordSizes = validKeywords(); Loading Loading @@ -458,4 +465,3 @@ namespace Isis { return ""; } } // end namespace isis isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.h +9 −3 Original line number Diff line number Diff line Loading @@ -110,6 +110,9 @@ namespace Isis { * renamed later) now returns a PvlKeyword. * @history 2017-11-04 Jeannie Backer - Modified Translation input value to make a case * insensitive comparison. * @history 2018-01-09 Summer Stapleton - Added validateTable() method called by both * AddTable() methods to check for validity of table being added by * either method. Fixes #4900. * * * Loading Loading @@ -154,6 +157,9 @@ namespace Isis { PvlKeyword &OutputPosition(const QString nName); QString OutputName(const QString nName); // Ensures that added table entries are valid void validateTable(); private: Pvl p_trnsTbl; }; Loading Loading
isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp +14 −8 Original line number Diff line number Diff line Loading @@ -85,19 +85,26 @@ namespace Isis { */ void PvlTranslationTable::AddTable(const QString &transFile) { p_trnsTbl.read(FileName(transFile).expanded()); validateTable(); } /** * Adds the contents of a translation table to the searchable groups/keys * Also performs a verification, to ensure that the translation table * is valid * * @param transStm The stream to be added. */ void PvlTranslationTable::AddTable(std::istream &transStm) { transStm >> p_trnsTbl; validateTable(); } /** * Performs verification to ensure that p_trnsTbl is valid * */ void PvlTranslationTable::validateTable() { // pair< name, size > of acceptable keywords. // A size of -1 means non-zero size. vector< pair<QString, int> > validKeywordSizes = validKeywords(); Loading Loading @@ -458,4 +465,3 @@ namespace Isis { return ""; } } // end namespace isis
isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.h +9 −3 Original line number Diff line number Diff line Loading @@ -110,6 +110,9 @@ namespace Isis { * renamed later) now returns a PvlKeyword. * @history 2017-11-04 Jeannie Backer - Modified Translation input value to make a case * insensitive comparison. * @history 2018-01-09 Summer Stapleton - Added validateTable() method called by both * AddTable() methods to check for validity of table being added by * either method. Fixes #4900. * * * Loading Loading @@ -154,6 +157,9 @@ namespace Isis { PvlKeyword &OutputPosition(const QString nName); QString OutputName(const QString nName); // Ensures that added table entries are valid void validateTable(); private: Pvl p_trnsTbl; }; Loading