const char *MEDCouplingVersionStr();
int MEDCouplingVersion();
int MEDCouplingSizeOfVoidStar();
+ bool MEDCouplingByteOrder();
+ const char *MEDCouplingByteOrderStr();
- class RefCountObject
+ class BigMemoryObject
+ {
+ public:
+ std::size_t getHeapMemorySize() const;
+ std::string getHeapMemorySizeStr() const;
+ virtual std::size_t getHeapMemorySizeWithoutChildren() const;
+ virtual ~BigMemoryObject();
+ %extend
+ {
+ virtual PyObject *getDirectChildren() const
+ {
+ std::vector<const BigMemoryObject *> c(self->getDirectChildren());
+ PyObject *ret(PyList_New(c.size()));
+ for(std::size_t i=0;i<c.size();i++)
+ PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(c[i]),SWIGTYPE_p_ParaMEDMEM__BigMemoryObject, 0 | 0 ));
+ return ret;
+ }
+ }
+ };
+
+ class RefCountObjectOnly
{
- protected:
- RefCountObject();
- RefCountObject(const RefCountObject& other);
- ~RefCountObject();
public:
bool decrRef() const;
void incrRef() const;
int getRCValue() const;
- virtual std::size_t getHeapMemorySize() const;
+ RefCountObjectOnly& operator=(const RefCountObjectOnly& other);
+ protected:
+ ~RefCountObjectOnly();
+ };
+
+ class RefCountObject : public RefCountObjectOnly, public BigMemoryObject
+ {
+ protected:
+ ~RefCountObject();
};
}
typedef enum
{
UNSTRUCTURED = 5,
- UNSTRUCTURED_DESC = 6,
CARTESIAN = 7,
EXTRUDED = 8,
- CURVE_LINEAR = 9
+ CURVE_LINEAR = 9,
+ SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED = 10,
+ SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED = 11
} MEDCouplingMeshType;
class DataArrayInt;
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
- void writeVTK(const char *fileName) const throw(INTERP_KERNEL::Exception);
+ void writeVTK(const char *fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
// tools
virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const throw(INTERP_KERNEL::Exception);
void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception);
std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
- void writeVTK(const char *fileName) const throw(INTERP_KERNEL::Exception);
+ void writeVTK(const char *fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
MEDCouplingFieldDouble *deepCpy() const;
return MEDCouplingFieldDouble::MergeFields(tmp);
}
- static void WriteVTK(const char *fileName, PyObject *li) throw(INTERP_KERNEL::Exception)
+ static void WriteVTK(const char *fileName, PyObject *li, bool isBinary=true) throw(INTERP_KERNEL::Exception)
{
std::vector<const MEDCouplingFieldDouble *> tmp;
convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
- MEDCouplingFieldDouble::WriteVTK(fileName,tmp);
+ MEDCouplingFieldDouble::WriteVTK(fileName,tmp,isBinary);
}
}
};