Loading isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp +0 −54 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ #include <QVariant> #include "ControlNetFileV0001.pb.h" #include "ControlNetFileV0002.pb.h" #include "PvlKeyword.h" #include "SpecialPixel.h" Loading Loading @@ -57,35 +55,6 @@ namespace Isis { p_numericalValue = toDouble(keywordRep[0]); } /** * This creates an instance based on the protocol buffer. This assumes the * protocol buffer is correct and does no extra validation. * * @param protoBuf The protocol buffer version of a log data */ ControlMeasureLogData::ControlMeasureLogData( const ControlNetLogDataProtoV0001_Point_Measure_DataEntry &protoBuf) { p_dataType = (NumericLogDataType)protoBuf.datatype(); p_numericalValue = protoBuf.datavalue(); } /** * This creates an instance based on the protocol buffer. This assumes the * protocol buffer is correct and does no extra validation. * * @param protoBuf The protocol buffer version of a log data */ ControlMeasureLogData::ControlMeasureLogData( const ControlPointFileEntryV0002_Measure_MeasureLogData &protoBuf) { if(protoBuf.has_doubledatatype()) { p_dataType = (NumericLogDataType)protoBuf.doubledatatype(); p_numericalValue = protoBuf.doubledatavalue(); } } /** * Copy constructor. * Loading Loading @@ -193,29 +162,6 @@ namespace Isis { return PvlKeyword(); } /** * This converts the log data to a protocol buffer object. This should be * understandable by the constructor that takes a protocol buffer object. * * @return A protocol buffer representation of this log data */ ControlPointFileEntryV0002_Measure_MeasureLogData ControlMeasureLogData::ToProtocolBuffer() const { if(!IsValid()) { IString msg = "Cannot write an invalid log data entry to binary format"; throw IException(IException::Programmer, msg, _FILEINFO_); } ControlPointFileEntryV0002_Measure_MeasureLogData protoBufDataEntry; protoBufDataEntry.set_doubledatatype(p_dataType); protoBufDataEntry.set_doubledatavalue(p_numericalValue); return protoBufDataEntry; } /** * This converts a string to a log data type and is useful for converting Pvl * keywords to Numeric Log Data Type. Loading isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.h +1 −9 Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ class QString; class QVariant; namespace Isis { class ControlNetLogDataProtoV0001_Point_Measure_DataEntry; class ControlPointFileEntryV0002_Measure_MeasureLogData; class PvlKeyword; /** Loading @@ -47,6 +45,7 @@ namespace Isis { * @history 2011-04-04 Steven Lambright - Added error checking to the * conversion to protocol buffer * @history 2011-04-11 Steven Lambright - Added GetValue method * @history 2012-12-21 Adam Goins - Removed protobuf references. */ class ControlMeasureLogData { public: Loading Loading @@ -129,10 +128,6 @@ namespace Isis { ControlMeasureLogData(NumericLogDataType); ControlMeasureLogData(PvlKeyword); ControlMeasureLogData(NumericLogDataType, double value); ControlMeasureLogData( const ControlNetLogDataProtoV0001_Point_Measure_DataEntry &); ControlMeasureLogData( const ControlPointFileEntryV0002_Measure_MeasureLogData &); ControlMeasureLogData(const ControlMeasureLogData & other); ~ControlMeasureLogData(); Loading @@ -145,9 +140,6 @@ namespace Isis { bool IsValid() const; PvlKeyword ToKeyword() const; ControlPointFileEntryV0002_Measure_MeasureLogData ToProtocolBuffer() const; NumericLogDataType NameToDataType(QString name) const; QString DataTypeToName(NumericLogDataType) const; Loading Loading
isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp +0 −54 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ #include <QVariant> #include "ControlNetFileV0001.pb.h" #include "ControlNetFileV0002.pb.h" #include "PvlKeyword.h" #include "SpecialPixel.h" Loading Loading @@ -57,35 +55,6 @@ namespace Isis { p_numericalValue = toDouble(keywordRep[0]); } /** * This creates an instance based on the protocol buffer. This assumes the * protocol buffer is correct and does no extra validation. * * @param protoBuf The protocol buffer version of a log data */ ControlMeasureLogData::ControlMeasureLogData( const ControlNetLogDataProtoV0001_Point_Measure_DataEntry &protoBuf) { p_dataType = (NumericLogDataType)protoBuf.datatype(); p_numericalValue = protoBuf.datavalue(); } /** * This creates an instance based on the protocol buffer. This assumes the * protocol buffer is correct and does no extra validation. * * @param protoBuf The protocol buffer version of a log data */ ControlMeasureLogData::ControlMeasureLogData( const ControlPointFileEntryV0002_Measure_MeasureLogData &protoBuf) { if(protoBuf.has_doubledatatype()) { p_dataType = (NumericLogDataType)protoBuf.doubledatatype(); p_numericalValue = protoBuf.doubledatavalue(); } } /** * Copy constructor. * Loading Loading @@ -193,29 +162,6 @@ namespace Isis { return PvlKeyword(); } /** * This converts the log data to a protocol buffer object. This should be * understandable by the constructor that takes a protocol buffer object. * * @return A protocol buffer representation of this log data */ ControlPointFileEntryV0002_Measure_MeasureLogData ControlMeasureLogData::ToProtocolBuffer() const { if(!IsValid()) { IString msg = "Cannot write an invalid log data entry to binary format"; throw IException(IException::Programmer, msg, _FILEINFO_); } ControlPointFileEntryV0002_Measure_MeasureLogData protoBufDataEntry; protoBufDataEntry.set_doubledatatype(p_dataType); protoBufDataEntry.set_doubledatavalue(p_numericalValue); return protoBufDataEntry; } /** * This converts a string to a log data type and is useful for converting Pvl * keywords to Numeric Log Data Type. Loading
isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.h +1 −9 Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ class QString; class QVariant; namespace Isis { class ControlNetLogDataProtoV0001_Point_Measure_DataEntry; class ControlPointFileEntryV0002_Measure_MeasureLogData; class PvlKeyword; /** Loading @@ -47,6 +45,7 @@ namespace Isis { * @history 2011-04-04 Steven Lambright - Added error checking to the * conversion to protocol buffer * @history 2011-04-11 Steven Lambright - Added GetValue method * @history 2012-12-21 Adam Goins - Removed protobuf references. */ class ControlMeasureLogData { public: Loading Loading @@ -129,10 +128,6 @@ namespace Isis { ControlMeasureLogData(NumericLogDataType); ControlMeasureLogData(PvlKeyword); ControlMeasureLogData(NumericLogDataType, double value); ControlMeasureLogData( const ControlNetLogDataProtoV0001_Point_Measure_DataEntry &); ControlMeasureLogData( const ControlPointFileEntryV0002_Measure_MeasureLogData &); ControlMeasureLogData(const ControlMeasureLogData & other); ~ControlMeasureLogData(); Loading @@ -145,9 +140,6 @@ namespace Isis { bool IsValid() const; PvlKeyword ToKeyword() const; ControlPointFileEntryV0002_Measure_MeasureLogData ToProtocolBuffer() const; NumericLogDataType NameToDataType(QString name) const; QString DataTypeToName(NumericLogDataType) const; Loading