From: eap Date: Thu, 23 Jun 2011 12:10:32 +0000 (+0000) Subject: 0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups X-Git-Tag: V6_4_0a1~198 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d73cacdd519b031ebb3c16a995bb399c3625be1c;p=modules%2Fsmesh.git 0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups Move definition of abstract classes Functor and Predicate from SMESH_ControlsDef.hxx to SMESH_Controls.hxx --- diff --git a/src/Controls/SMESH_Controls.hxx b/src/Controls/SMESH_Controls.hxx index 63d0065c4..785b91420 100644 --- a/src/Controls/SMESH_Controls.hxx +++ b/src/Controls/SMESH_Controls.hxx @@ -23,24 +23,57 @@ #ifndef _SMESH_CONTROLS_HXX_ #define _SMESH_CONTROLS_HXX_ +#include "SMDSAbs_ElementType.hxx" + #include +#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 FunctorPtr; class NumericalFunctor; typedef boost::shared_ptr 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 PredicatePtr; } } +typedef SMESH::Controls::PredicatePtr SMESH_PredicatePtr; + #endif diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index afe0770e0..d5dae39ec 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -46,16 +46,6 @@ #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 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