* Return a comment at the specified index. * @param index The index of the comment. * @return QString The comment at the index. * @throws iException ArraySubscriptNotInRange (index) Index out of bounds. */
| 593 | * @throws iException ArraySubscriptNotInRange (index) Index out of bounds. |
| 594 | */ |
| 595 | QString PvlKeyword::comment(int index) const { |
| 596 | if (!m_comments) return ""; |
| 597 | |
| 598 | if (index < 0 || index >= (int)m_comments->size()) { |
| 599 | QString msg = Message::ArraySubscriptNotInRange(index); |
| 600 | throw IException(IException::Programmer, msg, _FILEINFO_); |
| 601 | } |
| 602 | return (*m_comments)[index]; |
| 603 | }; |
| 604 | |
| 605 | /** |
| 606 | * Checks if the value needs to be converted to PVL or iPVL and returns it in |