Isis 3 Programmer Reference
Pvl.h
1 #ifndef Pvl_h
2 #define Pvl_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 #include <fstream>
11 #include "PvlObject.h"
12 
13 namespace Isis {
119  class Pvl : public Isis::PvlObject {
120  public:
121  Pvl();
122  Pvl(const QString &file);
123  Pvl(const Pvl &other);
124 
125  friend std::istream &operator>>(std::istream &is, Pvl &pvl);
126  friend std::ostream &operator<<(std::ostream &os, Isis::Pvl &pvl);
127  void fromString(const std::string &str);
128 
129  ~Pvl() {
130  if(m_internalTemplate) delete m_formatTemplate;
131  };
132 
133  void read(const QString &file);
134 
135  void write(const QString &file);
136  void append(const QString &file);
137 
144  void setTerminator(const QString &term) {
145  m_terminator = term;
146  };
153  QString terminator() const {
154  return m_terminator;
155  };
156 
157  void setFormatTemplate(Isis::Pvl &temp);
158  void setFormatTemplate(const QString &filename);
159 
160  const Pvl &operator=(const Pvl &other);
161 
163  void validatePvl(const Pvl & pPvl, Pvl & pPvlResults);
164 
165  private:
166  void init();
167  bool m_internalTemplate;
168  QString m_terminator;
170  };
171 };
172 #endif
Isis::Pvl::m_terminator
QString m_terminator
Terminator used to signify the end of the PVL informationDefaults to "END".
Definition: Pvl.h:168
Isis::Pvl::operator<<
friend std::ostream & operator<<(std::ostream &os, Isis::Pvl &pvl)
This stream will not handle the end of line sequence.
Definition: Pvl.cpp:249
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::Pvl::append
void append(const QString &file)
Appends PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:184
Isis::Pvl::fromString
void fromString(const std::string &str)
Load PVL information from a string.
Definition: Pvl.cpp:60
Isis::Pvl::operator>>
friend std::istream & operator>>(std::istream &is, Pvl &pvl)
Reads keywords from the instream and appends them to the Pvl object.
Definition: Pvl.cpp:403
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::Pvl::write
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:130
Isis::Pvl::validatePvl
void validatePvl(const Pvl &pPvl, Pvl &pPvlResults)
Validate a Pvl with the Template Pvl.
Definition: Pvl.cpp:529
Isis::Pvl::init
void init()
initializes the class
Definition: Pvl.cpp:48
Isis::Pvl::read
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:90
Isis::Pvl::operator=
const Pvl & operator=(const Pvl &other)
This is an assignment operator.
Definition: Pvl.cpp:510
Isis::Pvl::terminator
QString terminator() const
Returns the terminator used to signify the end of the PVL informationDefaults to "END".
Definition: Pvl.h:153
Isis::Pvl::Pvl
Pvl()
Constructs an empty Pvl object.
Definition: Pvl.cpp:24
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Pvl::setTerminator
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
Definition: Pvl.h:144