Isis Developer Reference
PvlToken.h
Go to the documentation of this file.
1#ifndef PvlToken_h
2#define PvlToken_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <vector>
10#include <cctype>
11
12#include <QString>
13
14namespace 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
Container for Keyword-value pair.
Definition PvlToken.h:38
QString keyUpper() const
Returns the token keyword in all uppercase characters.
Definition PvlToken.cpp:58
~PvlToken()
Destroys the Token object.
Definition PvlToken.cpp:30
int valueSize() const
Returns the number of elements in the value-vector.
Definition PvlToken.cpp:72
QString valueUpper(const int index=0) const
Returns one element of the value-vector in uppercase.
Definition PvlToken.cpp:112
const std::vector< QString > & valueVector() const
Definition PvlToken.h:60
void valueClear()
Removes all elements from the value-vector.
Definition PvlToken.cpp:63
QString key() const
Returns the token keyword.
Definition PvlToken.cpp:49
QString value(const int index=0) const
Returns one element of the value-vector.
Definition PvlToken.cpp:95
PvlToken()
Constructs a Token with NULL for both the keyword and value list.
Definition PvlToken.cpp:25
void addValue(const QString &v)
Adds a value to the value-vector.
Definition PvlToken.cpp:82
void setKey(const QString &k)
Set the token keyword.
Definition PvlToken.cpp:40
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16