-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataFileNameVector and spaces #21
Comments
Problem demonstrated in the failing tests DataFileNameVector_test. |
In fact the problem is there for any Data<vector>. |
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... |
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'). |
The approach proposed by matthieu sounds ok to me. |
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. |
[SofaKernel] Partial FIX of the warning related to invalid reading of…
DataFileNameVector is a Data<vector> where the strings are separated by spaces in the string-serialization. So how to include spaces in one of the paths? (right now it is splitting this path into two separated paths).
The text was updated successfully, but these errors were encountered: