Isis 3 Programmer Reference
Isis::ControlPointV0001 Class Reference

A container for the information stored in a version 1 ControlPoint. More...

#include <ControlPointV0001.h>

Collaboration diagram for Isis::ControlPointV0001:
Collaboration graph

Public Member Functions

 ControlPointV0001 (PvlObject &pointObject, const QString targetName)
 Create a ControlPointV0001 object from a version 1 control point Pvl object. More...
 
 ControlPointV0001 (QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > pointData, QSharedPointer< ControlNetLogDataProtoV0001_Point > logData)
 Create a ControlPointV0001 object from a protobuf version 1 control point message. More...
 
QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > pointData ()
 Access the protobuf control point data. More...
 
QSharedPointer< ControlNetLogDataProtoV0001_Point > logData ()
 Access the protobuf log data for the control measures in the point. More...
 

Private Member Functions

 ControlPointV0001 ()
 Default constructor. More...
 
 ControlPointV0001 (const ControlPointV0001 &other)
 Copy constructor. More...
 
ControlPointV0001operator= (const ControlPointV0001 &other)
 Assignment operator. More...
 
void copy (PvlContainer &container, QString keyName, QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > point, void(ControlNetFileProtoV0001_PBControlPoint::*setter)(bool))
 This convenience method takes a boolean value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 
void copy (PvlContainer &container, QString keyName, QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > point, void(ControlNetFileProtoV0001_PBControlPoint::*setter)(double))
 This convenience method takes a double value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 
void copy (PvlContainer &container, QString keyName, QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > point, void(ControlNetFileProtoV0001_PBControlPoint::*setter)(const std::string &))
 This convenience method takes a string value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 
void copy (PvlContainer &container, QString keyName, ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &measure, void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*setter)(bool))
 This convenience method takes a boolean value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 
void copy (PvlContainer &container, QString keyName, ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &measure, void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*setter)(double))
 This convenience method takes a double value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 
void copy (PvlContainer &container, QString keyName, ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &measure, void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*setter)(const std::string &))
 This convenience method takes a string value from a PvlKeyword and copies it into a version 1 protobuf field. More...
 

Private Attributes

QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > m_pointData
 Protobuf container that holds information used to create a control point. More...
 
QSharedPointer< ControlNetLogDataProtoV0001_Point > m_logData
 Protobuf container that holds log data for the control measures in the point. More...
 

Detailed Description

A container for the information stored in a version 1 ControlPoint.

A wrapper around the version 1 protobuf serialization of a ControlPoint. It allows for reading ControlPoints serialized as both PvlObjects and protobuf messages.

This class is designed to be compatible with all Pvl formats created prior to the use of versioning. So, the PvlObject constructor has to work with several different formats. Hence, several different keywords are checked for the same value.

Because this version supports several different formats, there is no standardized set of keywords, but all version 1 Pvl control networks have the same high level structure. Control points are represented by objects contained in the ControlNetwork object. Control measures are represented by groups contained in the control point objects.

Once read in, the data is always stored in a protobuf message regardless of the source. This is done to optimize reading binary control network files. Because the protobuf format for version 1 control points is identical to the version 2 format, control points read from a version 1 file are automatically "converted" to version 2. This also makes the version 1 to 2 upgrade process as simple as passing a pointer.

Author
2017-12-18 Jesse Mapel
History:

2017-12-18 Jesse Mapel - Original version.

2017-12-21 Adam Goins - Changed Pvl constructor to take PvlObject.

2017-12-21 Jesse Mapel - Improved documentation.

2017-01-27 Jesse Mapel - More documentation improvements.

2018-06-28 Debbie A Cook - Removed all calls to obsolete method SurfacePoint::SetRadii. References #5457.

2018-07-11 Debbie A Cook - Removed obsolete tests for failure due to missing target radii. SurfacePoint now uses the local radius of the point to convert sigmas to target radii are no longer used. References #5457

Definition at line 76 of file ControlPointV0001.h.

Constructor & Destructor Documentation

◆ ControlPointV0001() [1/4]

Isis::ControlPointV0001::ControlPointV0001 ( PvlObject pointObject,
const QString  targetName 
)

Create a ControlPointV0001 object from a version 1 control point Pvl object.

Parameters
pointObjectThe control point and its measures in a Pvl object
targetNameThe name of the target

Definition at line 41 of file ControlPointV0001.cpp.

References _FILEINFO_, copy(), Isis::Angle::Degrees, Isis::PvlContainer::deleteKeyword(), Isis::PvlObject::hasKeyword(), Isis::PvlContainer::keywords(), m_pointData, Isis::Distance::Meters, Isis::Displacement::meters(), Isis::toDouble(), and Isis::IException::User.

◆ ControlPointV0001() [2/4]

Isis::ControlPointV0001::ControlPointV0001 ( QSharedPointer< ControlNetFileProtoV0001_PBControlPoint >  pointData,
QSharedPointer< ControlNetLogDataProtoV0001_Point >  logData 
)

