]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
__str__ for meshes
authorageay <ageay>
Wed, 27 Mar 2013 15:15:27 +0000 (15:15 +0000)
committerageay <ageay>
Wed, 27 Mar 2013 15:15:27 +0000 (15:15 +0000)
src/MEDCoupling/MEDCouplingCMesh.cxx
src/MEDCoupling/MEDCouplingCMesh.hxx
src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx
src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
src/MEDCoupling/MEDCouplingExtrudedMesh.hxx
src/MEDCoupling/MEDCouplingMesh.hxx
src/MEDCoupling/MEDCouplingUMesh.cxx
src/MEDCoupling/MEDCouplingUMesh.hxx
src/MEDCoupling/MEDCouplingUMeshDesc.cxx
src/MEDCoupling/MEDCouplingUMeshDesc.hxx

index 1e2e0df008cc86999a6e60282aa042d4051e4362..3018af8519a37c1c502831329ff7eaaaf6e10b18 100644 (file)
@@ -773,6 +773,11 @@ void MEDCouplingCMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData
   ofs << "  </" << getVTKDataSetType() << ">\n";
 }
 
+void MEDCouplingCMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingCMesh C++ instance at " << this << ".";
+}
+
 std::string MEDCouplingCMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
 {
   return std::string("RectilinearGrid");
index 368f9c335371dca6bbc581a44d8a3c0061a3e994..69cd72036c0015022474e6daff19b43ec8317acd 100644 (file)
@@ -90,6 +90,7 @@ namespace ParaMEDMEM
     MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy);
     ~MEDCouplingCMesh();
     void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception);
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
     std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception);
   private:
     DataArrayDouble *_x_array;
index eb98ac357574e514eb23c1f29abb19ed0544d007..de3ad07df5d7296ea8905297364168ebc5fef61b 100644 (file)
@@ -878,6 +878,11 @@ void MEDCouplingCurveLinearMesh::writeVTKLL(std::ostream& ofs, const std::string
   ofs << "  </" << getVTKDataSetType() << ">\n";
 }
 
+void MEDCouplingCurveLinearMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingCurveLinearMesh C++ instance at " << this << ".";
+}
+
 std::string MEDCouplingCurveLinearMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
 {
   return std::string("StructuredGrid");
index 33de0cafc15203d201ae20268e496f793df873f0..53f04731a6ec1cbefb632e2f92bba18b3aeafd3c 100644 (file)
@@ -98,6 +98,7 @@ namespace ParaMEDMEM
     MEDCouplingCurveLinearMesh(const MEDCouplingCurveLinearMesh& other, bool deepCpy);
     ~MEDCouplingCurveLinearMesh();
     void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception);
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
     std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception);
   private:
     MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> _coords;
index a513cbebed89e9f65744008757a823bf49554b07..10ccb010f65fdfaaa6b6daa74873e37c2d580e57 100644 (file)
@@ -919,6 +919,11 @@ void MEDCouplingExtrudedMesh::writeVTKLL(std::ostream& ofs, const std::string& c
   m->writeVTKLL(ofs,cellData,pointData);
 }
 
+void MEDCouplingExtrudedMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ".";
+}
+
 std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
 {
   return _mesh2D->getVTKDataSetType();
index 572e82722601271c3e4c2cecf05ce02c84d15199..b2ae506c9ab98fae62fe56c70aefd27ce02fe235 100644 (file)
@@ -116,6 +116,7 @@ namespace ParaMEDMEM
     void computeBaryCenterOfFace(const std::vector<int>& nodalConnec, int lev1DId);
     ~MEDCouplingExtrudedMesh();
     void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception);
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
     std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception);
   private:
     MEDCouplingUMesh *_mesh2D;
index 50112321984e50fabdc61b9a75d747e2bc776265..acee171cee349202f6abf06c762c728c9d606e26 100644 (file)
@@ -135,6 +135,7 @@ namespace ParaMEDMEM
     void writeVTKAdvanced(const char *fileName, const std::string& cda, const std::string& pda) const throw(INTERP_KERNEL::Exception);
     /// @endcond
     virtual void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception) = 0;
+    virtual void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception) = 0;
   protected:
     MEDCouplingMesh();
     MEDCouplingMesh(const MEDCouplingMesh& other);
index 5345dd05a6388ab29d812d09412cb70715ed1b03..2e2da9c12ea0ffe0ea658e519de409f0758879ec 100644 (file)
@@ -7440,6 +7440,11 @@ void MEDCouplingUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData
   ofs << "  </" << getVTKDataSetType() << ">\n";
 }
 
+void MEDCouplingUMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingUMesh C++ instance at " << this << ". ";
+}
+
 std::string MEDCouplingUMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
 {
   return std::string("UnstructuredGrid");
index 98586f3c1583ba2c5b97515c7f3c646b3adf6cff..bb6f1276a458ddde82b60cf90a65d8f0e9b30635 100644 (file)
@@ -91,6 +91,7 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception);
+    MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
     //tools
     MEDCOUPLING_EXPORT static int AreCellsEqual(const int *conn, const int *connI, int cell1, int cell2, int compType);
     MEDCOUPLING_EXPORT static int AreCellsEqual0(const int *conn, const int *connI, int cell1, int cell2);
index 5f2de902711e8d5d30827da6d2c769e50903b706..768988d0911b90f7e6d4d8ef741f423a52abc9fa 100644 (file)
@@ -533,3 +533,8 @@ DataArrayDouble *MEDCouplingUMeshDesc::computeIsoBarycenterOfNodesPerCell() cons
 {
   throw INTERP_KERNEL::Exception("MEDCouplingUMeshDesc::computeIsoBarycenterOfNodesPerCell : not implemented yet !");
 }
+
+void MEDCouplingUMeshDesc::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
+{
+  stream << "MEDCouplingUMeshDesc C++ instance at " << this << ".";
+}
index ba3f674f8180735f4c9c3112da9788e83144e930..17a387710b9cd84acfff3f97169b7ea52228316e 100644 (file)
@@ -97,6 +97,7 @@ namespace ParaMEDMEM
     void computeTypes();
     void checkFullyDefined() const throw(INTERP_KERNEL::Exception);
     void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception);
+    void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception);
     std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception);
   private:
     int _mesh_dim;