[Pyhton] boost::shared_ptr problem between python modules
Hi All,
I use
- Visual Studio 2013
- boost 1.58 with NuGet
- 64 bit Intel
I have a class (called Log::FileSink) that I want to instantiate via a
boost::shared_ptr. This class is derived from an abstract interface
(Log::ISink) which is wrapped (Log::ISinkRealizer)
boost::python::class_
import DiagnsoticsPy logFile = DiagnsoticsPy.FileSink("system.log"); logFile.AddDomain("Sensor.SensorController", DiagnsoticsPy.Severity.VerboseAndAbove); logFile.AddDomain("Python.DI", DiagnsoticsPy.Severity.VerboseAndAbove); logSource = DiagnsoticsPy.Source("Python.DI", logFile)
boost::python::class_ ("Source", boost::python::init class DIAGNOSTICS_API Source
{
public:
Source(const std::string& name, boost::shared_ptr import SensorControlPy
sensorController = SensorControlPy.SensorController(logFile); Python argument types in
SensorController.__init__(SensorController, FileSink)
did not match C++ signature:
__init__(struct _object * __ptr64, class boost::shared_ptr<class
Log::ISink>)
If I put the all the Python bindings (also the SensorController) into the
same python module then the call to the SensorController constructor
works.
participants (1)
-
Tamas.Ruszkai@leica-geosystems.com