|
Isis 3.0 Object Programmers' Reference |
Home |
#include <PvlSequence.h>
Collaboration diagram for Isis::PvlSequence:

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
PvlKeyword k; k += "(a,b,c)"; k += "(d,e)"; PvlSequence s = k; cout << s.Size() << endl; // should be 2 cout << s[0][0] << endl; // should be a cout << s[1][1] << endl; // should be e
For internal use only.
Definition at line 62 of file PvlSequence.h.
Public Member Functions | |
| PvlSequence () | |
| Construct an empty sequence. | |
| ~PvlSequence () | |
| Destruct sequence. | |
| PvlSequence & | operator= (PvlKeyword &key) |
| Load a sequence using a Pvl keyword. | |
| PvlSequence & | operator+= (const std::string &array) |
| Add a string array to the sequence. | |
| PvlSequence & | operator+= (std::vector< std::string > &array) |
| Add a vector of strings to the sequence. | |
| PvlSequence & | operator+= (std::vector< int > &array) |
| Add a vector of ints to the sequence. | |
| PvlSequence & | operator+= (std::vector< double > &array) |
| Add a vector of ints to the sequence. | |
| std::vector< iString > & | operator[] (int i) |
| Return the ith Array of the sequence. | |
| int | Size () const |
| Number of arrays in the sequence. | |
| void | Clear () |
| Clear the sequence. | |
Private Attributes | |
| std::vector< std::vector< iString > > | p_sequence |
| A vector of Strings that contains the values for the keyword. | |
| Isis::PvlSequence::PvlSequence | ( | ) | [inline] |
| Isis::PvlSequence::~PvlSequence | ( | ) | [inline] |
| void Isis::PvlSequence::Clear | ( | ) | [inline] |
| 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 101 of file PvlSequence.cpp.
References p_sequence.
| 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 86 of file PvlSequence.cpp.
References p_sequence.
| PvlSequence & Isis::PvlSequence::operator+= | ( | std::vector< std::string > & | 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 71 of file PvlSequence.cpp.
References p_sequence.
| PvlSequence & Isis::PvlSequence::operator+= | ( | const std::string & | 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 51 of file PvlSequence.cpp.
References p_sequence, pvl(), Isis::PvlKeyword::Size(), and str.
| 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 37 of file PvlSequence.cpp.
References Isis::PvlKeyword::Size().
| std::vector<iString>& Isis::PvlSequence::operator[] | ( | int | i | ) | [inline] |
Return the ith Array of the sequence.
Definition at line 81 of file PvlSequence.h.
References p_sequence.
| int Isis::PvlSequence::Size | ( | ) | const [inline] |
Number of arrays in the sequence.
Definition at line 84 of file PvlSequence.h.
References p_sequence.
Referenced by Isis::PvlKeyword::operator=(), and Isis::RadarSlantRangeMap::SetCoefficients().
std::vector<std::vector<iString> > Isis::PvlSequence::p_sequence [private] |
A vector of Strings that contains the values for the keyword.
Definition at line 87 of file PvlSequence.h.
Referenced by operator+=(), operator[](), and Size().