Commit e6f105ce authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Improve python interface by rewriting swig wrapping and moving XdmfObject

destructors to be publicly accessible.  Modify tests to work with new wrapping.
parent 5b153544
This diff is collapsed.
...@@ -431,7 +431,12 @@ boost::shared_ptr<const XdmfArrayType> XdmfArray::getType() const ...@@ -431,7 +431,12 @@ boost::shared_ptr<const XdmfArrayType> XdmfArray::getType() const
return XdmfArrayType::Uninitialized(); return XdmfArrayType::Uninitialized();
} }
const void * const XdmfArray::getValuesPointer() const void * XdmfArray::getValuesPointer()
{
return const_cast<void *>(static_cast<const XdmfArray &>(*this).getValuesPointer());
}
const void * XdmfArray::getValuesPointer() const
{ {
if(mHaveArray) if(mHaveArray)
{ {
......
...@@ -20,7 +20,7 @@ class XdmfHDF5Controller; ...@@ -20,7 +20,7 @@ class XdmfHDF5Controller;
* By Copy: * By Copy:
* *
* copyValues * copyValues
* getCopyValues * getValuesCopy
* *
* XdmfArray stores its own copy of the data. Modifications to the data stored in the XdmfArray will * XdmfArray stores its own copy of the data. Modifications to the data stored in the XdmfArray will
* not change values stored in the original array. * not change values stored in the original array.
...@@ -35,21 +35,23 @@ class XdmfHDF5Controller; ...@@ -35,21 +35,23 @@ class XdmfHDF5Controller;
* array. * array.
* *
* Xdmf supports the following datatypes: * Xdmf supports the following datatypes:
* Char * Int8
* Short * Int16
* Int * Int32
* Long * Int64
* Float * Float32
* Double * Float64
* Unsigned Char * UInt8
* Unsigned Short * UInt16
* Unsigned Int * UInt32
*/ */
class XdmfArray : public XdmfItem { class XdmfArray : public XdmfItem {
public: public:
XdmfNewMacro(XdmfArray); XdmfNewMacro(XdmfArray);
virtual ~XdmfArray();
LOKI_DEFINE_VISITABLE(XdmfArray, XdmfItem) LOKI_DEFINE_VISITABLE(XdmfArray, XdmfItem)
friend class XdmfHDF5Writer; friend class XdmfHDF5Writer;
static std::string ItemTag; static std::string ItemTag;
...@@ -67,7 +69,7 @@ public: ...@@ -67,7 +69,7 @@ public:
void copyValues(const unsigned int startIndex, const boost::shared_ptr<const XdmfArray> values, const unsigned int valuesStartIndex= 0, const unsigned int numValues = 1, const unsigned int arrayStride = 1, const unsigned int valuesStride = 1); void copyValues(const unsigned int startIndex, const boost::shared_ptr<const XdmfArray> values, const unsigned int valuesStartIndex= 0, const unsigned int numValues = 1, const unsigned int arrayStride = 1, const unsigned int valuesStride = 1);
/** /**
* Copy values from an array into this array. * Copy values into this array.
* *
* @param startIndex the index in this XdmfArray to begin insertion. * @param startIndex the index in this XdmfArray to begin insertion.
* @param valuesPointer a pointer to the values to copy into this XdmfArray. * @param valuesPointer a pointer to the values to copy into this XdmfArray.
...@@ -144,14 +146,6 @@ public: ...@@ -144,14 +146,6 @@ public:
template <typename T> template <typename T>
boost::shared_ptr<std::vector<T> > getValues(); boost::shared_ptr<std::vector<T> > getValues();
/**
* Get a smart pointer to the values stored in this array (const version).
*
* @return a smart pointer to the internal vector of values stored in this array.
*/
//template <typename T>
//const boost::shared_ptr<const std::vector<T> > getValues() const;
/** /**
* Get a copy of the values stored in this array * Get a copy of the values stored in this array
* *
...@@ -164,12 +158,19 @@ public: ...@@ -164,12 +158,19 @@ public:
template <typename T> template <typename T>
void getValuesCopy(const unsigned int startIndex, T * const valuesPointer, const unsigned int numValues = 1, const unsigned int arrayStride = 1, const unsigned int valuesStride = 1) const; void getValuesCopy(const unsigned int startIndex, T * const valuesPointer, const unsigned int numValues = 1, const unsigned int arrayStride = 1, const unsigned int valuesStride = 1) const;
/**
* Get a pointer to the values stored in this array.
*
* @return a void pointer to the first value stored in this array.
*/
void * getValuesPointer();
/** /**
* Get a pointer to the values stored in this array (const version). * Get a pointer to the values stored in this array (const version).
* *
* @return a void pointer to the first value stored in this array. * @return a void pointer to the first value stored in this array.
*/ */
const void * const getValuesPointer() const; const void * getValuesPointer() const;
/** /**
* Get the values stored in this array as a string. * Get the values stored in this array as a string.
...@@ -300,7 +301,6 @@ public: ...@@ -300,7 +301,6 @@ public:
protected: protected:
XdmfArray(); XdmfArray();
virtual ~XdmfArray();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
private: private:
......
...@@ -27,8 +27,9 @@ class XdmfArrayType : public XdmfItemProperty { ...@@ -27,8 +27,9 @@ class XdmfArrayType : public XdmfItemProperty {
public: public:
virtual ~XdmfArrayType();
friend class XdmfArray; friend class XdmfArray;
template <typename T> friend void boost::checked_delete(T * x);
// Supported XdmfArrayTypes // Supported XdmfArrayTypes
static boost::shared_ptr<const XdmfArrayType> Uninitialized(); static boost::shared_ptr<const XdmfArrayType> Uninitialized();
...@@ -71,7 +72,6 @@ protected: ...@@ -71,7 +72,6 @@ protected:
* @param precision the precision, in bytes, of the XdmfArrayType to construct. * @param precision the precision, in bytes, of the XdmfArrayType to construct.
*/ */
XdmfArrayType(const std::string & name, const unsigned int precision); XdmfArrayType(const std::string & name, const unsigned int precision);
~XdmfArrayType();
private: private:
......
...@@ -19,6 +19,8 @@ class XdmfAttribute : public XdmfDataItem { ...@@ -19,6 +19,8 @@ class XdmfAttribute : public XdmfDataItem {
public: public:
XdmfNewMacro(XdmfAttribute); XdmfNewMacro(XdmfAttribute);
virtual ~XdmfAttribute();
LOKI_DEFINE_VISITABLE(XdmfAttribute, XdmfDataItem) LOKI_DEFINE_VISITABLE(XdmfAttribute, XdmfDataItem)
static std::string ItemTag; static std::string ItemTag;
...@@ -71,7 +73,6 @@ public: ...@@ -71,7 +73,6 @@ public:
protected: protected:
XdmfAttribute(); XdmfAttribute();
virtual ~XdmfAttribute();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
private: private:
......
...@@ -22,8 +22,9 @@ class XdmfAttributeCenter : public XdmfItemProperty { ...@@ -22,8 +22,9 @@ class XdmfAttributeCenter : public XdmfItemProperty {
public: public:
virtual ~XdmfAttributeCenter();
friend class XdmfAttribute; friend class XdmfAttribute;
template <typename T> friend void boost::checked_delete(T * x);
// Supported Xdmf Attribute Centers // Supported Xdmf Attribute Centers
static boost::shared_ptr<const XdmfAttributeCenter> Grid(); static boost::shared_ptr<const XdmfAttributeCenter> Grid();
...@@ -60,7 +61,6 @@ protected: ...@@ -60,7 +61,6 @@ protected:
* @param name the name of the XdmfAttributeCenter to construct. * @param name the name of the XdmfAttributeCenter to construct.
*/ */
XdmfAttributeCenter(const std::string & name); XdmfAttributeCenter(const std::string & name);
~XdmfAttributeCenter();
private: private:
......
...@@ -24,8 +24,9 @@ class XdmfAttributeType : public XdmfItemProperty { ...@@ -24,8 +24,9 @@ class XdmfAttributeType : public XdmfItemProperty {
public: public:
virtual ~XdmfAttributeType();
friend class XdmfAttribute; friend class XdmfAttribute;
template <typename T> friend void boost::checked_delete(T * x);
// Supported Xdmf Attribute Types // Supported Xdmf Attribute Types
static boost::shared_ptr<const XdmfAttributeType> NoAttributeType(); static boost::shared_ptr<const XdmfAttributeType> NoAttributeType();
...@@ -64,7 +65,6 @@ protected: ...@@ -64,7 +65,6 @@ protected:
* @param name the name of the XdmfAttributeType to construct. * @param name the name of the XdmfAttributeType to construct.
*/ */
XdmfAttributeType(const std::string & name); XdmfAttributeType(const std::string & name);
~XdmfAttributeType();
private: private:
......
...@@ -17,6 +17,8 @@ class XdmfDataItem : public XdmfItem { ...@@ -17,6 +17,8 @@ class XdmfDataItem : public XdmfItem {
public: public:
virtual ~XdmfDataItem();
LOKI_DEFINE_VISITABLE(XdmfDataItem, XdmfItem) LOKI_DEFINE_VISITABLE(XdmfDataItem, XdmfItem)
/** /**
...@@ -45,7 +47,6 @@ public: ...@@ -45,7 +47,6 @@ public:
protected: protected:
XdmfDataItem(); XdmfDataItem();
virtual ~XdmfDataItem();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem > > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem > > & childItems);
private: private:
......
...@@ -18,6 +18,8 @@ class XdmfDomain : public XdmfItem { ...@@ -18,6 +18,8 @@ class XdmfDomain : public XdmfItem {
public: public:
XdmfNewMacro(XdmfDomain); XdmfNewMacro(XdmfDomain);
virtual ~XdmfDomain();
LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem) LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem)
static std::string ItemTag; static std::string ItemTag;
...@@ -67,7 +69,6 @@ public: ...@@ -67,7 +69,6 @@ public:
protected: protected:
XdmfDomain(); XdmfDomain();
virtual ~XdmfDomain();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
private: private:
......
...@@ -19,6 +19,8 @@ class XdmfGeometry : public XdmfDataItem { ...@@ -19,6 +19,8 @@ class XdmfGeometry : public XdmfDataItem {
public: public:
XdmfNewMacro(XdmfGeometry); XdmfNewMacro(XdmfGeometry);
virtual ~XdmfGeometry();
LOKI_DEFINE_VISITABLE(XdmfGeometry, XdmfDataItem) LOKI_DEFINE_VISITABLE(XdmfGeometry, XdmfDataItem)
static std::string ItemTag; static std::string ItemTag;
...@@ -48,7 +50,6 @@ public: ...@@ -48,7 +50,6 @@ public:
protected: protected:
XdmfGeometry(); XdmfGeometry();
virtual ~XdmfGeometry();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
private: private:
......
...@@ -68,6 +68,10 @@ XdmfGeometryType::XdmfGeometryType(const std::string& name, const int& dimension ...@@ -68,6 +68,10 @@ XdmfGeometryType::XdmfGeometryType(const std::string& name, const int& dimension
{ {
} }
XdmfGeometryType::~XdmfGeometryType()
{
}
boost::shared_ptr<const XdmfGeometryType> XdmfGeometryType::New(const std::map<std::string, std::string> & itemProperties) boost::shared_ptr<const XdmfGeometryType> XdmfGeometryType::New(const std::map<std::string, std::string> & itemProperties)
{ {
std::map<std::string, std::string>::const_iterator type = itemProperties.find("GeometryType"); std::map<std::string, std::string>::const_iterator type = itemProperties.find("GeometryType");
......
...@@ -26,8 +26,9 @@ class XdmfGeometryType : public XdmfItemProperty { ...@@ -26,8 +26,9 @@ class XdmfGeometryType : public XdmfItemProperty {
public: public:
virtual ~XdmfGeometryType();
friend class XdmfGeometry; friend class XdmfGeometry;
template <typename T> friend void boost::checked_delete(T * x);
// Supported Xdmf Geometry Types // Supported Xdmf Geometry Types
static boost::shared_ptr<const XdmfGeometryType> NoGeometryType(); static boost::shared_ptr<const XdmfGeometryType> NoGeometryType();
......
...@@ -23,6 +23,8 @@ class XdmfGrid : public XdmfItem { ...@@ -23,6 +23,8 @@ class XdmfGrid : public XdmfItem {
public: public:
XdmfNewMacro(XdmfGrid); XdmfNewMacro(XdmfGrid);
virtual ~XdmfGrid();
LOKI_DEFINE_VISITABLE(XdmfGrid, XdmfItem) LOKI_DEFINE_VISITABLE(XdmfGrid, XdmfItem)
static std::string ItemTag; static std::string ItemTag;
...@@ -181,7 +183,6 @@ public: ...@@ -181,7 +183,6 @@ public:
protected: protected:
XdmfGrid(); XdmfGrid();
virtual ~XdmfGrid();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
std::string mName; std::string mName;
......
...@@ -20,6 +20,8 @@ class XdmfGridCollection : public XdmfGrid { ...@@ -20,6 +20,8 @@ class XdmfGridCollection : public XdmfGrid {
public: public:
XdmfNewMacro(XdmfGridCollection); XdmfNewMacro(XdmfGridCollection);
virtual ~XdmfGridCollection();
LOKI_DEFINE_VISITABLE(XdmfGridCollection, XdmfGrid) LOKI_DEFINE_VISITABLE(XdmfGridCollection, XdmfGrid)
static std::string ItemTag; static std::string ItemTag;
...@@ -81,7 +83,6 @@ public: ...@@ -81,7 +83,6 @@ public:
protected: protected:
XdmfGridCollection(); XdmfGridCollection();
virtual ~XdmfGridCollection();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems); virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
private: private:
......
...@@ -31,6 +31,10 @@ XdmfGridCollectionType::XdmfGridCollectionType(const std::string & name) : ...@@ -31,6 +31,10 @@ XdmfGridCollectionType::XdmfGridCollectionType(const std::string & name) :
{ {
} }
XdmfGridCollectionType::~XdmfGridCollectionType()
{
}
boost::shared_ptr<const XdmfGridCollectionType> XdmfGridCollectionType::New(const std::map<std::string, std::string> & itemProperties) boost::shared_ptr<const XdmfGridCollectionType> XdmfGridCollectionType::New(const std::map<std::string, std::string> & itemProperties)
{ {
std::map<std::string, std::string>::const_iterator type = itemProperties.find("CollectionType"); std::map<std::string, std::string>::const_iterator type = itemProperties.find("CollectionType");
......
...@@ -20,8 +20,9 @@ class XdmfGridCollectionType : public XdmfItemProperty { ...@@ -20,8 +20,9 @@ class XdmfGridCollectionType : public XdmfItemProperty {
public: public:
virtual ~XdmfGridCollectionType();
friend class XdmfGridCollection; friend class XdmfGridCollection;
template <typename T> friend void boost::checked_delete(T * x);
// Supported XdmfGridCollectionTypes // Supported XdmfGridCollectionTypes
static boost::shared_ptr<const XdmfGridCollectionType> NoCollectionType(); static boost::shared_ptr<const XdmfGridCollectionType> NoCollectionType();
......
...@@ -63,73 +63,15 @@ boost::shared_ptr<const XdmfArrayType> XdmfHDF5Controller::getType() const ...@@ -63,73 +63,15 @@ boost::shared_ptr<const XdmfArrayType> XdmfHDF5Controller::getType() const
void XdmfHDF5Controller::read(XdmfArray * const array) void XdmfHDF5Controller::read(XdmfArray * const array)
{ {
hid_t hdf5Handle = H5Fopen(mHDF5FilePath.c_str(), H5F_ACC_RDWR, H5P_DEFAULT); hid_t hdf5Handle = H5Fopen(mHDF5FilePath.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
hid_t dataset = H5Dopen(hdf5Handle, mDataSetName.c_str(), H5P_DEFAULT); hid_t dataset = H5Dopen(hdf5Handle, mDataSetName.c_str(), H5P_DEFAULT);
hid_t dataspace = H5Dget_space(dataset); hid_t dataspace = H5Dget_space(dataset);
hssize_t numVals = H5Sget_simple_extent_npoints(dataspace); hssize_t numVals = H5Sget_simple_extent_npoints(dataspace);
hid_t datatype = H5Dget_type(dataset); hid_t datatype = H5Dget_type(dataset);
void * valuesPointer; array->initialize(mType);
if(H5Tequal(datatype, H5T_NATIVE_CHAR)) array->resize(numVals, 0);
{ H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, array->getValuesPointer());
boost::shared_ptr<std::vector<char> > arrayValues = array->initialize<char>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_SHORT))
{
boost::shared_ptr<std::vector<short> > arrayValues = array->initialize<short>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_INT))
{
boost::shared_ptr<std::vector<int> > arrayValues = array->initialize<int>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_LONG))
{
boost::shared_ptr<std::vector<long> > arrayValues = array->initialize<long>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_FLOAT))
{
boost::shared_ptr<std::vector<float> > arrayValues = array->initialize<float>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_DOUBLE))
{
boost::shared_ptr<std::vector<double> > arrayValues = array->initialize<double>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_UCHAR))
{
boost::shared_ptr<std::vector<unsigned char> > arrayValues = array->initialize<unsigned char>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_USHORT))
{
boost::shared_ptr<std::vector<unsigned short> > arrayValues = array->initialize<unsigned short>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else if(H5Tequal(datatype, H5T_NATIVE_UINT))
{
boost::shared_ptr<std::vector<unsigned int> > arrayValues = array->initialize<unsigned int>();
array->resize(numVals, 0);
valuesPointer = &arrayValues->operator[](0);
}
else
{
assert(false);
}
H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, valuesPointer);
herr_t status; herr_t status;
status = H5Tclose(datatype); status = H5Tclose(datatype);
......
...@@ -19,7 +19,7 @@ class XdmfHDF5Controller : public XdmfObject { ...@@ -19,7 +19,7 @@ class XdmfHDF5Controller : public XdmfObject {
public: public:
template <typename T> friend void boost::checked_delete(T * x); virtual ~XdmfHDF5Controller();
/** /**
* Create a new controller for an hdf5 data set on disk. * Create a new controller for an hdf5 data set on disk.
...@@ -75,7 +75,6 @@ public: ...@@ -75,7 +75,6 @@ public:
protected: protected:
XdmfHDF5Controller(const std::string & dataSetPath, const unsigned int size, const boost::shared_ptr<const XdmfArrayType> type); XdmfHDF5Controller(const std::string & dataSetPath, const unsigned int size, const boost::shared_ptr<const XdmfArrayType> type);
virtual ~XdmfHDF5Controller();
private: private:
......
...@@ -28,12 +28,12 @@ class XdmfHDF5Writer : public XdmfVisitor, ...@@ -28,12 +28,12 @@ class XdmfHDF5Writer : public XdmfVisitor,
public: public:
virtual ~XdmfHDF5Writer();
enum Mode { enum Mode {
Default, Overwrite, Append Default, Overwrite, Append
}; };
template <typename T> friend void boost::checked_delete(T * x);
/** /**
* Construct XdmfHDF5Writer * Construct XdmfHDF5Writer
* *
...@@ -65,7 +65,6 @@ public: ...@@ -65,7 +65,6 @@ public:
protected: protected:
XdmfHDF5Writer(const std::string & hdf5FilePath); XdmfHDF5Writer(const std::string & hdf5FilePath);
virtual ~XdmfHDF5Writer();
private: private:
......
...@@ -29,6 +29,8 @@ class XdmfItem : public XdmfObject, ...@@ -29,6 +29,8 @@ class XdmfItem : public XdmfObject,
public: public:
virtual ~XdmfItem();
LOKI_DEFINE_VISITABLE_BASE() LOKI_DEFINE_VISITABLE_BASE()
friend class XdmfReader; friend class XdmfReader;
...@@ -54,7 +56,6 @@ public: ...@@ -54,7 +56,6 @@ public:
protected: protected:
XdmfItem(); XdmfItem();
virtual ~XdmfItem();
/** /**
* Populates an item using a map of key/value property pairs and a vector of its child items. This is used to * Populates an item using a map of key/value property pairs and a vector of its child items. This is used to
......
...@@ -18,6 +18,8 @@ class XdmfItemProperty : public XdmfObject { ...@@ -18,6 +18,8 @@ class XdmfItemProperty : public XdmfObject {
public: public:
virtual ~XdmfItemProperty();
/** /**
* Retrieve the key/value pairs that this XdmfItemProperty contains by inserting into the passed vector. * Retrieve the key/value pairs that this XdmfItemProperty contains by inserting into the passed vector.
* *
...@@ -28,7 +30,6 @@ public: ...@@ -28,7 +30,6 @@ public:
protected: protected:
XdmfItemProperty(); XdmfItemProperty();
virtual ~XdmfItemProperty();
private: private:
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#define XdmfNewMacro(type) \ #define XdmfNewMacro(type) \
template <typename T> friend void boost::checked_delete(T * x); \
static boost::shared_ptr<type> New() \ static boost::shared_ptr<type> New() \
{ \ { \
boost::shared_ptr<type> p(new type()); \ boost::shared_ptr<type> p(new type()); \
...@@ -22,10 +21,11 @@ class XdmfObject { ...@@ -22,10 +21,11 @@ class XdmfObject {
public: public:
virtual ~XdmfObject();
protected: protected:
XdmfObject(); XdmfObject();
virtual ~XdmfObject();
}; };
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "XdmfSet.hpp" #include "XdmfSet.hpp"
#include "XdmfTopology.hpp" #include "XdmfTopology.hpp"
#include <libxml/xmlreader.h> #include <libxml/xmlreader.h>
#include "XdmfReader.hpp" #include "XdmfReader.hpp"
......
...@@ -18,13 +18,13 @@ class XdmfReader : public XdmfObject { ...@@ -18,13 +18,13 @@ class XdmfReader : public XdmfObject {
public: public:
XdmfNewMacro(XdmfReader); XdmfNewMacro(XdmfReader);
virtual ~XdmfReader();
boost::shared_ptr<XdmfItem> read(const std::string & fileName) const; boost::shared_ptr<XdmfItem> read(const std::string & fileName) const;
protected: protected:
XdmfReader(); XdmfReader();
virtual ~XdmfReader();
private: private:
......
...@@ -20,6 +20,8 @@ class XdmfSet : public XdmfDataItem { ...@@ -20,6 +20,8 @@ class XdmfSet : public XdmfDataItem {
public: public:
XdmfNewMacro(XdmfSet); XdmfNewMacro(XdmfSet);
virtual ~XdmfSet();