Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
ControlNetVersioner.h
Go to the documentation of this file.
1#ifndef ControlNetVersioner_h
2#define ControlNetVersioner_h
3
9
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QString>
13
14#include <QList>
15#include <QSharedPointer>
16#include <QVector>
17
18#include "ControlPoint.h"
19#include "ControlPointV0001.h"
20#include "ControlPointV0002.h"
21#include "ControlPointV0003.h"
22
23class QString;
24
25namespace Isis {
26 class FileName;
27 class Progress;
28 class Pvl;
29 class PvlContainer;
30 class PvlObject;
34
413
414 public:
416 ControlNetVersioner(const FileName netFile, Progress *progress=NULL);
418
419 QString netId() const;
420 QString targetName() const;
421 QString creationDate() const;
422 QString lastModificationDate() const;
423 QString description() const;
424 QString userName() const;
425
426 int numPoints() const;
428
429 void write(FileName netFile);
430 Pvl toPvl();
431
432 private:
433 // These three methods are private to ensure proper memory management
449 ControlNetVersioner &operator=(const ControlNetVersioner &other);
450
451 // Private ControlNetHeader structs for versioning
462 struct ControlNetHeaderV0001 {
464 QString networkID;
466 QString targetName;
468 QString created;
470 QString lastModified;
472 QString description;
474 QString userName;
475 };
476
478 typedef ControlNetHeaderV0001 ControlNetHeaderV0002;
480 typedef ControlNetHeaderV0001 ControlNetHeaderV0003;
482 typedef ControlNetHeaderV0001 ControlNetHeaderV0004;
484 typedef ControlNetHeaderV0001 ControlNetHeaderV0005;
485
487 typedef ControlPointV0003 ControlPointV0004;
489 typedef ControlPointV0003 ControlPointV0005;
490
491 void read(const FileName netFile, Progress *progress=NULL);
492
493 void readPvl(const Pvl &network, Progress *progress=NULL);
494 void readPvlV0001(const PvlObject &network, Progress *progress=NULL);
495 void readPvlV0002(const PvlObject &network, Progress *progress=NULL);
496 void readPvlV0003(const PvlObject &network, Progress *progress=NULL);
497 void readPvlV0004(const PvlObject &network, Progress *progress=NULL);
498 void readPvlV0005(const PvlObject &network, Progress *progress=NULL);
499
500 void readProtobuf(const Pvl &header, const FileName netFile, Progress *progress=NULL);
501 void readProtobufV0001(const Pvl &header, const FileName netFile, Progress *progress=NULL);
502 void readProtobufV0002(const Pvl &header, const FileName netFile, Progress *progress=NULL);
503 void readProtobufV0005(const Pvl &header, const FileName netFile, Progress *progress=NULL);
504
505 void readParquet(const FileName netFile, Progress *progress=NULL);
506 void writeParquet(const FileName netFile);
507
508 ControlPoint *createPoint(ControlPointV0001 &point);
509 ControlPoint *createPoint(ControlPointV0002 &point);
510 ControlPoint *createPoint(ControlPointV0003 &point);
511
512 ControlMeasure *createMeasure(const ControlPointFileEntryV0002_Measure&);
513
514 void createHeader(const ControlNetHeaderV0001 header);
515
516 void writeHeader(std::fstream *output);
517 int writeFirstPoint(std::fstream *output);
518 void fillPointProto(ControlPoint *controlPoint, ControlPointFileEntryV0002 &protoPoint);
519
520 ControlNetHeaderV0005 m_header;
522 QList<ControlPoint *> m_points;
524 bool m_ownsPoints;
528
529 };
530}
531#endif
a control measurement
Definition ControlMeasure.h:175
a control network
Definition ControlNet.h:257
int numPoints() const
Returns the number of points that have been read in or are ready to write out.
Definition ControlNetVersioner.cpp:179
QString netId() const
Returns the ID for the network.
Definition ControlNetVersioner.cpp:119
Pvl toPvl()
Generates a Pvl file from the currently stored control points and header.
Definition ControlNetVersioner.cpp:207
ControlNetVersioner(ControlNet *net)
Construct a ControlNetVersioner from a control network.
Definition ControlNetVersioner.cpp:66
QString creationDate() const
Returns the date and time that the network was created.
Definition ControlNetVersioner.cpp:139
QString targetName() const
Returns the target for the network.
Definition ControlNetVersioner.cpp:129
ControlPoint * takeFirstPoint()
Returns the first point stored in the versioner's internal list.
Definition ControlNetVersioner.cpp:192
~ControlNetVersioner()
Destroy a ControlNetVersioner.
Definition ControlNetVersioner.cpp:103
QString userName() const
Returns the name of the last person or program to modify the network.
Definition ControlNetVersioner.cpp:169
QString lastModificationDate() const
Returns the date and time of the last modification to the network.
Definition ControlNetVersioner.cpp:149
void write(FileName netFile)
This will write a control net file object to disk.
Definition ControlNetVersioner.cpp:1667
QString description() const
Returns the network's description.
Definition ControlNetVersioner.cpp:159
A single control point.
Definition ControlPoint.h:354
A container for the information stored in a version 1 ControlPoint.
Definition ControlPointV0001.h:62
A container for the information stored in a version 2 ControlPoint.
Definition ControlPointV0002.h:154
A container for the information stored in a version 3 and 4 ControlPoint.
Definition ControlPointV0003.h:160
Program progress reporter.
Definition Progress.h:42
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16