Salome HOME
+ const SMESHDS_SubMesh * GetSubMeshDS() const;
[modules/smesh.git] / src / SMESH / SMESH_Gen.hxx
index 606c96d1866f30223a123f86b095390ebb68d8b4..b7854786fc072753e187141e1b6014bba1ae255a 100644 (file)
@@ -1,23 +1,23 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 #include "SMESH_Hypothesis.hxx"
 #include "SMESH_ComputeError.hxx"
 #include "SMESH_Algo.hxx"
-#include "SMESH_0D_Algo.hxx"
-#include "SMESH_1D_Algo.hxx"
-#include "SMESH_2D_Algo.hxx"
-#include "SMESH_3D_Algo.hxx"
 #include "SMESH_Mesh.hxx"
 
+#include "chrono.hxx"
+
 #include <TopoDS_Shape.hxx>
 
 #include <map>
 #include <list>
+#include <vector>
+#include <string>
 
 class SMESHDS_Document;
 
@@ -81,6 +81,13 @@ public:
                const ::MeshDimension aDim=::MeshDim_3D,
                TSetOfInt*            aShapesId=0);
 
+#ifdef WITH_SMESH_CANCEL_COMPUTE
+  void PrepareCompute(::SMESH_Mesh &        aMesh,
+                      const TopoDS_Shape &  aShape);
+  void CancelCompute(::SMESH_Mesh &        aMesh,
+                     const TopoDS_Shape &  aShape);
+#endif
+
   /*!
    * \brief evaluates size of prospective mesh on a shape 
    * \param aMesh - the mesh
@@ -135,9 +142,13 @@ public:
   static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType);
   static int GetShapeDim(const TopoDS_Shape & aShape)
   { return GetShapeDim( aShape.ShapeType() ); }
+
   SMESH_Algo* GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, TopoDS_Shape* assignedTo=0);
+
   static bool IsGlobalHypothesis(const SMESH_Hypothesis* theHyp, SMESH_Mesh& aMesh);
 
+  static std::vector< std::string > GetPluginXMLPaths();
+
   int GetANewId();
 
   std::map < int, SMESH_Algo * >_mapAlgo;
@@ -159,6 +170,12 @@ private:
   int _segmentation;
   // default of segments
   int _nbSegments;
+  counters *_counters;
+
+#ifdef WITH_SMESH_CANCEL_COMPUTE
+  volatile bool _compute_canceled;
+  SMESH_subMesh* _sm_current;
+#endif
 };
 
 #endif