Re: [C++-sig] Exposing Friend Functions in C++ Python Boost

2014-07-21 Thread Kv Gopalkrishnan
using namespace boost::python; > > BOOST_PYTHON_MODULE(TurtleWrapper) > { > class_("Turtle") > .add_property("Heading", make_function(&Turtle::GetHeading, > return_internal_reference<>())) > .add_property("Left",ma

Re: [C++-sig] Exposing Friend Functions in C++ Python Boost

2014-07-18 Thread Kv Gopalkrishnan
Kind Regards KV On Fri, Jul 18, 2014 at 1:50 PM, Jim Bosch wrote: > On Jul 18, 2014 6:32 AM, "Kv Gopalkrishnan" > wrote: > > > > Hi Jim > > Thank you for the answer. When I tried this solution > > i.e. .def("GetHea

Re: [C++-sig] Exposing Friend Functions in C++ Python Boost

2014-07-18 Thread Kv Gopalkrishnan
aren't considered to be part of the scope of the class that > they're friends with, so when referring to them, just use e.g. > "&GetHeading", not "&Turtle::GetHeading". > > Jim > > > On Wed, Jul 16, 2014 at 7:52 AM, Kv Gopalkrishnan < &g

[C++-sig] Exposing Friend Functions in C++ Python Boost

2014-07-17 Thread Kv Gopalkrishnan
I want to expose a C++ friend functions to python using Python boost. class Turtle{ friend const PV& GetHeading(const Turtle& t); friend const PV& GetLeft(const Turtle& t); friend const P& GetPoint(const Turtle& t); frien