Isis Developer Reference
Pvl.h
Go to the documentation of this file.
1#ifndef Pvl_h
2#define Pvl_h
3
9/* SPDX-License-Identifier: CC0-1.0 */
10#include <fstream>
11#include "PvlObject.h"
12
13namespace 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
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
PvlContainer * m_formatTemplate
Definition PvlContainer.h:305
Container for cube-like labels.
Definition Pvl.h:119
void fromString(const std::string &str)
Load PVL information from a string.
Definition Pvl.cpp:60
void validatePvl(const Pvl &pPvl, Pvl &pPvlResults)
Validate a Pvl with the Template Pvl.
Definition Pvl.cpp:529
Pvl()
Constructs an empty Pvl object.
Definition Pvl.cpp:24
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition Pvl.cpp:130
const Pvl & operator=(const Pvl &other)
This is an assignment operator.
Definition Pvl.cpp:510
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
Definition Pvl.h:144
~Pvl()
Definition Pvl.h:129
void append(const QString &file)
Appends PVL information to a file and handles the end of line sequence.
Definition Pvl.cpp:184
void setFormatTemplate(Isis::Pvl &temp)
Definition Pvl.cpp:227
void read(const QString &file)
Loads PVL information from a stream.
Definition Pvl.cpp:90
friend std::ostream & operator<<(std::ostream &os, Isis::Pvl &pvl)
This stream will not handle the end of line sequence.
Definition Pvl.cpp:249
QString terminator() const
Returns the terminator used to signify the end of the PVL informationDefaults to "END".
Definition Pvl.h:153
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
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16