USGS

Isis 3.0 Developer's Reference (API)

Home

Pvl.h

Go to the documentation of this file.
00001 #ifndef Pvl_h
00002 #define Pvl_h
00003 
00026 #include <fstream>
00027 #include "PvlObject.h"
00028 
00029 namespace Isis {
00134   class Pvl : public Isis::PvlObject {
00135     public:
00136       Pvl();
00137       Pvl(const std::string &file);
00138       Pvl(const Pvl &other);
00139 
00140       friend std::istream &operator>>(std::istream &is, Pvl &pvl);
00141       friend std::ostream &operator<<(std::ostream &os, Isis::Pvl &pvl);
00142 
00143       ~Pvl() {
00144         if(p_internalTemplate) delete p_formatTemplate;
00145       };
00146 
00147       void Read(const std::string &file);
00148 
00149       void Write(const std::string &file);
00150       void Append(const std::string &file);
00151 
00158       void SetTerminator(const std::string &term) {
00159         p_terminator = term;
00160       };
00167       std::string Terminator() const {
00168         return p_terminator;
00169       };
00170 
00171       void SetFormatTemplate(Isis::Pvl &temp);
00172       void SetFormatTemplate(const std::string &filename);
00173 
00174       const Pvl &operator=(const Pvl &other);
00175       
00177       void ValidatePvl(const Pvl & pPvl, Pvl & pPvlResults);
00178 
00179     private:
00180       void Init();
00181       bool p_internalTemplate;
00182       std::string p_terminator; 
00184   };
00185 };
00186 #endif