Isis Developer Reference
PvlToken.h
Go to the documentation of this file.
1 #ifndef PvlToken_h
2 #define PvlToken_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <vector>
10 #include <cctype>
11 
12 #include <QString>
13 
14 namespace Isis {
38  class PvlToken {
39  private:
40  QString m_key;
41  std::vector<QString> m_value;
45  public:
46  PvlToken(const QString &k);
47  PvlToken();
48  ~PvlToken();
49 
50  void setKey(const QString &k);
51  QString key() const;
52  QString keyUpper() const;
53 
54  void addValue(const QString &v);
55  QString value(const int index = 0) const;
56  QString valueUpper(const int index = 0) const;
57  int valueSize() const;
58  void valueClear();
59 
60  inline const std::vector<QString> &valueVector() const {
61  return m_value;
62  };
63  };
64 };
65 
66 #endif
Isis::PvlToken::setKey
void setKey(const QString &k)
Set the token keyword.
Definition: PvlToken.cpp:40
Isis::PvlToken::value
QString value(const int index=0) const
Returns one element of the value-vector.
Definition: PvlToken.cpp:95
Isis::PvlToken::valueUpper
QString valueUpper(const int index=0) const
Returns one element of the value-vector in uppercase.
Definition: PvlToken.cpp:112
Isis::PvlToken::PvlToken
PvlToken()
Constructs a Token with NULL for both the keyword and value list.
Definition: PvlToken.cpp:25
Isis::PvlToken::~PvlToken
~PvlToken()
Destroys the Token object.
Definition: PvlToken.cpp:30
Isis::PvlToken::valueVector
const std::vector< QString > & valueVector() const
Definition: PvlToken.h:60
IString.h
Isis::PvlToken::key
QString key() const
Returns the token keyword.
Definition: PvlToken.cpp:49
Isis::PvlToken
Container for Keyword-value pair.
Definition: PvlToken.h:38
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::PvlToken::valueSize
int valueSize() const
Returns the number of elements in the value-vector.
Definition: PvlToken.cpp:72
Isis::PvlToken::valueClear
void valueClear()
Removes all elements from the value-vector.
Definition: PvlToken.cpp:63
Isis::IException
Isis exception class.
Definition: IException.h:91
IException.h
std
Namespace for the standard library.
Isis::PvlToken::addValue
void addValue(const QString &v)
Adds a value to the value-vector.
Definition: PvlToken.cpp:82
Isis::PvlToken::keyUpper
QString keyUpper() const
Returns the token keyword in all uppercase characters.
Definition: PvlToken.cpp:58
Isis::Message::ArraySubscriptNotInRange
QString ArraySubscriptNotInRange(int index)
This error should be used when an Isis object or application is checking array bounds and the legal r...
Definition: ArraySubscriptNotInRange.cpp:31
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Message.h
PvlToken.h