Isis 3 Programmer Reference
PvlSequence.h
1 #ifndef PvlSequence_h
2 #define PvlSequence_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <vector>
10 
11 #include <QString>
12 
13 #include "PvlKeyword.h"
14 
15 namespace Isis {
46  class PvlSequence {
47  public:
50 
53 
55 
56  PvlSequence &operator+=(const QString &array);
57 
58  PvlSequence &operator+=(std::vector<QString> &array);
59 
60  PvlSequence &operator+=(std::vector<int> &array);
61 
62  PvlSequence &operator+=(std::vector<double> &array);
63 
65  std::vector<QString> &operator[](int i) {
66  return p_sequence[i];
67  };
68 
70  inline int Size() const {
71  return p_sequence.size();
72  };
73 
75  inline void Clear() {
76  p_sequence.clear();
77  };
78 
79  private:
80  std::vector<std::vector<QString> > p_sequence;
84  };
85 };
86 
87 #endif
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::PvlSequence::~PvlSequence
~PvlSequence()
Destruct sequence.
Definition: PvlSequence.h:52
Isis::PvlSequence::operator[]
std::vector< QString > & operator[](int i)
Return the ith Array of the sequence.
Definition: PvlSequence.h:65
Isis::PvlSequence::operator=
PvlSequence & operator=(PvlKeyword &key)
Load a sequence using a Pvl keyword.
Definition: PvlSequence.cpp:25
Isis::PvlSequence::Clear
void Clear()
Clear the sequence.
Definition: PvlSequence.h:75
Isis::PvlSequence::Size
int Size() const
Number of arrays in the sequence.
Definition: PvlSequence.h:70
Isis::PvlSequence::PvlSequence
PvlSequence()
Construct an empty sequence.
Definition: PvlSequence.h:49
Isis::PvlSequence::operator+=
PvlSequence & operator+=(const QString &array)
Add a string array to the sequence.
Definition: PvlSequence.cpp:39
Isis::PvlSequence::p_sequence
std::vector< std::vector< QString > > p_sequence
A vector of Strings that contains the values for the keyword.
Definition: PvlSequence.h:77
Isis::PvlSequence
Parse and return elements of a Pvl sequence.
Definition: PvlSequence.h:46
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16