Salome HOME
Adjust to CVS HEAD modifications
[modules/smesh.git] / src / Controls / SMESH_Controls.hxx
index 1c771eb122d25c0bbade3b8a1a9d3636220a4d8c..fa4558db5bf7216c9f4e4bec04d1c594c913bfe0 100644 (file)
 #ifndef _SMESH_CONTROLS_HXX_
 #define _SMESH_CONTROLS_HXX_
 
-#include <map>
-#include <vector>
 #include <boost/shared_ptr.hpp>
-#include "SMDSAbs_ElementType.hxx"
-
-class SMDS_Mesh;
-class gp_Pnt;
-class gp_XYZ;
-class TColgp_SequenceOfXYZ;
 
 namespace SMESH{
   namespace Controls{
-    class Functor{
-    public:
-      ~Functor(){}
-      virtual void SetMesh( SMDS_Mesh* theMesh ) = 0;
-    };
+
+    class Functor;
     typedef boost::shared_ptr<Functor> FunctorPtr;
 
-    class NumericalFunctor: public virtual Functor{
-    public:
-      NumericalFunctor();
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual double GetValue( long theElementId ) = 0;
-      virtual SMDSAbs_ElementType GetType() const = 0;
-      
-    protected:
-      bool getPoints( const int theId, 
-                     TColgp_SequenceOfXYZ& theRes ) const;
-    protected:
-      SMDS_Mesh* myMesh;
-    };
+
+    class NumericalFunctor;
     typedef boost::shared_ptr<NumericalFunctor> NumericalFunctorPtr;
   
   
-    /*
-      Class       : SMESH_MinimumAngle
-      Description : Functor for calculation of minimum angle
-    */
-    class MinimumAngle: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-  
-  
-    /*
-      Class       : AspectRatio
-      Description : Functor for calculating aspect ratio
-    */
-    class AspectRatio: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-  
-  
-    /*
-      Class       : Warping
-      Description : Functor for calculating warping
-    */
-    class Warping: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-      
-    private:
-      double ComputeA( const gp_XYZ&, const gp_XYZ&, 
-                      const gp_XYZ&, const gp_XYZ& ) const;
-    };
-  
-  
-    /*
-      Class       : Taper
-      Description : Functor for calculating taper
-    */
-    class Taper: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-    
-  
-    /*
-      Class       : Skew
-      Description : Functor for calculating skew in degrees
-    */
-    class Skew: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-  
-    
-    /*
-      Class       : Area
-      Description : Functor for calculating area
-    */
-    class Area: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-  
-  
-    /*
-      Class       : Length
-      Description : Functor for calculating length of edge
-    */
-    class Length: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-  
-  
-    /*
-      Class       : MultiConnection
-      Description : Functor for calculating number of faces conneted to the edge
-    */
-    class MultiConnection: public virtual NumericalFunctor{
-    public:
-      virtual double GetValue( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-    };
-    
-  
-    /*
-      PREDICATES
-    */
-    /*
-      Class       : Predicate
-      Description : Base class for all predicates
-    */
-    class Predicate: public virtual Functor{
-    public:
-      virtual bool IsSatisfy( long theElementId ) = 0;
-      virtual SMDSAbs_ElementType GetType() const = 0;
-    };
+    class Predicate;
     typedef boost::shared_ptr<Predicate> PredicatePtr;
-    
-  
-  
-    /*
-      Class       : FreeBorders
-      Description : Predicate for free borders
-    */
-    class FreeBorders: public virtual Predicate{
-    public:
-      FreeBorders();
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual bool IsSatisfy( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-            
-    protected:
-      SMDS_Mesh* myMesh;
-    };
-   
 
-    /*
-      Class       : FreeEdges
-      Description : Predicate for free Edges
-    */
-    class FreeEdges: public virtual Predicate{
-    public:
-      FreeEdges();
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual bool IsSatisfy( long theElementId );
-      virtual SMDSAbs_ElementType GetType() const;
-      struct Border{
-       long PntId[2];
-       Border(long thePntId1, long thePntId2);
-      };
-      typedef long TElemId;
-      typedef std::map<TElemId,Border> Borders;
-      void GetBoreders(Borders& theBorders);
-      
-    protected:
-      SMDS_Mesh* myMesh;
-    };
-    typedef boost::shared_ptr<FreeEdges> FreeEdgesPtr;
-   
-    
-    /*
-      Class       : Comparator
-      Description : Base class for comparators
-    */
-    class Comparator: public virtual Predicate{
-    public:
-      Comparator();
-      virtual ~Comparator();
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual void SetMargin(double theValue);
-      virtual void SetNumFunctor(NumericalFunctorPtr theFunct);
-      virtual bool IsSatisfy( long theElementId ) = 0;
-      virtual SMDSAbs_ElementType GetType() const;
-  
-    protected:
-      double myMargin;
-      NumericalFunctorPtr myFunctor;
-    };
-    typedef boost::shared_ptr<Comparator> ComparatorPtr;
-  
-  
-    /*
-      Class       : LessThan
-      Description : Comparator "<"
-    */
-    class LessThan: public virtual Comparator{
-    public:
-      virtual bool IsSatisfy( long theElementId );
-    };
-  
-  
-    /*
-      Class       : MoreThan
-      Description : Comparator ">"
-    */
-    class MoreThan: public virtual Comparator{
-    public:
-      virtual bool IsSatisfy( long theElementId );
-    };
-  
-  
-    /*
-      Class       : EqualTo
-      Description : Comparator "="
-    */
-    class EqualTo: public virtual Comparator{
-    public:
-      EqualTo();
-      virtual bool IsSatisfy( long theElementId );
-      virtual void SetTolerance( double theTol );
-  
-    private:
-      double myToler;
-    };
-    typedef boost::shared_ptr<EqualTo> EqualToPtr;
-  
-    
-    /*
-      Class       : LogicalNOT
-      Description : Logical NOT predicate
-    */
-    class LogicalNOT: public virtual Predicate{
-    public:
-      LogicalNOT();
-      virtual ~LogicalNOT();
-      virtual bool IsSatisfy( long theElementId );
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual void SetPredicate(PredicatePtr thePred);
-      virtual SMDSAbs_ElementType GetType() const;
-  
-    private:
-      PredicatePtr myPredicate;
-    };
-    typedef boost::shared_ptr<LogicalNOT> LogicalNOTPtr;
-    
-  
-    /*
-      Class       : LogicalBinary
-      Description : Base class for binary logical predicate
-    */
-    class LogicalBinary: public virtual Predicate{
-    public:
-      LogicalBinary();
-      virtual ~LogicalBinary();
-      virtual void SetMesh( SMDS_Mesh* theMesh );
-      virtual void SetPredicate1(PredicatePtr thePred);
-      virtual void SetPredicate2(PredicatePtr thePred);
-      virtual SMDSAbs_ElementType GetType() const;
-  
-    protected:
-      PredicatePtr myPredicate1;
-      PredicatePtr myPredicate2;
-    };
-    typedef boost::shared_ptr<LogicalBinary> LogicalBinaryPtr;
-  
-  
-    /*
-      Class       : LogicalAND
-      Description : Logical AND
-    */
-    class LogicalAND: public virtual LogicalBinary{
-    public:
-      virtual bool IsSatisfy( long theElementId );
-    };
-  
-  
-    /*
-      Class       : LogicalOR
-      Description : Logical OR
-    */
-    class LogicalOR: public virtual LogicalBinary{
-    public:
-      virtual bool IsSatisfy( long theElementId );
-    };
-  
-  
-    /*
-      FILTER
-    */
-    class Filter{
-    public:
-      Filter();
-      virtual ~Filter();
-      virtual void SetPredicate(PredicatePtr thePred);
-      typedef std::vector<long> TIdSequence;
-      virtual TIdSequence GetElementsId( SMDS_Mesh* theMesh );
-  
-    protected:
-      PredicatePtr myPredicate;
-    };
-  };  
-};
+  }
+}
 
 
 #endif