scpeters-test / sdformat

Simulation Description Format (SDF) parser and description files.
http://sdformat.org
Other
1 stars 0 forks source link

Provide API for loading SDF file without converting it to latest supported version #220

Open scpeters-test opened 5 years ago

scpeters-test commented 5 years ago

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters).


Summary

The sdf::readFile and sdf::readString functions in parser.hh convert file to the latest SDF version. It would be nice to provide an API that loads the file at its current version without conversion.

Motivation

It would allow 3rd parties that use the sdformat parser time to migrate from an older version of the spec to the newest one.

Describe alternatives you've considered

Tell users to read the /sdf[@version] attribute and pass it to sdf::convertFile to load the file at the specific version. Providing a dedicated API would simplify this process.

scpeters-test commented 4 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters).


added bool parameter to sdf::readFile and sdf::readString in pr #647