Salome HOME
scotch6.0.4 needs pthread... Quick and dirty solution to be improved
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingFieldInt.hxx
index 5986efb6058f8f014d192cc90616d429bd529b03..60ab3deadaf40d241b5f764af266e327c79dcc49 100644 (file)
 //
 // Author : Yann Pora (EDF R&D)
 
-#ifndef __PARAMEDMEM_MEDCOUPLINGFIELDINT_HXX__
-#define __PARAMEDMEM_MEDCOUPLINGFIELDINT_HXX__
+#ifndef __MEDCOUPLINGFIELDINT_HXX__
+#define __MEDCOUPLINGFIELDINT_HXX__
 
 #include "MEDCoupling.hxx"
-#include "MEDCouplingField.hxx"
-#include "MEDCouplingTimeDiscretization.hxx"
+#include "MEDCouplingFieldT.hxx"
 #include "MEDCouplingMemArray.hxx"
 
 #include <string>
 
 namespace MEDCoupling
 {
-  class MEDCouplingFieldInt : public MEDCouplingField
+  class MEDCouplingFieldDouble;
+  class MEDCouplingFieldTemplate;
+  
+  class MEDCouplingFieldInt : public MEDCouplingFieldT<int>
   {
   public:
     MEDCOUPLING_EXPORT static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
-    MEDCOUPLING_EXPORT void checkConsistencyLight() const;
-    MEDCOUPLING_EXPORT std::string simpleRepr() const;
-    MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
-    MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit);
-    MEDCOUPLING_EXPORT std::string getTimeUnit() const;
-    MEDCOUPLING_EXPORT void setTime(double val, int iteration, int order);
-    MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const;
-    MEDCOUPLING_EXPORT void setArray(DataArrayInt *array);
-    MEDCOUPLING_EXPORT const DataArrayInt *getArray() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getArray();
+    MEDCOUPLING_EXPORT static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+    MEDCOUPLING_EXPORT MEDCouplingFieldInt *deepCopy() const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldInt *clone(bool recDeepCpy) const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
   protected:
     MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td);
     MEDCouplingFieldInt(const MEDCouplingFieldInt& other, bool deepCopy);
-    MEDCouplingFieldInt(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type);
-    ~MEDCouplingFieldInt();
-  private:
-    MEDCouplingTimeDiscretization *_time_discr;
-    MCAuto<DataArrayInt> _array;// agy : don't panic ! this is temporary ! templatization of time discr is planned !
+    MEDCouplingFieldInt(NatureOfField n, MEDCouplingTimeDiscretizationInt *td, MEDCouplingFieldDiscretization *type);
+    MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
+    ~MEDCouplingFieldInt() { }
   };
 }