-
Notifications
You must be signed in to change notification settings - Fork 545
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
Class reflection for embedding #1158
Comments
There is a pull request/draft for a reflection API at #1006. I should update it sooner or later. I'm currently busy with other stuff, but I updated the change set last week to improve it. |
Forgot to say, a quick and dirty way to do it would be to make |
Currently there doesn't seem to be a way to inspect a class and its methods/properties from C/Cpp.
Lua uses a table structure that can be inspected, and while it may be possible to add a properties map in the class with a specific name that can be used to manage the handles, this is at best an iffy workaround.
Any plans or suggestions on how this could/should be handled?
My first guess (which I'm not sure is the case already), would be to follow the same pattern Lua does by making the class handle also a map, so as long as you know the class name you can inspect its properties. This could also allow for checking if a handle has a callable method before using wrenCall and avoiding a runtime error.
The text was updated successfully, but these errors were encountered: