chaiscript+meta.hpp #29
innochenti
started this conversation in
General
Replies: 2 comments
-
I'm not familiar enough with the API of this library, but it seems that with dynamic reflection (like meta.hpp) this is not possible. Instead, for this API, we must use static reflection because we need to bind types that we need to know at compile time. In dynamic reflection, we don't have this knowledge at runtime. P.S. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think it'd be great to have meta+lua sample |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's rather a question, not an issue. I was thinking about auto-binding reflected types to chaiscript, but can't figure out how to glue meta.hpp and chaiscript together.
To bind the type to chaiscript I need explicitly define all type's information: type, ctor, functions, etc.
For example:
chai.add(chaiscript::user_type(), "Vertex");
chai.add(chaiscript::constructor<Vertex(int32_t)>(), "Vertex");
chai.add(chaiscript::fun(&addVertex), "addVertex");
Is there a way to do it automatically using meta.hpp?
Beta Was this translation helpful? Give feedback.
All reactions