Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10402

RAxisBase::fCanGrow should probably be exposed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: None
    • Component/s: Core Libraries
    • Labels:
      None
    • Environment:

      Description

      The base class to all RAxis classes in the ROOT 7 prototype, RAxisBase, currently stores a boolean member called fCanGrow which is the truth that the underlying axis type is growable.

      This information is needed by the implementation of RAxisBase::GetNOverflowBins. However, curiously enough, it is not directly exposed by an RAxisBase::CanGrow accessor. Instead, such an accessor is redefined by every concrete RAxis class, which gets needlessly confusing when inheritance chains such as RAxisGrow -> RAxisEquidistant -> RAxisBase are used.

      I think it would make more sense to directly define the CanGrow method in RAxisBase, as an accessor of the RAxisBase::fCanGrow member.

      In fact, since the RAxisBase type is not polymorphic, which makes base class access somewhat useless, it might even make sense to just make RAxisBase a template which is parametrized by the CanGrow boolean for the sake of achieving higher-quality code generation.

        Attachments

          Activity

            People

            Assignee:
            hgraslan Hadrien Benjamin Grasland
            Reporter:
            hgraslan Hadrien Benjamin Grasland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: