Boost logo

Boost :

From: Anton Gluck (gluc_at_[hidden])
Date: 2000-10-31 01:17:38


And now for something completely different:

There is a function AddVar in one of the classes I'm trying to expose to
Python. AddVar is defined like this in the header file:

void AddVar(double d1 = 0, double d2 = 1.0);

In the source file it is implemented like this:

void MyClass::AddVar(double d1, double d2) {
// set the variables
}

So that in the end only AddVar(double, double) is in the source file, with
an implied no-args overload because of the definition in the header file.
When I wrap this function in py_cpp with

MyClass_class.def(MyClass::AddVar, "AddVar");

quite understandably only the version of AddVar with the two doubles as
arguments is exposed. How can I get a no-args version to be exposed also?

Thanks for any help,

Toni
(who seems to sit on a source of / with unending questions)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk