Isis 3 Developer Reference
Pvl.h
Go to the documentation of this file.
1 #ifndef Pvl_h
2 #define Pvl_h
3 
26 #include <fstream>
27 #include "PvlObject.h"
28 
29 namespace Isis {
135  class Pvl : public Isis::PvlObject {
136  public:
137  Pvl();
138  Pvl(const QString &file);
139  Pvl(const Pvl &other);
140 
141  friend std::istream &operator>>(std::istream &is, Pvl &pvl);
142  friend std::ostream &operator<<(std::ostream &os, Isis::Pvl &pvl);
143 
144  ~Pvl() {
145  if(m_internalTemplate) delete m_formatTemplate;
146  };
147 
148  void read(const QString &file);
149 
150  void write(const QString &file);
151  void append(const QString &file);
152 
159  void setTerminator(const QString &term) {
160  m_terminator = term;
161  };
168  QString terminator() const {
169  return m_terminator;
170  };
171 
172  void setFormatTemplate(Isis::Pvl &temp);
173  void setFormatTemplate(const QString &filename);
174 
175  const Pvl &operator=(const Pvl &other);
176 
178  void validatePvl(const Pvl & pPvl, Pvl & pPvlResults);
179 
180  private:
181  void init();
182  bool m_internalTemplate;
183  QString m_terminator;
185  };
186 };
187 #endif
friend std::istream & operator>>(std::istream &is, Pvl &pvl)
Reads keywords from the instream and appends them to the Pvl object.
Definition: Pvl.cpp:389
PvlContainer * m_formatTemplate
Definition: PvlContainer.h:319
void append(const QString &file)
Appends PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:170
void setFormatTemplate(Isis::Pvl &temp)
Definition: Pvl.cpp:213
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
Definition: Pvl.h:159
~Pvl()
Definition: Pvl.h:144
void validatePvl(const Pvl &pPvl, Pvl &pPvlResults)
Validate a Pvl with the Template Pvl.
Definition: Pvl.cpp:515
Container for cube-like labels.
Definition: Pvl.h:135
Pvl()
Constructs an empty Pvl object.
Definition: Pvl.cpp:38
const Pvl & operator=(const Pvl &other)
This is an assignment operator.
Definition: Pvl.cpp:496
friend std::ostream & operator<<(std::ostream &os, Isis::Pvl &pvl)
This stream will not handle the end of line sequence.
Definition: Pvl.cpp:235
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:116
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:76
QString terminator() const
Returns the terminator used to signify the end of the PVL informationDefaults to "END".
Definition: Pvl.h:168