]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Micro imps of __repr__ of Fields
authorageay <ageay>
Tue, 9 Apr 2013 07:32:54 +0000 (07:32 +0000)
committerageay <ageay>
Tue, 9 Apr 2013 07:32:54 +0000 (07:32 +0000)
src/MEDCoupling/MEDCouplingFieldDouble.cxx
src/MEDCoupling/MEDCouplingFieldTemplate.cxx

index 09f49923abb435761666cbe9462000a1cb8abcc3..45908d984df0c73238ac488f11fbe6bc32d344d5 100644 (file)
@@ -1994,12 +1994,25 @@ void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const throw
     fd->reprQuickOverview(stream);
   stream << std::endl;
   if(!_mesh)
-    stream << "No mesh support defined !";
+    stream << "\nNo mesh support defined !";
   else
     {
       std::ostringstream oss;
       _mesh->reprQuickOverview(oss);
       std::string tmp(oss.str());
-      stream << "Mesh info : " << tmp.substr(0,tmp.find('\n'));
+      stream << "\nMesh info : " << tmp.substr(0,tmp.find('\n'));
+    }
+  if(_time_discr)
+    {
+      const DataArrayDouble *arr=_time_discr->getArray();
+      if(arr)
+        {
+          stream << "\n\nArray info : ";
+          arr->reprQuickOverview(stream);
+        }
+      else
+        {
+          stream << "\n\nNo data array set !";
+        }
     }
 }
index 70202d06906c858640ad4025d60526de297f58b4..235146889f4c6b66ab30eeca3e26e83e4082523e 100644 (file)
@@ -148,12 +148,12 @@ void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const thr
     fd->reprQuickOverview(stream);
   stream << std::endl;
   if(!_mesh)
-    stream << "No mesh support defined !";
+    stream << "\nNo mesh support defined !";
   else
     {
       std::ostringstream oss;
       _mesh->reprQuickOverview(oss);
       std::string tmp(oss.str());
-      stream << "Mesh info : " << tmp.substr(0,tmp.find('\n'));
+      stream << "\nMesh info : " << tmp.substr(0,tmp.find('\n'));
     }
 }