Do I understand it correct: You create with extend a new function only in the interface without the value and call the "class method" with the three arguments?

The same way if I would add a method with 2 arguments to the class


Phil


On 2012-11-28 15:46:18 +0100, Alexey Sokolov said:


%extend myclass {

void writeDoubleValueWithFixedValue(const char* path, double value) {

$self->writeValue<double>(path, value, myclass::value1);

}

}


28.11.2012 21:44, Philipp Kraus пишет:

Hello,


I have got a template function like:


%template(writeValue) myclass::writeValue<double>;


one argument of writeValue can be set to a fixed value, so Swig need not be exported this value.


myclass o;

o.writeValue("path", value, myclass::value1);


So on the swig export I can set the third parameter to a fixed value. How can I tell this in an interface

file? Swig must set the third parameter on the C++ call to the fixed value and the exported method need

only two paramter.


Thanks


phil





------------------------------------------------------------------------------

Keep yourself connected to Go Parallel: 

INSIGHTS What's next for parallel hardware, programming and related areas?

Interviews and blogs by thought leaders keep you ahead of the curve.

http://goparallel.sourceforge.net




_______________________________________________

Swig-user mailing list

Swig-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/swig-user



-- 

Best regards,

Alexey "DarthGandalf" Sokolov

<image>------------------------------------------------------------------------------

Keep yourself connected to Go Parallel: 

INSIGHTS What's next for parallel hardware, programming and related areas?

Interviews and blogs by thought leaders keep you ahead of the curve.

http://goparallel.sourceforge.net

_______________________________________________

Swig-user mailing list

Swig-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/swig-user