Isis 3 Programmer Reference
PvlToken.h
Go to the documentation of this file.
1 #ifndef PvlToken_h
2 #define PvlToken_h
3 
25 #include <vector>
26 #include <cctype>
27 
28 #include <QString>
29 
30 namespace Isis {
54  class PvlToken {
55  private:
56  QString m_key;
57  std::vector<QString> m_value;
61  public:
62  PvlToken(const QString &k);
63  PvlToken();
64  ~PvlToken();
65 
66  void setKey(const QString &k);
67  QString key() const;
68  QString keyUpper() const;
69 
70  void addValue(const QString &v);
71  QString value(const int index = 0) const;
72  QString valueUpper(const int index = 0) const;
73  int valueSize() const;
74  void valueClear();
75 
76  inline const std::vector<QString> &valueVector() const {
77  return m_value;
78  };
79  };
80 };
81 
82 #endif
PvlToken()
Constructs a Token with NULL for both the keyword and value list.
Definition: PvlToken.cpp:40
QString value(const int index=0) const
Returns one element of the value-vector.
Definition: PvlToken.cpp:110
int valueSize() const
Returns the number of elements in the value-vector.
Definition: PvlToken.cpp:87
void addValue(const QString &v)
Adds a value to the value-vector.
Definition: PvlToken.cpp:97
QString key() const
Returns the token keyword.
Definition: PvlToken.cpp:64
QString m_key
Storage for the keyword name.
Definition: PvlToken.h:56
Container for Keyword-value pair.
Definition: PvlToken.h:54
~PvlToken()
Destroys the Token object.
Definition: PvlToken.cpp:45
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
std::vector< QString > m_value
Vector storage for a list of values.
Definition: PvlToken.h:57
void setKey(const QString &k)
Set the token keyword.
Definition: PvlToken.cpp:55
QString keyUpper() const
Returns the token keyword in all uppercase characters.
Definition: PvlToken.cpp:73
QString valueUpper(const int index=0) const
Returns one element of the value-vector in uppercase.
Definition: PvlToken.cpp:127
void valueClear()
Removes all elements from the value-vector.
Definition: PvlToken.cpp:78