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 
14 template< typename A, typename B > class QMap;
15 template< typename T > class QSet;
16 
17 namespace 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
Isis::PvlKeyword::name
QString name() const
Returns the keyword name.
Definition: PvlKeyword.h:98
FileName.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::PvlObject::group
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
ControlNetVersioner.h
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
QList< QString >
Isis::ControlNetDiff::addUniquePoint
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:378
Isis::FileName::name
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
Isis::ControlNetDiff::diff
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:285
Isis::PvlContainer::addKeyword
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Definition: PvlContainer.cpp:202
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ControlNetDiff::compare
Pvl compare(FileName &net1Name, FileName &net2Name)
Compare two Control Networks given their file names, and return their differences.
Definition: ControlNetDiff.cpp:92
QSet< QString >
Isis::PvlKeyword::addValue
void addValue(QString value, QString unit="")
Adds a value with units.
Definition: PvlKeyword.cpp:252
PvlGroup.h
Isis::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::PvlObject::hasGroup
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
Isis::ControlNetDiff::addTolerances
void addTolerances(Pvl &diffFile)
Add the given ignore keys and tolerances to the persisent collections of such values.
Definition: ControlNetDiff.cpp:68
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::PvlObject::addObject
void addObject(const PvlObject &object)
Add a PvlObject.
Definition: PvlObject.h:307
Isis::PvlObject::object
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
ControlNetDiff.h
ControlNet.h
Isis::ControlNetDiff::makeKeyword
PvlKeyword makeKeyword(QString name, QString v1, QString v2)
Create a new keyword with the given label name and the given values.
Definition: ControlNetDiff.cpp:319
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::ControlNetDiff::ControlNetDiff
ControlNetDiff()
Create a ControlNetDiff without any tolerances.
Definition: ControlNetDiff.cpp:33
Isis::ControlNetDiff
Compares two Control Networks and reports their differences.
Definition: ControlNetDiff.h:53
Isis::ControlNetVersioner::netId
QString netId() const
Returns the ID for the network.
Definition: ControlNetVersioner.cpp:114
Isis::BigInt
long long int BigInt
Big int.
Definition: Constants.h:49
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::ControlNetDiff::compareGroups
void compareGroups(PvlContainer &g1, PvlContainer &g2, PvlObject &report)
Compare two collections, or groupings, of PvlKeywords.
Definition: ControlNetDiff.cpp:214
ControlPoint.h
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::ControlNetDiff::~ControlNetDiff
virtual ~ControlNetDiff()
Destroy the ControlNetDiff.
Definition: ControlNetDiff.cpp:52
Isis::ControlNetVersioner::targetName
QString targetName() const
Returns the target for the network.
Definition: ControlNetVersioner.cpp:124
Isis::ControlNetVersioner::numPoints
int numPoints() const
Returns the number of points that have been read in or are ready to write out.
Definition: ControlNetVersioner.cpp:174
Isis::PvlObject::addGroup
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
PvlContainer.h
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::ControlNetDiff::addUniqueMeasure
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:400
PvlKeyword.h
Isis::ControlNetVersioner::toPvl
Pvl toPvl()
Generates a Pvl file from the currently stored control points and header.
Definition: ControlNetVersioner.cpp:202
PvlObject.h
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::PvlContainer::keywords
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
Isis::PvlObject::findKeyword
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
Definition: PvlObject.cpp:177
Isis::PvlContainer::findKeyword
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Definition: PvlContainer.cpp:62
Isis::PvlContainer
Contains more than one keyword-value pair.
Definition: PvlContainer.h:49
IsisDebug.h
ControlMeasure.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlNetVersioner
Handle various control network file format versions.
Definition: ControlNetVersioner.h:412