Isis 3 Programmer Reference
|
Parse and return elements of a Pvl sequence. More...
#include <PvlSequence.h>
Public Member Functions | |
PvlSequence () | |
Construct an empty sequence. More... | |
~PvlSequence () | |
Destruct sequence. More... | |
PvlSequence & | operator= (PvlKeyword &key) |
Load a sequence using a Pvl keyword. More... | |
PvlSequence & | operator+= (const QString &array) |
Add a string array to the sequence. More... | |
PvlSequence & | operator+= (std::vector< QString > &array) |
Add a vector of strings to the sequence. More... | |
PvlSequence & | operator+= (std::vector< int > &array) |
Add a vector of ints to the sequence. More... | |
PvlSequence & | operator+= (std::vector< double > &array) |
Add a vector of ints to the sequence. More... | |
std::vector< QString > & | operator[] (int i) |
Return the ith Array of the sequence. More... | |
int | Size () const |
Number of arrays in the sequence. More... | |
void | Clear () |
Clear the sequence. More... | |
Private Attributes | |
std::vector< std::vector< QString > > | p_sequence |
A vector of Strings that contains the values for the keyword. More... | |
Parse and return elements of a Pvl sequence.
A Pvl sequence is essentially an array of arrays. For example,
To extract the invidual arrays from a PvlKeyword you must use a PvlSequence.
Here is an example of how to use PvlSequence
Definition at line 46 of file PvlSequence.h.
|
inline |
Construct an empty sequence.
Definition at line 49 of file PvlSequence.h.
|
inline |
Destruct sequence.
Definition at line 52 of file PvlSequence.h.
|
inline |
PvlSequence & Isis::PvlSequence::operator+= | ( | const QString & | array | ) |
Add a string array to the sequence.
The values in the string must be enclosed in parens and comma separated. For example, (1,2,3).
array | A string representing an array. |
Definition at line 39 of file PvlSequence.cpp.
References p_sequence, and Isis::PvlKeyword::size().
Referenced by operator=().
PvlSequence & Isis::PvlSequence::operator+= | ( | std::vector< double > & | array | ) |
Add a vector of ints to the sequence.
This adds another array to the sequence whose values are all doubles.
array | vector of doubles |
Definition at line 89 of file PvlSequence.cpp.
References p_sequence, and Isis::toString().
PvlSequence & Isis::PvlSequence::operator+= | ( | std::vector< int > & | array | ) |
Add a vector of ints to the sequence.
This adds another array to the sequence whose values are all integers.
array | vector of integers |
Definition at line 74 of file PvlSequence.cpp.
References p_sequence, and Isis::toString().
PvlSequence & Isis::PvlSequence::operator+= | ( | std::vector< QString > & | array | ) |
Add a vector of strings to the sequence.
This adds another array to the sequence whose values are all strings
array | vector of strings |
Definition at line 59 of file PvlSequence.cpp.
References p_sequence.
PvlSequence & Isis::PvlSequence::operator= | ( | PvlKeyword & | key | ) |
Load a sequence using a Pvl keyword.
Each value of the PvlKeyword will be treated as an array for a sequence. Typically, the values in the PvlKeyword should be enclosed in parens and comma separated. For example, (a,b,c).
key | keyword containing sequence |
Definition at line 25 of file PvlSequence.cpp.
References operator+=(), and Isis::PvlKeyword::size().
|
inline |
Return the ith Array of the sequence.
Definition at line 65 of file PvlSequence.h.
References p_sequence.
|
inline |
Number of arrays in the sequence.
Definition at line 70 of file PvlSequence.h.
References p_sequence.
Referenced by Isis::PvlKeyword::operator=(), and Isis::RadarSlantRangeMap::SetCoefficients().
|
private |
A vector of Strings that contains the values for the keyword.
Definition at line 80 of file PvlSequence.h.
Referenced by Clear(), operator+=(), operator[](), and Size().