Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/smesh.git] / src / SMESH / SMESH_Algo.hxx
1 //=============================================================================
2 // File      : SMESH_Algo.hxx
3 // Created   : sam mai 18 09:20:46 CEST 2002
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2002
7 // $Header$
8 //=============================================================================
9
10 #ifndef _SMESH_ALGO_HXX_
11 #define _SMESH_ALGO_HXX_
12
13 #include "SMESH_Hypothesis.hxx"
14
15 #include <TopoDS_Shape.hxx>
16 #include <TopoDS_Edge.hxx>
17
18 #include <string>
19 #include <vector>
20 #include <list>
21
22 class SMESH_gen;
23 class SMESH_Mesh;
24
25 class SMESH_Algo:
26   public SMESH_Hypothesis
27 {
28 public:
29   SMESH_Algo(int hypId, int studyId, SMESH_Gen* gen);
30   virtual ~SMESH_Algo();
31
32   const vector<string> & GetCompatibleHypothesis();
33   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
34                                const TopoDS_Shape& aShape);
35
36   virtual bool Compute(SMESH_Mesh& aMesh,
37                        const TopoDS_Shape& aShape);
38
39   virtual const list<SMESHDS_Hypothesis*>&
40   GetUsedHypothesis(SMESH_Mesh& aMesh,
41                     const TopoDS_Shape& aShape);
42
43   const list<SMESHDS_Hypothesis*>&
44   GetAppliedHypothesis(SMESH_Mesh& aMesh,
45                        const TopoDS_Shape& aShape);
46
47   static double EdgeLength(const TopoDS_Edge& E);
48
49   virtual ostream & SaveTo(ostream & save);
50   virtual istream & LoadFrom(istream & load);
51   friend ostream& operator << (ostream & save, SMESH_Algo & hyp);
52   friend istream& operator >> (istream & load, SMESH_Algo & hyp);
53
54 protected:
55   vector<string> _compatibleHypothesis;
56   list<SMESHDS_Hypothesis*> _appliedHypList;
57   list<SMESHDS_Hypothesis*> _usedHypList;
58 };
59
60 #endif