I'm binding a lot of classes to Lua using sol library and I wanted to make a macro that would make bindings consistent (same function name in Lua and C++). Here is an example of binding:
auto bind = state_->new_usertype<Class1>("Class1");
bind["Function1"] = &Class1::Function1;
bind["Function2"] = &Class1::Function2;
bind["Function3"] = &Class1::Function3;
bind["Function4"] = &Class1::Function4;
And I would like to have something like this expanding to example above:
SOL_BIND(Class1,
Function1
Function2,
Function3,
Function4)
How would I go about doing that? If this is even possible?