rttrorg / rttr

C++ Reflection Library
https://www.rttr.org
MIT License
3.11k stars 429 forks source link

Allow programmatic access to metadata for properties and types #338

Closed ken-noland closed 1 year ago

ken-noland commented 2 years ago

I've put together a few very simple functions for types and properties which allows the developer to run a lambda on each metadata entry. I've put in a few examples in the tests which shows how you can use that feature to populate a vector with all the metadata of a particular type or property.

I needed this feature to allow for more dynamic access to the metadata which allowed me to write an exporter which included the metadata without having to name out all the available metadata keys(which, in the future, I may not have access to).