Closed nimski closed 2 years ago
@nimski i am not sure if special handling is needed is this case, - have you tried to simply add static __match_args__
(as in your example) to C++ class? - it should have worked as intended...
Thanks for your response. Unfortunately it looks like static class variables are ignored (no bindings generated). I think the only way to do this is to use an add_on_binding.
Oh, i see... - i just pushed the patch thats enable binding generation for class const
data members. Here is the example for generating __match_args__
annotation: https://github.com/RosettaCommons/binder/blob/master/test/T07.class.match_args.hpp#L17 - will something like this works for you? If so could you please give it try when you have a minute and let me know how it goes? Thanks,
Hi @lyskov , I'm sorry for the delay here. This is still on my radar and will let you know as soon as I've had a chance to try it.
I'll preface this by saying that Binder is awesome and I appreciate all the effort that's gone into it!
I'm wondering what the best way of binding the __match_args__ attribute is? It's used for case matching in Python and I think would best be represented in C++ as a static class variable:
This would then ideally result in the Python interface:
Is there a way to make this happen with Binder? If not supported currently, would you have pointers on how to go about modifying it to do something like this?