Isis Developer Reference
ControlNetDiff.h
Go to the documentation of this file.
1#ifndef ControlNetDiff_h
2#define ControlNetDiff_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QString>
13
14template< typename A, typename B > class QMap;
15template< typename T > class QSet;
16
17namespace Isis {
18 class ControlNet;
19 class FileName;
20 class Pvl;
21 class PvlContainer;
22 class PvlKeyword;
23 class PvlObject;
24
54 public:
56 explicit ControlNetDiff(Pvl &diffFile);
57 virtual ~ControlNetDiff();
58
59 void addTolerances(Pvl &diffFile);
60 Pvl compare(FileName &net1Name, FileName &net2Name);
61
62
63 protected:
64 void compare(PvlObject &point1Pvl, PvlObject &point2Pvl, PvlObject &report);
65 void compareGroups(PvlContainer &g1, PvlContainer &g2, PvlObject &report);
66 void compare(PvlKeyword &k1, PvlKeyword &k2, PvlContainer &report);
67
68 void diff(QString name, PvlObject &o1, PvlObject &o2, PvlContainer &report);
69 void diff(QString name, QString v1, QString v2, PvlContainer &report);
70 PvlKeyword makeKeyword(QString name, QString v1, QString v2);
71
72 void diff(QString name, double v1, double v2, double tol, PvlContainer &report);
73 PvlKeyword makeKeyword(QString name, double v1, double v2, double tol);
74
75 void addUniquePoint(QString label, QString v1, QString v2, PvlObject &parent);
76 void addUniqueMeasure(QString label, QString v1, QString v2, PvlObject &parent);
77
78
79 private:
80 void init();
81
82 private:
84 QMap<QString, double> *m_tolerances;
85
87 QSet<QString> *m_ignoreKeys;
88 };
89}
90
91#endif
Compares two Control Networks and reports their differences.
Definition ControlNetDiff.h:53
void diff(QString name, PvlObject &o1, PvlObject &o2, PvlContainer &report)
Add a new difference keyword to the given report if the PvlObjects have different values for the keyw...
Definition ControlNetDiff.cpp:283
void addTolerances(Pvl &diffFile)
Add the given ignore keys and tolerances to the persisent collections of such values.
Definition ControlNetDiff.cpp:66
void addUniquePoint(QString label, QString v1, QString v2, PvlObject &parent)
Add a new keyword for the given point to the parent object.
Definition ControlNetDiff.cpp:376
ControlNetDiff()
Create a ControlNetDiff without any tolerances.
Definition ControlNetDiff.cpp:31
void addUniqueMeasure(QString label, QString v1, QString v2, PvlObject &parent)
Add a new keyword for the given measure to the parent object.
Definition ControlNetDiff.cpp:398
PvlKeyword makeKeyword(QString name, QString v1, QString v2)
Create a new keyword with the given label name and the given values.
Definition ControlNetDiff.cpp:317
void compareGroups(PvlContainer &g1, PvlContainer &g2, PvlObject &report)
Compare two collections, or groupings, of PvlKeywords.
Definition ControlNetDiff.cpp:212
virtual ~ControlNetDiff()
Destroy the ControlNetDiff.
Definition ControlNetDiff.cpp:50
Pvl compare(FileName &net1Name, FileName &net2Name)
Compare two Control Networks given their file names, and return their differences.
Definition ControlNetDiff.cpp:90
File name manipulation and expansion.
Definition FileName.h:100
Contains more than one keyword-value pair.
Definition PvlContainer.h:49
Container for cube-like labels.
Definition Pvl.h:119
A single keyword-value pair.
Definition PvlKeyword.h:87
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition CubeIoHandler.h:22
This is free and unencumbered software released into the public domain.
Definition Process.h:16
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16