-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add schema file name accessor to each DOM type C++ class #1376
Comments
Hi, could you please assign this to me? Thanks. |
The schemas are in sdformat/sdf/1.11 for the current version. The DOM elements corresponding are mostly located in sdformat/include. The names roughly matches each other regardless of the casing(snake_case for sdf and CamelCase for class). |
Hi @qingyouzhao, I have implemented the required changes on my personal fork of the repository aagrawal05/sdformat on the Brief summary of the work I've done:
I can delete the Could you please take a look and let me know if anything needs to be changed—I'd be happy to make any edits and open the pull request. |
Desired behavior
Getting the schema file for each SDF DOM type element should be possible.
This should make initializing an element for loading standalone DOM types easier.
Without this format. I am doing something like this in my code to initialize a DOM type element so that I can get type checking
Ideally, I hope to do something like this for simplicity.
Alternatives considered
Implementation suggestion
Implement a static function for each DOM type. For example for
Surface
:Additional context
Currently the schema file is hard coded in it's
T::ToElement()
for example:sdformat/src/Surface.cc
Line 412 in c4bfe35
The text was updated successfully, but these errors were encountered: