Salome HOME
0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups
authoreap <eap@opencascade.com>
Thu, 23 Jun 2011 12:10:32 +0000 (12:10 +0000)
committereap <eap@opencascade.com>
Thu, 23 Jun 2011 12:10:32 +0000 (12:10 +0000)
   Move definition of abstract classes Functor and Predicate from
   SMESH_ControlsDef.hxx to SMESH_Controls.hxx

src/Controls/SMESH_Controls.hxx
src/Controls/SMESH_ControlsDef.hxx

index 63d0065c44e5a91f628e036dfdda389349e3c431..785b91420804daddcd6dbc7df0ed800961482933 100644 (file)
 #ifndef _SMESH_CONTROLS_HXX_
 #define _SMESH_CONTROLS_HXX_
 
+#include "SMDSAbs_ElementType.hxx"
+
 #include <boost/shared_ptr.hpp>
 
+#ifdef WNT
+ #if defined SMESHCONTROLS_EXPORTS || defined SMESHControls_EXPORTS
+  #define SMESHCONTROLS_EXPORT __declspec( dllexport )
+ #else
+  #define SMESHCONTROLS_EXPORT __declspec( dllimport )
+ #endif
+#else
+ #define SMESHCONTROLS_EXPORT
+#endif
+
+class SMDS_Mesh;
+
 namespace SMESH{
   namespace Controls{
 
-    class Functor;
+    /*
+      Class       : Functor
+      Description : Root of all Functors
+    */
+    class SMESHCONTROLS_EXPORT Functor
+    {
+    public:
+      ~Functor(){}
+      virtual void SetMesh( const SMDS_Mesh* theMesh ) = 0;
+      virtual SMDSAbs_ElementType GetType() const = 0;
+    };
     typedef boost::shared_ptr<Functor> FunctorPtr;
 
 
     class NumericalFunctor;
     typedef boost::shared_ptr<NumericalFunctor> NumericalFunctorPtr;
   
-  
-    class Predicate;
+    /*
+      Class       : Predicate
+      Description : Base class for all predicates
+    */
+    class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{
+    public:
+      virtual bool IsSatisfy( long theElementId ) = 0;
+      virtual SMDSAbs_ElementType GetType() const = 0;
+    };
     typedef boost::shared_ptr<Predicate> PredicatePtr;
 
   }
 }
 
+typedef SMESH::Controls::PredicatePtr SMESH_PredicatePtr;
+
 
 #endif
index afe0770e04fab92c6618cb26326e57bdbaec6445..d5dae39ec5f34e51dbe9d88af67270925abd4e4a 100644 (file)
 
 #include "SMESH_Controls.hxx"
 
-#ifdef WNT
- #if defined SMESHCONTROLS_EXPORTS || defined SMESHControls_EXPORTS
-  #define SMESHCONTROLS_EXPORT __declspec( dllexport )
- #else
-  #define SMESHCONTROLS_EXPORT __declspec( dllimport )
- #endif
-#else
- #define SMESHCONTROLS_EXPORT
-#endif
-
 class SMDS_MeshElement;
 class SMDS_MeshFace;
 class SMDS_MeshNode;
@@ -105,18 +95,6 @@ namespace SMESH{
       std::vector<gp_XYZ> myArray;
     };
 
-    /*
-      Class       : Functor
-      Description : Root of all Functors
-    */
-    class SMESHCONTROLS_EXPORT Functor
-    {
-    public:
-      ~Functor(){}
-      virtual void SetMesh( const SMDS_Mesh* theMesh ) = 0;
-      virtual SMDSAbs_ElementType GetType() const = 0;
-    };
-
     /*
       Class       : NumericalFunctor
       Description : Root of all Functors returning numeric value
@@ -341,17 +319,6 @@ namespace SMESH{
     /*
       PREDICATES
     */
-    /*
-      Class       : Predicate
-      Description : Base class for all predicates
-    */
-    class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{
-    public:
-      virtual bool IsSatisfy( long theElementId ) = 0;
-      virtual SMDSAbs_ElementType GetType() const = 0;
-    };
-  
-  
     /*
       Class       : FreeBorders
       Description : Predicate for free borders