Isis Developer Reference
PvlSequence.h
Go to the documentation of this file.
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::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::PvlSequence::operator[]
std::vector< QString > & operator[](int i)
Return the ith Array of the sequence.
Definition: PvlSequence.h:65
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::PvlSequence::operator=
PvlSequence & operator=(PvlKeyword &key)
Load a sequence using a Pvl keyword.
Definition: PvlSequence.cpp:25
IString.h
Isis::PvlSequence::Clear
void Clear()
Clear the sequence.
Definition: PvlSequence.h:75
Pvl.h
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
PvlKeyword.h
Isis::PvlKeyword::size
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
PvlSequence.h
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