Create a ControlPointV0001 object from a protobuf version 1 control point message.

Parameters
pointDataThe protobuf message from a control net file.
logDataThe accompanying protobuf control measure log data for the point.

Definition at line 27 of file ControlPointV0001.cpp.

◆ ControlPointV0001() [3/4]

Isis::ControlPointV0001::ControlPointV0001 ( )
private

Default constructor.

Intentionally un-implemented.

◆ ControlPointV0001() [4/4]

Isis::ControlPointV0001::ControlPointV0001 ( const ControlPointV0001 other)
private

Copy constructor.

Intentionally un-implemented.

Parameters
otherThe other ControlPointV0001 to copy from.

Member Function Documentation

◆ copy() [1/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
QSharedPointer< ControlNetFileProtoV0001_PBControlPoint >  point,
void(ControlNetFileProtoV0001_PBControlPoint::*)(bool)  setter 
)
private

This convenience method takes a boolean value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control point that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]pointThe version 1 protobuf representation of the control point that the value will be copied into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 586 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::hasKeyword().

Referenced by ControlPointV0001().

◆ copy() [2/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
QSharedPointer< ControlNetFileProtoV0001_PBControlPoint >  point,
void(ControlNetFileProtoV0001_PBControlPoint::*)(double)  setter 
)
private

This convenience method takes a double value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control point that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]pointThe version 1 protobuf representation of the control point that the value will be copied into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 619 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::hasKeyword(), and Isis::toDouble().

◆ copy() [3/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
QSharedPointer< ControlNetFileProtoV0001_PBControlPoint >  point,
void(ControlNetFileProtoV0001_PBControlPoint::*)(const std::string &)  setter 
)
private

This convenience method takes a string value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control point that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]pointThe version 1 protobuf representation of the control point that the value will be copied into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 648 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::hasKeyword().

◆ copy() [4/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &  measure,
void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*)(bool)  setter 
)
private

This convenience method takes a boolean value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control measure that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]measureThe version 1 protobuf representation of the control measure that the value will be copied into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 677 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::hasKeyword().

◆ copy() [5/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &  measure,
void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*)(double)  setter 
)
private

This convenience method takes a double value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control measure that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]measureThe version 1 protobuf representation of the control measure that the value will be copied into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 710 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::hasKeyword(), Isis::Null, and Isis::toDouble().

◆ copy() [6/6]

void Isis::ControlPointV0001::copy ( PvlContainer container,
QString  keyName,
ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure &  measure,
void(ControlNetFileProtoV0001_PBControlPoint_PBControlMeasure::*)(const std::string &)  setter 
)
private

This convenience method takes a string value from a PvlKeyword and copies it into a version 1 protobuf field.

Once copied, the PvlKeyword is deleted.

If the keyword doesn't exist, this does nothing.

Parameters
containerThe PvlContainer representation of the control measure that contains the PvlKeyword.
keyNameThe name of the keyword to be copied.
[out]measureThe version 1 protobuf representation of the control measure that the value will be into.
setterThe protobuf mutator method that sets the value of the field in the protobuf representation.

Definition at line 744 of file ControlPointV0001.cpp.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::hasKeyword().

◆ logData()

QSharedPointer< ControlNetLogDataProtoV0001_Point > Isis::ControlPointV0001::logData ( )

Access the protobuf log data for the control measures in the point.

Returns
QSharedPointer<ControlNetLogDataProtoV0001_Point> A pointer to the internal measure log data.

Definition at line 567 of file ControlPointV0001.cpp.

References m_logData.

◆ operator=()

ControlPointV0001& Isis::ControlPointV0001::operator= ( const ControlPointV0001 other)
private

Assignment operator.

Intentionally un-implemented.

Parameters
otherThe other ControlPointV0001 to assign from.
Returns
ControlPointV0001& A reference to this after assignment.

◆ pointData()

QSharedPointer< ControlNetFileProtoV0001_PBControlPoint > Isis::ControlPointV0001::pointData ( )

Access the protobuf control point data.

Returns
QSharedPointer<ControlNetFileProtoV0001_PBControlPoint> A pointer to the internal control point data.

Definition at line 556 of file ControlPointV0001.cpp.

References m_pointData.

Member Data Documentation

◆ m_logData

QSharedPointer<ControlNetLogDataProtoV0001_Point> Isis::ControlPointV0001::m_logData
private

Protobuf container that holds log data for the control measures in the point.

Definition at line 134 of file ControlPointV0001.h.

Referenced by logData().

◆ m_pointData

QSharedPointer<ControlNetFileProtoV0001_PBControlPoint> Isis::ControlPointV0001::m_pointData
private

Protobuf container that holds information used to create a control point.

Definition at line 132 of file ControlPointV0001.h.

Referenced by ControlPointV0001(), and pointData().


The documentation for this class was generated from the following files: