Re: [pygccxml-development] Exposing templates
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-06-19 17:43:31
|
On 6/19/06, Allen Bierbaum <al...@vr...> wrote: > How are people generating bindings against template classes using the > module_builder interface? It has nothing to do with module_builder. Please read this: http://www.language-binding.net/pygccxml/design.html > The old experimental pypp api had a helper method of the ModuleBuilder > that allowed the user to pass a template type and an alias name. Then > when the module builder parse() method was run the module builder would > automatically generate the needed code to instantiate the template type > and create a typedef from the template type to the alias so the user > could use the alias to look up the type later. You can still achieve the behaviour you want, by creating some convenient function on top of create_text_fc function. > If you are currently exposing template classes with pyplusplus, are you > currently just manually coding something like this? Yes. What will force user to learn new API, in order to do something he already has better way to do? I think the better way is to create C++ header and then just to include it. You can even generate it before you invoke pyplusplus. Obviously you think different, do you mind to share your use case? > Does anyone have > any code that could be turned into something reusable to put into > pyplusplus? You have a chance to contribute to pygccxml :-). -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |