+ ::SMESH_Hypothesis* myBaseImpl; // base hypothesis implementation
+
+ // _CS_gbo_070505 To keep the reference and delayed the activation
+ // in the methode Activate().
+ PortableServer::POA_ptr myPOA;
+};
+
+// ======================================================
+// Generic hypothesis creator
+// ======================================================
+class GenericHypothesisCreator_i
+{
+public:
+ // Create a hypothesis
+ virtual SMESH_Hypothesis_i* Create(PortableServer::POA_ptr thePOA,
+ int theStudyId,
+ ::SMESH_Gen* theGenImpl) = 0;
+};
+
+//=============================================================================
+//
+// Specific Hypothesis Creators are generated with a template which inherits a
+// generic hypothesis creator. Each creator returns an hypothesis of the type
+// given in the template.
+//
+//=============================================================================
+template <class T> class HypothesisCreator_i: public GenericHypothesisCreator_i
+{
+public:
+ virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA,
+ int theStudyId,
+ ::SMESH_Gen* theGenImpl)
+ {
+ return new T (thePOA, theStudyId, theGenImpl);
+ };