Isis 3 Programmer Reference
PvlToken.h
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::key
QString key() const
Returns the token keyword.
Definition: PvlToken.cpp:49
Isis::PvlToken
Container for Keyword-value pair.
Definition: PvlToken.h:38
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::PvlToken::m_key
QString m_key
Storage for the keyword name.
Definition: PvlToken.h:40
Isis::PvlToken::addValue
void addValue(const QString &v)
Adds a value to the value-vector.
Definition: PvlToken.cpp:82
Isis::PvlToken::m_value
std::vector< QString > m_value
Vector storage for a list of values.
Definition: PvlToken.h:41
Isis::PvlToken::keyUpper
QString keyUpper() const
Returns the token keyword in all uppercase characters.
Definition: PvlToken.cpp:58
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16