I have a Publisher class written in C++ with the following two methods:
PublishField(char* name, double* address);
GetFieldReference(char* name, double*& address);
Python bindings for this class are being generated using SWIG. In my swig .i file I have the following:
%pointer_class(double*, ptrDouble);
This lets me publish a field that is defined in a Python variable:
value = ptrDouble()
value.assign(10.0)
PublishField("value", value.cast())
Trying to using the GetFieldReference method results in a TypeError however:
GetFieldReference("value", newValue)
I think I need to create a typemap for the double*& that returns a ptrDouble, but I am not quite sure what that would look like.