Suppose we have a struct in C++:
struct foobar
{
int age;
bool hot;
String name
};
Is there a way, programatically, to query the above struct to extract its instance members? For example:
String[] members = magicClass.getInstanceMembers(foobar);
Members would have ["age", "hot", "name"]
as it's values.
Possible? The reason why I ask is because I have structs that change over time (variables added/removed). I want to be able to create auto-generating Lua files with this saved data.
Thanks