Commit 42286d09 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Get equality functions working again, but keep it in the SWIG file rather...

ENH: Get equality functions working again, but keep it in the SWIG file rather the polluting the C++.
parent be7a6349
This diff is collapsed.
...@@ -84,8 +84,8 @@ protected: ...@@ -84,8 +84,8 @@ protected:
private: private:
XdmfAttribute(const XdmfAttribute & attribute); // Not implemented. XdmfAttribute(const XdmfAttribute &); // Not implemented.
void operator=(const XdmfAttribute & attribute); // Not implemented. void operator=(const XdmfAttribute &); // Not implemented.
boost::shared_ptr<const XdmfAttributeCenter> mCenter; boost::shared_ptr<const XdmfAttributeCenter> mCenter;
std::string mName; std::string mName;
......
...@@ -81,26 +81,6 @@ boost::shared_ptr<const XdmfAttributeCenter> XdmfAttributeCenter::New(const std: ...@@ -81,26 +81,6 @@ boost::shared_ptr<const XdmfAttributeCenter> XdmfAttributeCenter::New(const std:
assert(false); assert(false);
} }
bool XdmfAttributeCenter::operator==(const XdmfAttributeCenter & attributeCenter) const
{
return mName.compare(attributeCenter.mName) == 0;
}
bool XdmfAttributeCenter::operator!=(const XdmfAttributeCenter & attributeCenter) const
{
return !this->operator==(attributeCenter);
}
bool XdmfAttributeCenter::IsEqual(boost::shared_ptr<XdmfAttributeCenter> attributeCenter)
{
if(attributeCenter == NULL) return false;
if(this == attributeCenter.get()
&& mName == attributeCenter->mName
) return true;
return false;
}
void XdmfAttributeCenter::getProperties(std::map<std::string, std::string> & collectedProperties) const void XdmfAttributeCenter::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties["Center"] = mName; collectedProperties["Center"] = mName;
......
...@@ -35,29 +35,6 @@ public: ...@@ -35,29 +35,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/**
* Compare two XdmfAttributeCenters for equality.
*
* @param attributeCenter an XdmfAttributeCenter to compare equality to.
* @return true if the XdmfAttributeCenters are equal.
*/
bool operator==(const XdmfAttributeCenter & attributeCenter) const;
/**
* Compare two XdmfAttributeCenters for inequality.
*
* @param attributeCenter an XdmfAttributeCenter to compare inequality to.
* @return true if the XdmfAttributeCenters are not equal.
*/
bool operator!=(const XdmfAttributeCenter & attributeCenter) const;
/**
* Compare two XdmfAttributeCenter for equality (for wrapping)
*
* @param attributeCenter a boost shared pointer to an XdmfAttributeCenter to compare equality to.
* @return true if the XdmfAttributeCenter are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfAttributeCenter> attributeCenter);
protected: protected:
......
...@@ -105,26 +105,6 @@ boost::shared_ptr<const XdmfAttributeType> XdmfAttributeType::New(const std::map ...@@ -105,26 +105,6 @@ boost::shared_ptr<const XdmfAttributeType> XdmfAttributeType::New(const std::map
assert(false); assert(false);
} }
bool XdmfAttributeType::operator==(const XdmfAttributeType & attributeType) const
{
return mName.compare(attributeType.mName) == 0;
}
bool XdmfAttributeType::operator!=(const XdmfAttributeType & attributeType) const
{
return !this->operator==(attributeType);
}
bool XdmfAttributeType::IsEqual(boost::shared_ptr<XdmfAttributeType> attributeType)
{
if(attributeType == NULL) return false;
if(this == attributeType.get()
&& mName == attributeType->mName
) return true;
return false;
}
void XdmfAttributeType::getProperties(std::map<std::string, std::string> & collectedProperties) const void XdmfAttributeType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties["Type"] = mName; collectedProperties["Type"] = mName;
......
...@@ -39,31 +39,6 @@ public: ...@@ -39,31 +39,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfAttributeTypes for equality.
*
* @param attributeType an XdmfAttributeType to compare equality to.
* @return true if the XdmfAttributeTypes are equal.
*/
bool operator==(const XdmfAttributeType & attributeType) const;
/**
* Compare two XdmfAttributeTypes for inequality.
*
* @param attributeType an XdmfAttributeType to compare inequality to.
* @return true if the XdmfAttributeTypes are not equal.
*/
bool operator!=(const XdmfAttributeType & attributeType) const;
/**
* Compare two XdmfAttributeType for equality (for wrapping)
*
* @param attributeType a boost shared pointer to an XdmfAttributeType to compare equality to.
* @return true if the XdmfAttributeType are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfAttributeType> attributeType);
protected: protected:
/** /**
......
...@@ -107,27 +107,6 @@ boost::shared_ptr<const XdmfGeometryType> XdmfGeometryType::New(const std::map<s ...@@ -107,27 +107,6 @@ boost::shared_ptr<const XdmfGeometryType> XdmfGeometryType::New(const std::map<s
assert(false); assert(false);
} }
bool XdmfGeometryType::operator==(const XdmfGeometryType& geometryType) const
{
return mDimensions == geometryType.mDimensions && mName.compare(geometryType.mName) == 0;
}
bool XdmfGeometryType::operator!=(const XdmfGeometryType& geometryType) const
{
return !this->operator==(geometryType);
}
bool XdmfGeometryType::IsEqual(boost::shared_ptr<XdmfGeometryType> geometryType)
{
if(geometryType == NULL) return false;
if(this == geometryType.get()
&& mDimensions == geometryType->mDimensions
&& mName == geometryType->mName
) return true;
return false;
}
unsigned int XdmfGeometryType::getDimensions() const unsigned int XdmfGeometryType::getDimensions() const
{ {
return mDimensions; return mDimensions;
......
...@@ -55,30 +55,6 @@ public: ...@@ -55,30 +55,6 @@ public:
virtual void getProperties(std::map<std::string, std::string> & collectedProperties) const; virtual void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfGeometryTypes for equality.
*
* @param geometryType a XdmfGeometryType to compare equality to.
* @return true if the XdmfGeometryTypes are equal.
*/
bool operator==(const XdmfGeometryType & geometryType) const;
/**
* Compare two XdmfGeometryTypes for inequality.
*
* @param geometryType a XdmfGeometryType to compare inequality to.
* @return true if the XdmfGeometryTypes are not equal.
*/
bool operator!=(const XdmfGeometryType & geometryType) const;
/**
* Compare two XdmfGeometryType for equality (for wrapping)
*
* @param geometryType a boost shared pointer to an XdmfGeometryType to compare equality to.
* @return true if the XdmfGeometryType are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfGeometryType> geometryType);
protected: protected:
/** /**
......
...@@ -61,25 +61,6 @@ boost::shared_ptr<const XdmfGridCollectionType> XdmfGridCollectionType::New(cons ...@@ -61,25 +61,6 @@ boost::shared_ptr<const XdmfGridCollectionType> XdmfGridCollectionType::New(cons
assert(false); assert(false);
} }
bool XdmfGridCollectionType::operator==(const XdmfGridCollectionType & collectionType) const
{
return mName.compare(collectionType.mName) == 0;
}
bool XdmfGridCollectionType::operator!=(const XdmfGridCollectionType & collectionType) const
{
return !this->operator==(collectionType);
}
bool XdmfGridCollectionType::IsEqual(boost::shared_ptr<XdmfGridCollectionType> collectionType)
{
if(collectionType == NULL) return false;
if(this == collectionType.get()
&& mName == collectionType->mName
) return true;
return false;
}
void XdmfGridCollectionType::getProperties(std::map<std::string, std::string> & collectedProperties) const void XdmfGridCollectionType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties["CollectionType"] = mName; collectedProperties["CollectionType"] = mName;
......
...@@ -31,30 +31,6 @@ public: ...@@ -31,30 +31,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfGridCollectionTypes for equality.
*
* @param collectionType an XdmfGridCollectionType to compare equality to.
* @return true if the XdmfGridCollectionTypes are equal.
*/
bool operator==(const XdmfGridCollectionType & collectionype) const;
/**
* Compare two XdmfGridCollectionTypes for inequality.
*
* @param collectionType an XdmfGridCollectionType to compare inequality to.
* @return true if the XdmfGridCollectionTypes are not equal.
*/
bool operator!=(const XdmfGridCollectionType & collectionType) const;
/**
* Compare two XdmfGridCollectionType for equality (for wrapping)
*
* @param collectionType a boost shared pointer to an XdmfGridCollectionType to compare equality to.
* @return true if the XdmfGridCollectionType are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfGridCollectionType> collectionType);
protected: protected:
/** /**
......
...@@ -85,26 +85,6 @@ boost::shared_ptr<const XdmfSetType> XdmfSetType::New(const std::map<std::string ...@@ -85,26 +85,6 @@ boost::shared_ptr<const XdmfSetType> XdmfSetType::New(const std::map<std::string
assert(false); assert(false);
} }
bool XdmfSetType::operator==(const XdmfSetType & setType) const
{
return mName.compare(setType.mName) == 0;
}
bool XdmfSetType::operator!=(const XdmfSetType & setType) const
{
return !this->operator==(setType);
}
bool XdmfSetType::IsEqual(boost::shared_ptr<XdmfSetType> setType)
{
if(setType == NULL) return false;
if(this == setType.get()
&& mName == setType->mName
) return true;
return false;
}
void XdmfSetType::getProperties(std::map<std::string, std::string> & collectedProperties) const void XdmfSetType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties["Type"] = this->mName; collectedProperties["Type"] = this->mName;
......
...@@ -34,30 +34,6 @@ public: ...@@ -34,30 +34,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfSetTypes for equality.
*
* @param setType a XdmfSetType to compare equality to.
* @return true if the XdmfSetTypes are equal.
*/
bool operator==(const XdmfSetType & setType) const;
/**
* Compare two XdmfSetTypes for inequality.
*
* @param setType a XdmfSetType to compare inequality to.
* @return true if the XdmfSetTypes are not equal.
*/
bool operator!=(const XdmfSetType & setType) const;
/**
* Compare two XdmfSetType for equality (for wrapping)
*
* @param setType a boost shared pointer to an XdmfSetType to compare equality to.
* @return true if the XdmfSetType are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfSetType> setType);
protected: protected:
/** /**
......
...@@ -172,43 +172,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Mixed() ...@@ -172,43 +172,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Mixed()
return p; return p;
} }
/*
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::TwoDSMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "2DSMesh", Structured));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::TwoDRectMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "2DRectMesh", Structured));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::TwoDCoRectMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "2DCoRectMesh", Structured));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::ThreeDSMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "3DSMesh", Structured));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::ThreeDRectMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "3DRectMesh", Structured));
return p;
}
boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::ThreeDCoRectMesh()
{
static boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(1, "3DCoRectMesh", Structured));
return p;
}*/
XdmfTopologyType::XdmfTopologyType(const unsigned int nodesPerElement, const std::string & name, const CellType cellType) : XdmfTopologyType::XdmfTopologyType(const unsigned int nodesPerElement, const std::string & name, const CellType cellType) :
mCellType(cellType), mCellType(cellType),
mName(name), mName(name),
...@@ -321,28 +284,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::New(const std::map<s ...@@ -321,28 +284,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::New(const std::map<s
{ {
return Mixed(); return Mixed();
} }
/*else if(typeVal.compare("2DSMESH") == 0)
{
return TwoDSMesh();
}
else if(typeVal.compare("2DRECTMESH") == 0)
{
return TwoDRectMesh();
}
else if(typeVal.compare("2DCORECTMESH") == 0 || typeVal.compare("3DCORECTMESH") == 0)
{
// Special case --- Regular Grid
boost::shared_ptr<const XdmfTopologyType> p(new XdmfTopologyType(0, "REGULAR", Structured));
return p;
}
else if(typeVal.compare("3DSMESH") == 0)
{
return ThreeDSMesh();
}
else if(typeVal.compare("3DRECTMESH") == 0)
{
return ThreeDRectMesh();
}*/
else else
{ {
assert(false); assert(false);
...@@ -351,27 +292,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::New(const std::map<s ...@@ -351,27 +292,6 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::New(const std::map<s
assert(false); assert(false);
} }
bool XdmfTopologyType::operator==(const XdmfTopologyType& topologyType) const
{
return mNodesPerElement == topologyType.mNodesPerElement && mName.compare(topologyType.mName) == 0 && mCellType == topologyType.mCellType;
}
bool XdmfTopologyType::operator!=(const XdmfTopologyType& topologyType) const
{
return !this->operator==(topologyType);
}
bool XdmfTopologyType::IsEqual(boost::shared_ptr<XdmfTopologyType> topologyType)
{
if(topologyType == NULL) return false;
if(this == topologyType.get()
&& mNodesPerElement == topologyType->mNodesPerElement
&& mCellType == topologyType->mCellType
&& mName == topologyType->mName
) return true;
return false;
}
XdmfTopologyType::CellType XdmfTopologyType::getCellType() const XdmfTopologyType::CellType XdmfTopologyType::getCellType() const
{ {
return mCellType; return mCellType;
......
...@@ -82,10 +82,6 @@ public: ...@@ -82,10 +82,6 @@ public:
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125(); static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125();
static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125_GLL(); static boost::shared_ptr<const XdmfTopologyType> Hexahedron_125_GLL();
static boost::shared_ptr<const XdmfTopologyType> Mixed(); static boost::shared_ptr<const XdmfTopologyType> Mixed();
//static boost::shared_ptr<const XdmfTopologyType> TwoDRectMesh();
//static boost::shared_ptr<const XdmfTopologyType> TwoDCoRectMesh();
//static boost::shared_ptr<const XdmfTopologyType> ThreeDRectMesh();
//static boost::shared_ptr<const XdmfTopologyType> ThreeDCoRectMesh();
/** /**
* Get the cell type associated with this topology type. * Get the cell type associated with this topology type.
...@@ -110,30 +106,6 @@ public: ...@@ -110,30 +106,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfTopologyTypes for equality.
*
* @param topologyType an XdmfTopologyType to compare equality to.
* @return true if the XdmfTopologyTypes are equal.
*/
bool operator==(const XdmfTopologyType & topologyType) const;
/**
* Compare two XdmfTopologyTypes for inequality
*
* @param topologyType XdmfTopologyType to compare inequality to.
* @return true if the XdmfTopologyTypes are not equal.
*/
bool operator!=(const XdmfTopologyType & topologyType) const;
/**
* Compare two XdmfTopologyType for equality (for wrapping)
*
* @param topologyType a boost shared pointer to an XdmfTopologyType to compare equality to.
* @return true if the XdmfTopologyType are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfTopologyType> topologyType);
protected: protected:
/** /**
......
...@@ -143,29 +143,6 @@ boost::shared_ptr<const XdmfArrayType> XdmfArrayType::New(const std::map<std::st ...@@ -143,29 +143,6 @@ boost::shared_ptr<const XdmfArrayType> XdmfArrayType::New(const std::map<std::st
assert(false); assert(false);
} }
bool XdmfArrayType::operator==(const XdmfArrayType & arrayType) const
{
return mName.compare(arrayType.mName) == 0 && mPrecision == arrayType.mPrecision;
}
bool XdmfArrayType::operator!=(const XdmfArrayType & arrayType) const
{
return !this->operator==(arrayType);
}
bool XdmfArrayType::IsEqual(boost::shared_ptr<XdmfArrayType> arrayType)
{
if(arrayType == NULL)
{
return false;
}
if(this == arrayType.get() && mName == arrayType->mName && mPrecision == arrayType->mPrecision)
{
return true;
}
return false;
}
void XdmfArrayType::getProperties(std::map<std::string, std::string> & collectedProperties) const void XdmfArrayType::getProperties(std::map<std::string, std::string> & collectedProperties) const
{ {
collectedProperties["DataType"] = mName; collectedProperties["DataType"] = mName;
......
...@@ -45,30 +45,6 @@ public: ...@@ -45,30 +45,6 @@ public:
void getProperties(std::map<std::string, std::string> & collectedProperties) const; void getProperties(std::map<std::string, std::string> & collectedProperties) const;
/*
* Compare two XdmfArrayTypes for equality.
*
* @param arrayType an XdmfArrayType to compare equality to.
* @return true if the XdmfArrayTypes are equal.
*/
bool operator==(const XdmfArrayType & arrayType) const;
/**
* Compare two XdmfArrayTypes for inequality.
*
* @param arrayType an XdmfArrayType to compare inequality to.
* @return true if the XdmfArrayTypes are not equal.
*/
bool operator!=(const XdmfArrayType & arrayType) const;
/**
* Compare two XdmfArrayTypes for equality (for java wrapping)
*
* @param arrayType a boost shared pointer to an XdmfArrayType to compare equality to.
* @return true if the XdmfArrayTypes are equal.
*/
bool IsEqual(boost::shared_ptr<XdmfArrayType> arrayType);
int getElementSize() const; int getElementSize() const;
protected: protected:
......
...@@ -24,25 +24,6 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i ...@@ -24,25 +24,6 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
%include std_vector.i %include std_vector.i
%include loki/Visitor.h %include loki/Visitor.h
#ifdef SWIGJAVA
%extend XdmfArrayType {
bool equals(boost::shared_ptr<XdmfArrayType> arrayType) {
return(self->IsEqual(arrayType));
}
};
%ignore XdmfArrayType::operator==(const XdmfArrayType & arrayType) const;
%ignore XdmfArrayType::operator!=(const XdmfArrayType & arrayType) const;
#endif
#ifdef SWIGPYTHON
%extend XdmfArrayType {
bool __eq__(boost::shared_ptr<XdmfArrayType> arrayType) {
return(self->IsEqual(arrayType));
}
};
#endif
// Shared Pointer Templates // Shared Pointer Templates
%shared_ptr(XdmfArray) %shared_ptr(XdmfArray)
%shared_ptr(XdmfArrayType) %shared_ptr(XdmfArrayType)
...@@ -62,43 +43,6 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i ...@@ -62,43 +43,6 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
%template() Loki::Visitor<XdmfArray>; %template() Loki::Visitor<XdmfArray>;
%template() Loki::Visitor<XdmfItem>; %template() Loki::Visitor<XdmfItem>;
#ifdef SWIGJAVA
%ignore XdmfArray::getHDF5Controller() const;
%ignore XdmfArray::getValuesInternal() const;
%ignore XdmfArray::ItemTag;
%ignore XdmfInformation::ItemTag;
%ignore XdmfItem::getInformation(const unsigned int index) const;
%ignore XdmfItem::getInformation(const std::string & name) const;
%ignore XdmfWriter::getHDF5Writer() const;
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("XdmfCoreJava");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load for XdmfCoreJava\n" + e);
System.exit(1);
}
}
%}
#endif /* SWIGJAVA */
#ifdef SWIGPYTHON
%extend XdmfItem {
bool __eq__(boost::shared_ptr<XdmfItem> item) {
return(self->IsEqual(item));
}
};
#endif
#ifdef SWIGJAVA
%extend XdmfItem {
bool equals(boost::shared_ptr<XdmfItem> item) {
return(self->IsEqual(item));
}
};
#endif
%include XdmfItem.hpp %include XdmfItem.hpp
%include XdmfItemProperty.hpp %include XdmfItemProperty.hpp
%include XdmfVisitor.hpp %include XdmfVisitor.hpp
...@@ -143,61 +87,65 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i ...@@ -143,61 +87,65 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
%template(resizeAsUInt16) XdmfArray::resize<unsigned short>; %template(resizeAsUInt16) XdmfArray::resize<unsigned short>;
%template(resizeAsUInt32) XdmfArray::resize<unsigned int>; %template(resizeAsUInt32) XdmfArray::resize<unsigned int>;
#ifndef SWIGJAVA #ifdef SWIGPYTHON
// Provide accessors from python lists to XdmfArrays // Provide accessors from python lists to XdmfArrays
%extend XdmfArray {
PyObject * getBuffer ()
{
void *vp = $self->getValuesInternal();
Py_ssize_t sz = $self->getSize() * $self->getElementSize();
PyObject * c = PyBuffer_FromMemory(vp, sz);
return(c);
}
%pythoncode {
def getNumpyArray(self):
h5ctl = self.getHDF5Controller()
if h5ctl == None :
try :
from numpy import frombuffer as ___frombuffer
except :
return None
buf = self.getBuffer()
aType = self.getArrayType()
if aType == XdmfArrayType.Int8() :
return(___frombuffer(buf, 'int8'))
if aType == XdmfArrayType.Int16() :
return(___frombuffer(buf, 'int16'))
if aType == XdmfArrayType.Int32() :
return(___frombuffer(buf, 'int32'))
if aType == XdmfArrayType.Int64() :
return(___frombuffer(buf, 'int64'))
if aType == XdmfArrayType.Float32() :
return(___frombuffer(buf, 'float32'))
if aType == XdmfArrayType.Float64() :
return(___frombuffer(buf, 'float64'))
if aType == XdmfArrayType.UInt8() :
return(___frombuffer(buf, 'uint8'))
if aType == XdmfArrayType.UInt16() :
return(___frombuffer(buf, 'uint16'))
if aType == XdmfArrayType.UInt32() :
return(___frombuffer(buf, 'uint32'))
return None
else :
h5FileName = h5ctl.getFilePath()
h5DataSetName = h5ctl.getDataSetPath()
if (h5FileName == None) | (h5DataSetName == None) :
return None
try :
from h5py import File as ___File
from numpy import array as ___array
f = ___File(h5FileName, 'r')
if h5DataSetName in f.keys() :
return(___array(f[h5DataSetName]))
except :
pass
return None
};