File failed to load: https://isis.astrogeology.usgs.gov/dev/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
Pvl.h
Go to the documentation of this file.
1#ifndef Pvl_h
2#define Pvl_h
3
8
9/* SPDX-License-Identifier: CC0-1.0 */
10#include <fstream>
11
12#include "PvlObject.h"
13
14#include <gdal_priv.h>
15
16namespace Isis {
122 class Pvl : public Isis::PvlObject {
123 public:
124 Pvl();
125 Pvl(const QString &file);
126 Pvl(const Pvl &other);
127
128 friend std::istream &operator>>(std::istream &is, Pvl &pvl);
129 friend std::ostream &operator<<(std::ostream &os, Isis::Pvl &pvl);
130 void fromString(const std::string &str);
131
132 static Isis::PvlObject &readObject(Isis::PvlObject &pvlobj, nlohmann::ordered_json jdata);
133 nlohmann::ordered_json toJson();
134
136 if(m_internalTemplate) delete m_formatTemplate;
137 };
138
139 void read(const QString &file);
140
141 void write(const QString &file);
142 void append(const QString &file);
143
150 void setTerminator(const QString &term) {
151 m_terminator = term;
152 };
153
159 QString terminator() const {
160 return m_terminator;
161 };
162
163 void setFormatTemplate(Isis::Pvl &temp);
164 void setFormatTemplate(const QString &filename);
165
166 const Pvl &operator=(const Pvl &other);
167
169 void validatePvl(const Pvl & pPvl, Pvl & pPvlResults);
170
171 private:
172 void init();
173 bool m_internalTemplate;
174 QString m_terminator;
176 };
177};
178#endif
PvlContainer * m_formatTemplate
Definition PvlContainer.h:305
Container for cube-like labels.
Definition Pvl.h:122
void fromString(const std::string &str)
Load PVL information from a string.
Definition Pvl.cpp:166
void validatePvl(const Pvl &pPvl, Pvl &pPvlResults)
Validate a Pvl with the Template Pvl.
Definition Pvl.cpp:635
Pvl()
Constructs an empty Pvl object.
Definition Pvl.cpp:33
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition Pvl.cpp:236
const Pvl & operator=(const Pvl &other)
This is an assignment operator.
Definition Pvl.cpp:616
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
Definition Pvl.h:150
~Pvl()
Definition Pvl.h:135
void append(const QString &file)
Appends PVL information to a file and handles the end of line sequence.
Definition Pvl.cpp:290
void setFormatTemplate(Isis::Pvl &temp)
Definition Pvl.cpp:333
void read(const QString &file)
Loads PVL information from a stream.
Definition Pvl.cpp:196
nlohmann::ordered_json toJson()
Definition Pvl.cpp:110
friend std::ostream & operator<<(std::ostream &os, Isis::Pvl &pvl)
This stream will not handle the end of line sequence.
Definition Pvl.cpp:355
static Isis::PvlObject & readObject(Isis::PvlObject &pvlobj, nlohmann::ordered_json jdata)
Definition Pvl.cpp:63
QString terminator() const
Returns the terminator used to signify the end of the PVL informationDefaults to "END".
Definition Pvl.h:159
friend std::istream & operator>>(std::istream &is, Pvl &pvl)
Reads keywords from the instream and appends them to the Pvl object.
Definition Pvl.cpp:509
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