Salome HOME
NRI : Add GEOM includes and libs.
[modules/smesh.git] / src / SMESH / SMESH_HypothesisFactory.hxx
1 //=============================================================================
2 // File      : SMESH_HypothesisFactory.hxx
3 // Created   : mer mai 15 13:45:47 CEST 2002
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2002
7 // $Header$
8 //=============================================================================
9
10 #ifndef _SMESH_HYPOTHESISFACTORY_HXX_
11 #define _SMESH_HYPOTHESISFACTORY_HXX_
12
13 #include "SMESH_Hypothesis.hxx"
14
15 #include "Utils_SALOME_Exception.hxx"
16
17 #include <map>
18
19 class SMESH_Gen;
20
21 class GenericHypothesisCreator
22 {
23 public:
24 //   virtual SMESH_Hypothesis* GetInstance(int hypId) = 0;
25   virtual SMESH_Hypothesis* Create(int hypId, int studyId, SMESH_Gen* gen) = 0;
26 };
27
28 class SMESH_HypothesisFactory
29 {
30 public:
31   SMESH_HypothesisFactory();
32   virtual ~SMESH_HypothesisFactory();
33
34   void SetGen(SMESH_Gen* gen);
35
36   SMESH_Hypothesis* Create(const char* anHypName, int studyId)
37     throw (SALOME_Exception);
38
39   GenericHypothesisCreator* GetCreator(const char* anHypName)
40     throw (SALOME_Exception);
41
42   int GetANewId();
43
44 private:
45   map<string, GenericHypothesisCreator*> _creatorMap;
46   int _hypId;
47   SMESH_Gen* _gen;
48 };
49
50 #endif