11 May 23:45
Exposing C++ Functions with Container Arguments in Boost.Python
From: Bilokon, Paul <paul.bilokon <at> lehman.com>
Subject: Exposing C++ Functions with Container Arguments in Boost.Python
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-05-11 21:47:16 GMT
Subject: Exposing C++ Functions with Container Arguments in Boost.Python
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-05-11 21:47:16 GMT
[This question is about Boost.Python. If there is a more approprate mailing list to send it to, please do let me know.] Hi all, This is probably a trivial question, but after some research I was unable to find a "best practice" answer, so my sincere apologies. I am trying to expose a C++ function which takes an std::vector<double> as its argument, some void A::foo(std::vector<double> v); And perhaps void A::bar(std::vector<double> & v); Whether it is a good practice to have such arguments is, of course, open to debate (shouldn't they be iterators?), but this is what I have to work with. The question remains, what is the best way to expose these to python? I cannot pass a Python list -- it's a type mismatch. Many thanks! Regards, Paul - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Continue reading)
RSS Feed