Giter VIP home page Giter VIP logo

Comments (6)

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

Problem demonstrated in the failing tests DataFileNameVector_test.

from sofa.

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

In fact the problem is there for any Data<vector>.
For such vectors, the string-serialization could(should) separate strings with a specific character that cannot be on a path, but it would break existing scenes.

from sofa.

JeremieA avatar JeremieA commented on August 19, 2024

There was a SVector class added in sofa::helper simply to change the stream operators to use commas to delimit values and [ ] to delimit the vector itself (allowing for vectors inside vectors), but I don't like this design because the type itself is different affecting all the code that uses it...

from sofa.

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

A solution could be to replace the concerned Data with new Data with different names using SVector.

The backward compatibility could be ensure by having a specific "parse" function, looking for the old data names, and filling the new SVector by splitting at every spaces (the old way). W/o forgetting the deprecated message.

A similar process has been done in RigidMapping (Data 'rigidIndexPerPoint' replacing 'repartition').

from sofa.

damienmarchal avatar damienmarchal commented on August 19, 2024

The approach proposed by matthieu sounds ok to me.
I strongly support the "W/o forgetting the deprecated message".

from sofa.

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

Fixed in a99443a.

I finally changed DataFileNameVector that is now a SVector, so be aware its string serialization changed.

I made this choice because only OglShader is using DataFileNameVector in sofa-public, so the consequences of this change are small, and at least future usage of DataFileNameVector will be ok.
Of course if your private code is using DataFileNameVector, you have to update it.

from sofa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.