Loading isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ namespace Isis { /** * Returns the name of the last person or program to modify the network. * * @retrun @b QString The name of the last person or program to modify the network. * @return @b QString The name of the last person or program to modify the network. */ QString ControlNetVersioner::userName() const { return m_header.userName; Loading Loading @@ -912,6 +912,7 @@ namespace Isis { * Read a protobuf version 1 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1032,6 +1033,7 @@ namespace Isis { * Read a protobuf version 2 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1148,6 +1150,7 @@ namespace Isis { * Read a protobuf version 5 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1776,7 +1779,7 @@ namespace Isis { * The written point will be removed from the versioner and deleted if the versioner * has ownership of it. * * @param fileStream A pointer to the fileStream that we are writing the point to. * @param output A pointer to the fileStream that we are writing the point to. * * @return @b int The number of bytes written to the filestream. */ Loading isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.h +45 −2 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ namespace Isis { * @history 2017-12-18 Adam Goins and Kristin Berry - Added new write() method. * @history 2017-12-19 Kristin Berry - Corrected method names and general cleanup in toPvl and * write for refactor. * @histroy 2017-12-20 Jesse Mapel - Made read and createPoint methods match new * @history 2017-12-20 Jesse Mapel - Made read and createPoint methods match new * ControlPointV#### classes. * @history 2017-12-20 Jeannie Backer - Updated toPvl and write methods to get surface point * information from the ControlPoint. Loading Loading @@ -223,28 +223,71 @@ namespace Isis { private: // These three methods are private for safety reasons. // TODO write a better reason. JAM //! Default constructor. Intentially un-implemented. ControlNetVersioner(); /** * Copy constructor. Intentially un-implemented. * * @param other The other ControlNetVersioner to create a copy of. */ ControlNetVersioner(const ControlNetVersioner &other); /** * Asssignment operator. Intentially un-implemented. * * @param other The other ControlNetVersione to assign from. * * @return @b ControlNetVersioner& A reference to this after assignment. */ ControlNetVersioner &operator=(const ControlNetVersioner &other); // Private ControlNetHeader structs for versioning // TODO Document these for doxygen. JAM /** * Versioned container for general information about a control network. * * @ingroup ControlNetwork * * @author 2017-12-27 Jesse Mapel * * @internal * @history 2017-12-27 Jesse Mapel - Original Version */ struct ControlNetHeaderV0001 { //! The ID/Name of the control network QString networkID; //! The NAIF name of the target body QString targetName; //! The date and time of the control network's creation QString created; //! The date and time of the control network's last modification QString lastModified; //! The text description of the control network QString description; //! The name of the user or program that last modified the control network QString userName; /** * The equatorial radius of the target body * used to convert from spherical to rectangular coordinates */ Distance equatorialRadius; /** * The equatorial radius of the target body * used to convert from spherical to rectangular coordinates */ Distance polarRadius; }; //! Typedef for consistent naming of containers for version 2 typedef ControlNetHeaderV0001 ControlNetHeaderV0002; //! Typedef for consistent naming of containers for version 3 typedef ControlNetHeaderV0001 ControlNetHeaderV0003; //! Typedef for consistent naming of containers for version 4 typedef ControlNetHeaderV0001 ControlNetHeaderV0004; //! Typedef for consistent naming of containers for version 5 typedef ControlNetHeaderV0001 ControlNetHeaderV0005; //! Typedef for consistent naming of containers for version 4 typedef ControlPointV0003 ControlPointV0004; //! Typedef for consistent naming of containers for version 5 typedef ControlPointV0003 ControlPointV0005; void read(const FileName netFile, Progress *progress=NULL); Loading isis/src/control/objs/ControlNetVersioner/ControlPointV0001.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -594,7 +594,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -625,7 +625,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -653,7 +653,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading isis/src/control/objs/ControlNetVersioner/ControlPointV0001.h +16 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ namespace Isis { class PvlContainer; /** * @breif A container for the information stored in a version 1 ControlPoint. * @brief 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. In order to simplify the Loading @@ -59,9 +59,23 @@ namespace Isis { QSharedPointer<ControlNetLogDataProtoV0001_Point> logData(); private: // These are intentionally not implemented /** * Default constructor. Intentionally un-implemented. */ ControlPointV0001(); /** * Copy constructor. Intentionally un-implemented. * * @param other The other ControlPointV0001 to copy from. */ ControlPointV0001(const ControlPointV0001 &other); /** * Assignment operator. Intentionally un-implemented. * * @param other The other ControlPointV0001 to assign from. * * @return @b ControlPointV0001& A reference to this after assignment. */ ControlPointV0001 &operator=(const ControlPointV0001 &other); // methods for converting from Pvl to protobuf Loading isis/src/control/objs/ControlNetVersioner/ControlPointV0002.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -389,7 +389,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -417,7 +417,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading
isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ namespace Isis { /** * Returns the name of the last person or program to modify the network. * * @retrun @b QString The name of the last person or program to modify the network. * @return @b QString The name of the last person or program to modify the network. */ QString ControlNetVersioner::userName() const { return m_header.userName; Loading Loading @@ -912,6 +912,7 @@ namespace Isis { * Read a protobuf version 1 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1032,6 +1033,7 @@ namespace Isis { * Read a protobuf version 2 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1148,6 +1150,7 @@ namespace Isis { * Read a protobuf version 5 control network and prepare the data to be * converted into a control network. * * @param header The Pvl file header that contains byte offsets for the protobuf messages * @param netFile The filename of the control network file. * @param progress The progress object to track reading points. */ Loading Loading @@ -1776,7 +1779,7 @@ namespace Isis { * The written point will be removed from the versioner and deleted if the versioner * has ownership of it. * * @param fileStream A pointer to the fileStream that we are writing the point to. * @param output A pointer to the fileStream that we are writing the point to. * * @return @b int The number of bytes written to the filestream. */ Loading
isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.h +45 −2 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ namespace Isis { * @history 2017-12-18 Adam Goins and Kristin Berry - Added new write() method. * @history 2017-12-19 Kristin Berry - Corrected method names and general cleanup in toPvl and * write for refactor. * @histroy 2017-12-20 Jesse Mapel - Made read and createPoint methods match new * @history 2017-12-20 Jesse Mapel - Made read and createPoint methods match new * ControlPointV#### classes. * @history 2017-12-20 Jeannie Backer - Updated toPvl and write methods to get surface point * information from the ControlPoint. Loading Loading @@ -223,28 +223,71 @@ namespace Isis { private: // These three methods are private for safety reasons. // TODO write a better reason. JAM //! Default constructor. Intentially un-implemented. ControlNetVersioner(); /** * Copy constructor. Intentially un-implemented. * * @param other The other ControlNetVersioner to create a copy of. */ ControlNetVersioner(const ControlNetVersioner &other); /** * Asssignment operator. Intentially un-implemented. * * @param other The other ControlNetVersione to assign from. * * @return @b ControlNetVersioner& A reference to this after assignment. */ ControlNetVersioner &operator=(const ControlNetVersioner &other); // Private ControlNetHeader structs for versioning // TODO Document these for doxygen. JAM /** * Versioned container for general information about a control network. * * @ingroup ControlNetwork * * @author 2017-12-27 Jesse Mapel * * @internal * @history 2017-12-27 Jesse Mapel - Original Version */ struct ControlNetHeaderV0001 { //! The ID/Name of the control network QString networkID; //! The NAIF name of the target body QString targetName; //! The date and time of the control network's creation QString created; //! The date and time of the control network's last modification QString lastModified; //! The text description of the control network QString description; //! The name of the user or program that last modified the control network QString userName; /** * The equatorial radius of the target body * used to convert from spherical to rectangular coordinates */ Distance equatorialRadius; /** * The equatorial radius of the target body * used to convert from spherical to rectangular coordinates */ Distance polarRadius; }; //! Typedef for consistent naming of containers for version 2 typedef ControlNetHeaderV0001 ControlNetHeaderV0002; //! Typedef for consistent naming of containers for version 3 typedef ControlNetHeaderV0001 ControlNetHeaderV0003; //! Typedef for consistent naming of containers for version 4 typedef ControlNetHeaderV0001 ControlNetHeaderV0004; //! Typedef for consistent naming of containers for version 5 typedef ControlNetHeaderV0001 ControlNetHeaderV0005; //! Typedef for consistent naming of containers for version 4 typedef ControlPointV0003 ControlPointV0004; //! Typedef for consistent naming of containers for version 5 typedef ControlPointV0003 ControlPointV0005; void read(const FileName netFile, Progress *progress=NULL); Loading
isis/src/control/objs/ControlNetVersioner/ControlPointV0001.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -594,7 +594,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -625,7 +625,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -653,7 +653,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading
isis/src/control/objs/ControlNetVersioner/ControlPointV0001.h +16 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ namespace Isis { class PvlContainer; /** * @breif A container for the information stored in a version 1 ControlPoint. * @brief 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. In order to simplify the Loading @@ -59,9 +59,23 @@ namespace Isis { QSharedPointer<ControlNetLogDataProtoV0001_Point> logData(); private: // These are intentionally not implemented /** * Default constructor. Intentionally un-implemented. */ ControlPointV0001(); /** * Copy constructor. Intentionally un-implemented. * * @param other The other ControlPointV0001 to copy from. */ ControlPointV0001(const ControlPointV0001 &other); /** * Assignment operator. Intentionally un-implemented. * * @param other The other ControlPointV0001 to assign from. * * @return @b ControlPointV0001& A reference to this after assignment. */ ControlPointV0001 &operator=(const ControlPointV0001 &other); // methods for converting from Pvl to protobuf Loading
isis/src/control/objs/ControlNetVersioner/ControlPointV0002.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -389,7 +389,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading Loading @@ -417,7 +417,7 @@ namespace Isis { * @param container The PvlContainer representation of the control point that contains the * PvlKeyword. * @param keyName The name of the keyword to be copied. * @param point[out] The version 1 protobuf representation of the control point that the value * @param[out] point The version 1 protobuf representation of the control point that the value * will be copied into. * @param setter The protobuf mutator method that sets the value of the field in the protobuf * representation. Loading