]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
__repr__ of MEDCouplingField
authorageay <ageay>
Tue, 2 Apr 2013 15:45:14 +0000 (15:45 +0000)
committerageay <ageay>
Tue, 2 Apr 2013 15:45:14 +0000 (15:45 +0000)
src/MEDCoupling/MEDCouplingField.hxx
src/MEDCoupling/MEDCouplingFieldDouble.cxx
src/MEDCoupling/MEDCouplingFieldDouble.hxx
src/MEDCoupling/MEDCouplingFieldTemplate.cxx
src/MEDCoupling/MEDCouplingFieldTemplate.hxx

index c42421e8c4204dcb0a8bcd6ee8c6e2f050aa2a86..1df5494c21c3f040d026dc5a6dbdc8d64715458a 100644 (file)
@@ -84,6 +84,7 @@ namespace ParaMEDMEM
     const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception);
     void updateTime() const;
     std::size_t getHeapMemorySize() const;
+    virtual void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception) = 0;
   protected:
     MEDCouplingField(TypeOfField type);
     MEDCouplingField(const MEDCouplingField& other, bool deepCopy=true);
index 5c874cf555da9b6ec12e7c510f1c5718c455edab..d2d915cf4118eb46ca62a36279b639ffffc9b588 100644 (file)
@@ -1830,3 +1830,7 @@ void MEDCouplingFieldDouble::WriteVTK(const char *fileName, const std::vector<co
     }
   m->writeVTKAdvanced(fileName,coss.str(),noss.str());
 }
+
+void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+}
index 4da0aec219572e4ed5be075c13b8019cd2865896..d74464c136798e716a02d4dd6887613c5b8780c1 100644 (file)
@@ -187,6 +187,7 @@ namespace ParaMEDMEM
   public:
     const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return _time_discr; }
     MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return _time_discr; }
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
   private:
     MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td);
     MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
index 41733cfd3638cc71dcada8a9310b0f674a7a0678..3b07c7efa7300b2b848185456a56e4c9ef94dab6 100644 (file)
@@ -119,3 +119,10 @@ void MEDCouplingFieldTemplate::serialize(DataArrayInt *&dataInt) const
   _type->getSerializationIntArray(dataInt);
 }
 
+void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingFieldTemplate C++ instance at " << this << ".";
+  const MEDCouplingFieldDiscretization *fd(_type);
+  if(!fd)
+    stream << " No spatial discretization set !";
+}
index b297287c296272ce06b85459a00af1a27d756c73..3fb6cfa8a9687c0607ee3edb74f015e6dd393266 100644 (file)
@@ -43,6 +43,7 @@ namespace ParaMEDMEM
     void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
     void serialize(DataArrayInt *&dataInt) const;
     //
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
   private:
     MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldTemplate(TypeOfField type);