sofa icon indicating copy to clipboard operation
sofa copied to clipboard

Move some Data<X> to new TypeInfo system

Open damienmarchal opened this issue 2 years ago • 2 comments

To register the data type info into the TypeInfoRegistry I used partial specialization of the Data class. The default implementation of AbstractTypeInfoRegistration is using the old code system (which imply a dependency to all the TypeInfo_xxxx.h).

For progressive migration to new typeinfo system, the selected typeinfo are specializating their custom AbstractTypeInfoRegistration. This custom registration is using the new system. To make sure that the partial specialization is used, the migrated types are declared as extern so we are sure there is a single registration.

An additional advantage of explicit extern declaration of Data is that this avoid bloating the compiler with all the data type to instanciate in every compilation unit.

Done:

  • Data[bool]
  • Data[RGBAColor]

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

damienmarchal avatar Sep 12 '22 20:09 damienmarchal

[ci-build]

damienmarchal avatar Sep 13 '22 00:09 damienmarchal

Hi @damienmarchal this work seems of interest . It is in WIP state, what do you plan to do with it ?

bakpaul avatar Sep 06 '23 14:09 bakpaul