Replies: 2 comments 5 replies
-
I was thinking about an interface like this: struct listener {
template < typename Class >
static void on_class() {}
template < typename Class, typename Member >
static void on_class_member(meta::member member, Member member_ptr) {}
template < typename Class, typename Method >
static void on_class_method(meta::method method, Method method_ptr) {}
};
meta::class_<ivec2, listener>()
.member_("x", &ivec2::x)
.member_("y", &ivec2::y)
.method_("length2", &ivec2::length2); But I don't like it (because it's inconvenient). I accept any suggestions on how to make something like this better!
I can return raw pointers to methods/members from |
Beta Was this translation helpful? Give feedback.
-
I can't come up with good suggestions on how to implement this, but in an ideal world, there exists a About the raw pointers, why does it have to be a |
Beta Was this translation helpful? Give feedback.
-
Recently, i've been making more progress with my project and i decided to use Angelscript. I thought i could use the information registered with
meta
but i quickly encountered an issue: When registering the member fields of a type with Angelscript, you have to provide the offsets to the members but as far as i can tell, that information is not available.I don't know how hard or even possible it is to get this information with the current registration interface so i'm only making a suggestion here.
Additionally, it would be helpful if we could get the raw pointer to functions registered with
function_
, for similar reasons.Beta Was this translation helpful? Give feedback.
All reactions