4 ms·
I suggest you to take a look at Boost.Describe. I have a scripting layer in a game that needs to set properties in a C++ Model. I used a single Boost.Describe
by germandiago 2y ago
I suggest you to take a look at Boost.Describe.
I have a scripting layer in a game that needs to set properties in a C++ Model. I used a single Boost.Describe macro per struct and a generic get/set property. It worked very well and made me get rid of a lot of boilerplate.
https://www.boost.org/doc/libs/develop/libs/describe/doc/html/describe.html https://www.boost.org/doc/libs/develop/libs/describe/doc/htm...
- beached_whale 2y agoBoost.PFR is really neat and doesn’t need manual mapping for aggregate types
- germandiago 2y agoWhat I needed is accessing thosr by name. So PFR won't do.
- beached_whale 2y agoShould be able to build that on if it isnt there. But at runtime the type would need to be a sum type like variant.
- throwway120385 2y agoYeah, that looks like it would do what I need.