Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9788

Add C++11 features to afw primitives

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, geom
    • Epic Name:
      afw C++11
    • Story Points:
      40
    • Team:
      Alert Production

      Description

      With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

      Except for DM-9935, which lets invalid operations be detected at compile time rather than link or run time, none of the changes in this ticket should change a class's existing behavior. DM-9936 and DM-9938 will allow affected classes to be used in more contexts but will not affect existing client code.

      The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):

      • afw::cameraGeom::CameraPoint
      • afw::cameraGeom::CameraSys
      • afw::cameraGeom::CameraSysPrefix
      • afw::cameraGeom::Orientation
      • afw::coord::Coord and its subclasses
      • afw::coord::Observatory
      • afw::coord::Weather
      • afw::detection::Threshold
      • afw::geom::Angle
      • afw::geom::AngleUnit
      • afw::geom::Box
      • afw::geom::CoordinateBase and its subclasses
      • afw::geom::CoordinateExpr
      • afw::geom::Span
      • afw::geom::SpherePoint
      • afw::geom::polygon::Polygon
      • afw::image::Calib
      • afw::image::Color
      • afw::image::DefectBase
      • afw::image::Filter
      • afw::image::FilterProperty
      • afw::math::FitResults
      • afw::math::Function and its subclasses
      • afw::math::MaskedVector
      • afw::math::Statistics
      • afw::table::BaseRecord and its subclasses
      • afw::table::ConstFunctorKey
      • afw::table::FieldBase and its subclasses
      • afw::table::InputFunctorKey and its subclasses
      • afw::table::KeyBase and its subclasses
      • afw::table::Match
      • afw::table::OutputFunctorKey and its subclasses
      • afw::table::ReferenceFunctorKey
      • afw::table::SchemaItem
      • afw::table::io::Persistable
      • afw::table::io::PersistableFacade

        Attachments

          Issue Links

          Stories in Epic (Custom Issue Matrix)

            Activity

            krzys Krzysztof Findeisen created issue -
            krzys Krzysztof Findeisen made changes -
            Field Original Value New Value
            Epic Link DM-9680 [ 30785 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue relates to DM-7913 [ DM-7913 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue relates to DM-7621 [ DM-7621 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue has to be done after DM-4639 [ DM-4639 ]
            krzys Krzysztof Findeisen made changes -
            Description With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            This ticket includes the following changes:
            * Declare standalone types {{final}} (do not do this for any type that's part of an inheritance hierarchy, even if it appears to be intended as a leaf class).
            * Declare methods {{final}} only if their existing documentation forbids overriding them.
            * Declare overriding methods {{override}}.
            * Declare methods {{noexcept}} if they are provably non-throwing and there is no clear use case for exceptions being added in the future.
            * Allow types to be used in {{constexpr}}, if appropriate and practical.
            * Replace {{0}} or {{NULL}} with {{nullptr}}.
            * Replace {{typedefs}} with type aliases.
            * Simplify existing TMP with {{<type_traits>}} components, if possible.
            * Make functions that just throw "never call this" exceptions {{deleted}}.
            * Specialize {{std::hash}}, if appropriate.

            Any changes made on this ticket (except the last two) must not change the behavior of any class, even if that behavior is untested.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            This ticket includes the following changes:
            * Declare standalone types {{final}} (do not do this for any type that's part of an inheritance hierarchy, even if it appears to be intended as a leaf class).
            * Declare methods {{final}} only if their existing documentation forbids overriding them.
            * Declare overriding methods {{override}}.
            * Declare methods {{noexcept}} if they are provably non-throwing and there is no clear use case for exceptions being added in the future.
            * Allow types to be used in {{constexpr}}, if appropriate and practical.
            * Replace {{0}} or {{NULL}} with {{nullptr}}.
            * Replace {{typedefs}} with type aliases.
            * Simplify existing TMP with {{<type_traits>}} components, if possible.
            * Make functions that just throw "never call this" exceptions {{deleted}} (note that any pybind11 wrappers must still throw exceptions).
            * Specialize {{std::hash}}, if appropriate.

            Any changes made on this ticket (except the last two) must not change the behavior of any class, even if that behavior is untested.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            krzys Krzysztof Findeisen made changes -
            Description With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            This ticket includes the following changes:
            * Declare standalone types {{final}} (do not do this for any type that's part of an inheritance hierarchy, even if it appears to be intended as a leaf class).
            * Declare methods {{final}} only if their existing documentation forbids overriding them.
            * Declare overriding methods {{override}}.
            * Declare methods {{noexcept}} if they are provably non-throwing and there is no clear use case for exceptions being added in the future.
            * Allow types to be used in {{constexpr}}, if appropriate and practical.
            * Replace {{0}} or {{NULL}} with {{nullptr}}.
            * Replace {{typedefs}} with type aliases.
            * Simplify existing TMP with {{<type_traits>}} components, if possible.
            * Make functions that just throw "never call this" exceptions {{deleted}} (note that any pybind11 wrappers must still throw exceptions).
            * Specialize {{std::hash}}, if appropriate.

            Any changes made on this ticket (except the last two) must not change the behavior of any class, even if that behavior is untested.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            This ticket includes the following changes:
            * Make the class RFC-209 compliant
            * Declare standalone types {{final}} (do not do this for any type that's part of an inheritance hierarchy, even if it appears to be intended as a leaf class).
            * Declare methods {{final}} only if their existing documentation forbids overriding them.
            * Declare overriding methods {{override}}.
            * Declare methods {{noexcept}} if they are provably non-throwing and there is no clear use case for exceptions being added in the future.
            * Allow types to be used in {{constexpr}}, if appropriate and practical.
            * Replace {{0}} or {{NULL}} with {{nullptr}}.
            * Replace {{typedefs}} with type aliases.
            * Simplify existing TMP with {{<type_traits>}} components, if possible.
            * Make functions that just throw "never call this" exceptions {{deleted}} (note that any pybind11 wrappers must still throw exceptions).
            * Specialize {{std::hash}}, if appropriate.

            Any changes made on this ticket (except the last two) must not change the behavior of any class, even if that behavior is untested.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            krzys Krzysztof Findeisen made changes -
            Story Points 8 12
            krzys Krzysztof Findeisen made changes -
            Cycle Spring 2017 [ 10804 ]
            Epic Name afw C++11
            Epic Status To Do [ 10101 ]
            Issue Type Improvement [ 4 ] Epic [ 10000 ]
            krzys Krzysztof Findeisen made changes -
            Epic Link DM-9680 [ 30785 ]
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9932 [ 31359 ]
            krzys Krzysztof Findeisen made changes -
            Story Points 12 14
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9933 [ 31360 ]
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9935 [ 31362 ]
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9936 [ 31363 ]
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9937 [ 31365 ]
            krzys Krzysztof Findeisen made changes -
            Epic Child DM-9938 [ 31366 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue relates to DM-7621 [ DM-7621 ]
            krzys Krzysztof Findeisen made changes -
            Description With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            This ticket includes the following changes:
            * Make the class RFC-209 compliant
            * Declare standalone types {{final}} (do not do this for any type that's part of an inheritance hierarchy, even if it appears to be intended as a leaf class).
            * Declare methods {{final}} only if their existing documentation forbids overriding them.
            * Declare overriding methods {{override}}.
            * Declare methods {{noexcept}} if they are provably non-throwing and there is no clear use case for exceptions being added in the future.
            * Allow types to be used in {{constexpr}}, if appropriate and practical.
            * Replace {{0}} or {{NULL}} with {{nullptr}}.
            * Replace {{typedefs}} with type aliases.
            * Simplify existing TMP with {{<type_traits>}} components, if possible.
            * Make functions that just throw "never call this" exceptions {{deleted}} (note that any pybind11 wrappers must still throw exceptions).
            * Specialize {{std::hash}}, if appropriate.

            Any changes made on this ticket (except the last two) must not change the behavior of any class, even if that behavior is untested.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            With the transition from Swig to pybind11, we are now able to freely use C++11 features. Many of these features allow for more flexible and safer code, particularly when applied to fundamental data types. Conversely, these types are often simple enough that modernizing them is relatively little work

            Except for DM-9935, which lets invalid operations be detected at compile time rather than link or run time, none of the changes in this ticket should change a class's existing behavior. DM-9936 and DM-9938 will allow affected classes to be used in more contexts but will not affect existing client code.

            The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):
            * {{afw::cameraGeom::CameraPoint}}
            * {{afw::cameraGeom::CameraSys}}
            * {{afw::cameraGeom::CameraSysPrefix}}
            * {{afw::cameraGeom::Orientation}}
            * {{afw::coord::Coord}} and its subclasses
            * {{afw::coord::Observatory}}
            * {{afw::coord::Weather}}
            * {{afw::detection::Threshold}}
            * {{afw::geom::Angle}}
            * {{afw::geom::AngleUnit}}
            * {{afw::geom::Box}}
            * {{afw::geom::CoordinateBase}} and its subclasses
            * {{afw::geom::CoordinateExpr}}
            * {{afw::geom::Span}}
            * {{afw::geom::SpherePoint}}
            * {{afw::geom::polygon::Polygon}}
            * {{afw::image::Calib}}
            * {{afw::image::Color}}
            * {{afw::image::DefectBase}}
            * {{afw::image::Filter}}
            * {{afw::image::FilterProperty}}
            * {{afw::math::FitResults}}
            * {{afw::math::Function}} and its subclasses
            * {{afw::math::MaskedVector}}
            * {{afw::math::Statistics}}
            * {{afw::table::BaseRecord}} and its subclasses
            * {{afw::table::ConstFunctorKey}}
            * {{afw::table::FieldBase}} and its subclasses
            * {{afw::table::InputFunctorKey}} and its subclasses
            * {{afw::table::KeyBase}} and its subclasses
            * {{afw::table::Match}}
            * {{afw::table::OutputFunctorKey}} and its subclasses
            * {{afw::table::ReferenceFunctorKey}}
            * {{afw::table::SchemaItem}}
            * {{afw::table::io::Persistable}}
            * {{afw::table::io::PersistableFacade}}
            krzys Krzysztof Findeisen made changes -
            Epic Color ghx-label-8
            krzys Krzysztof Findeisen made changes -
            Story Points 14 40
            swinbank John Swinbank made changes -
            Cycle Spring 2017 [ 10804 ]
            swinbank John Swinbank made changes -
            Epic Child DM-9932 [ 31359 ]
            krzys Krzysztof Findeisen made changes -
            Link This issue relates to DM-13744 [ DM-13744 ]
            krzys Krzysztof Findeisen made changes -
            Component/s geom [ 10759 ]
            krzys Krzysztof Findeisen made changes -
            Risk Score 0
            swinbank John Swinbank made changes -
            Epic Child DM-9937 [ 31365 ]
            swinbank John Swinbank made changes -
            Epic Child DM-9933 [ 31360 ]
            swinbank John Swinbank made changes -
            Epic Child DM-9938 [ 31366 ]
            sullivan Ian Sullivan made changes -
            Resolution Done [ 10000 ]
            Status To Do [ 10001 ] Won't Fix [ 10405 ]

              People

              Assignee:
              krzys Krzysztof Findeisen
              Reporter:
              krzys Krzysztof Findeisen
              Watchers:
              Krzysztof Findeisen, Pim Schellart [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Summary Panel