Commit 6985f1b6 authored by Kenneth Leiter's avatar Kenneth Leiter

BUG: Fix Python reading with typemaps that has been broken since Xdmf/XdmfCore split.

parent 9c8a9054
......@@ -51,8 +51,7 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
}
else if(boost::shared_ptr<XdmfDomain> domain = boost::shared_dynamic_cast<XdmfDomain>($1))
{
boost::shared_ptr<XdmfDomain> * newDomain = new boost::shared_ptr<XdmfDomain>(domain);
$result = SWIG_NewPointerObj(SWIG_as_voidptr(newDomain), SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_POINTER_OWN);
$result = SWIG_NewPointerObj(SWIG_as_voidptr(new boost::shared_ptr<XdmfDomain>(domain)), SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_POINTER_OWN);
}
else if(boost::shared_ptr<XdmfGeometry> geometry = boost::shared_dynamic_cast<XdmfGeometry>($1))
{
......
......@@ -18,3 +18,9 @@ XdmfReader::XdmfReader() :
XdmfReader::~XdmfReader()
{
}
// Implemented to make SWIG wrapping work correctly (typemaps to return specific subclass instances of XdmfItems)
boost::shared_ptr<XdmfItem> XdmfReader::read(const std::string & filePath) const
{
return XdmfCoreReader::read(filePath);
}
......@@ -23,6 +23,8 @@ public:
virtual ~XdmfReader();
boost::shared_ptr<XdmfItem> read(const std::string & filePath) const;
protected:
XdmfReader();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment