USGS

Isis 3.0 Object Programmers' Reference

Home

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