-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
SimpleXML: Union information missing in output #177
Comments
Terminology note:
Below I will try to stick to Delphi / FPC terminology, "record with variant part, that has many variants". So I looked at code processing it (
I see you use PasDoc XML output for an interesting application, Embarcadero/DelphiFMX4Python#42 :) Which option do you need - AD 1 (simple in_record_variant boolean information per-field) or AD 2 (full information about record variants, how are fields divided between them)? |
For generating code like in my scenario the full information is needed. Therefore if the info could be added, how the fields are divided, this would be really great. |
Noted. I will try to do it around this weekend. If I fail, and this gets critical for your usage, please feel free to ping me :) |
Thanks a lot. This part is not urgent. If it is solved in some weeks it is fine :) |
Note: I let this task hang for a long time, but it's still on my TODO list -- it is clear how to do it, I just need to find time. I'll be busy for 2 weeks now preparing for a conference talk, but after that I hope to handle this task, and also make new PasDoc release, in July this year. If this task is more urgent, please ping me :) @andre2007 In somewhat related news, I noticed you work on exposing Pascal OOP libraries in other languages, in particular D. I am researching about making Castle Game Engine available from other languages too, looking first at Python, but likely at other modern languages (like D or Rust) too. If this (exposing Castle Game Engine to other languages, like D or Rust or Python) is something you'd be interested in helping with, please let me know (here, or by email to |
Yes, the idea is to have a generic tool which generates just based on SimpleXML files a Delphi library project and the D wrapper source code files to access the library file. The approach heavily using Delphi RTTI which is exposed as functions in the Delphi library (DLL on Windows). The approach is working fine, but so far I created every part manually. I started a generator which should create all parts automatically but hit a dead end. My design was bad and I need to restart with a better design. I already have a better design in my mind which will solve various problems (including generating wrapper code not just for the language D but others too). But time is also my biggest issue. I started with wrapping Firemonkey / Delphi RTL. When this is working I will also try Castle Game Engine. It will be interesting to see how the performance of the game engine is affected by calling it through a wrapper. |
For this Delphi unit
The SimpleXML output looks like this:
From the output I cannot see that the Delphi source code defines here an union. Therefore the variables
Left,Top,Right,Bottom
shares the same memory likeTopLeft,BottomRight
. This information I need to write wrapper code based on the SimpleXML output. Could you check whether you could add this information?The text was updated successfully, but these errors were encountered: