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

Citizen methods should be private and accessible only through a friend interface

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: daf_base
    • Labels:
    • Templates:
    • Story Points:
      4
    • Team:
      Data Release Production

      Description

      The Citizen interface is useful, but it pollutes its derived classes with methods and attributes that can cause confusion later on (I've got a concrete example of that confusion that Perry and I just spent a few days tracking down - Citizen's getId() was being mistaken for SourceRecord.getId()). I think everything Citizen provides should be hidden and only accessible through a friend interface, e.g.:

      afw::image::Image<float> image(4, 5);
      daf::base::CitizenAccess::getId(image);

      We should also make an effort to ensure that other aspects of Citizen's design don't affect derived classes, perhaps by prefixing an name that could be seen by derived classes with a "Citizen" prefix; see https://dev.lsstcorp.org/trac/ticket/2461.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbosch Jim Bosch
                Reporter:
                jbosch Jim Bosch
                Watchers:
                Jim Bosch, Kian-Tat Lim, Robert Lupton
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel