Salome HOME
Update copyright
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 //  File   : SMESH_Filter_i.hxx
25 //  Author : Alexey Petrov, OCC
26 //  Module : SMESH
27 //
28 #ifndef _SMESH_FILTER_I_HXX_
29 #define _SMESH_FILTER_I_HXX_
30
31 #include "SMESH.hxx"
32
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Filter)
35
36 #include <LDOM_Document.hxx>
37 #include <TopoDS_Shape.hxx>
38
39 #include "SALOME_GenericObj_i.hh"
40 #include "SMESH_ControlsDef.hxx"
41
42 class SMESHDS_Mesh;
43
44 namespace SMESH
45 {
46
47   // ================================================================================
48   namespace Controls
49   {
50
51     /*
52       Class       : BelongToGeom
53       Description : Predicate for verifying whether entiy belong to
54       specified geometrical support
55     */
56     class SMESH_I_EXPORT BelongToGeom: public virtual Predicate
57     {
58     public:
59       BelongToGeom();
60
61       virtual void                    SetMesh( const SMDS_Mesh* theMesh );
62       virtual void                    SetGeom( const TopoDS_Shape& theShape );
63
64       virtual bool                    IsSatisfy( long theElementId );
65
66       virtual void                    SetType( SMDSAbs_ElementType theType );
67       virtual                         SMDSAbs_ElementType GetType() const;
68
69       TopoDS_Shape                    GetShape();
70       const SMESHDS_Mesh*             GetMeshDS() const;
71
72       void                            SetTolerance( double );
73       double                          GetTolerance();
74
75     private:
76       virtual void                    init();
77
78       TopoDS_Shape                    myShape;
79       const SMESHDS_Mesh*             myMeshDS;
80       SMDSAbs_ElementType             myType;
81       bool                            myIsSubshape;
82       double                          myTolerance;          // only if myIsSubshape == false
83       Controls::ElementsOnShapePtr    myElementsOnShapePtr; // only if myIsSubshape == false
84     };
85     typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
86
87     /*
88       Class       : LyingOnGeom
89       Description : Predicate for verifying whether entiy lying or partially lying on
90       specified geometrical support
91     */
92     class SMESH_I_EXPORT LyingOnGeom: public virtual Predicate
93     {
94     public:
95       LyingOnGeom();
96       
97       virtual void                    SetMesh( const SMDS_Mesh* theMesh );
98       virtual void                    SetGeom( const TopoDS_Shape& theShape );
99       
100       virtual bool                    IsSatisfy( long theElementId );
101       
102       virtual void                    SetType( SMDSAbs_ElementType theType );
103       virtual                         SMDSAbs_ElementType GetType() const;
104       
105       TopoDS_Shape                    GetShape();
106       const SMESHDS_Mesh*             GetMeshDS() const;
107
108       void                            SetTolerance( double );
109       double                          GetTolerance();
110       
111       virtual bool                    Contains( const SMESHDS_Mesh*     theMeshDS,
112                                                 const TopoDS_Shape&     theShape,
113                                                 const SMDS_MeshElement* theElem,
114                                                 TopAbs_ShapeEnum        theFindShapeEnum,
115                                                 TopAbs_ShapeEnum        theAvoidShapeEnum = TopAbs_SHAPE );
116     private:
117       virtual void                    init();
118
119       TopoDS_Shape                    myShape;
120       const SMESHDS_Mesh*             myMeshDS;
121       SMDSAbs_ElementType             myType;
122       bool                            myIsSubshape;
123       double                          myTolerance;          // only if myIsSubshape == false
124       Controls::ElementsOnShapePtr    myElementsOnShapePtr; // only if myIsSubshape == false
125     };
126     typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
127
128   } // namespace Controls
129
130   // ================================================================================
131   /*
132     FUNCTORS
133   */
134   
135   /*
136     Class       : Functor_i
137     Description : An abstact class for all functors 
138   */
139   class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor,
140                    public virtual SALOME::GenericObj_i
141   {
142   public:
143     void                            SetMesh( SMESH_Mesh_ptr theMesh );
144     Controls::FunctorPtr            GetFunctor(){ return myFunctorPtr;}
145     ElementType                     GetElementType();
146     
147   protected:
148     Functor_i();
149     ~Functor_i();
150   protected:                                
151     Controls::FunctorPtr            myFunctorPtr;
152   };
153   
154   /*
155     Class       : NumericalFunctor_i
156     Description : Base class for numerical functors 
157   */
158   class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor,
159                             public virtual Functor_i
160   {
161   public:
162     CORBA::Double                   GetValue( CORBA::Long theElementId );
163     SMESH::Histogram*               GetHistogram(CORBA::Short nbIntervals);
164     void                            SetPrecision( CORBA::Long thePrecision );
165     CORBA::Long                     GetPrecision();
166     Controls::NumericalFunctorPtr   GetNumericalFunctor();
167     
168   protected:
169     Controls::NumericalFunctorPtr   myNumericalFunctorPtr;
170   };
171   
172   
173   /*
174     Class       : SMESH_MinimumAngleFunct
175     Description : Functor for calculation of minimum angle
176   */
177   class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle,
178                         public virtual NumericalFunctor_i
179   {
180   public:
181     MinimumAngle_i();
182     FunctorType                     GetFunctorType();
183   };
184   
185   
186   /*
187     Class       : AspectRatio_i
188     Description : Functor for calculating aspect ratio
189   */
190   class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio,
191                        public virtual NumericalFunctor_i
192   {
193   public:
194     AspectRatio_i();
195     FunctorType                     GetFunctorType();
196   };
197   
198   
199   /*
200     Class       : AspectRatio3D_i
201     Description : Functor for calculating aspect ratio for 3D
202   */
203   class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
204                          public virtual NumericalFunctor_i
205   {
206   public:
207     AspectRatio3D_i();
208     FunctorType                     GetFunctorType();
209   };
210   
211
212   /*
213     Class       : Warping_i
214     Description : Functor for calculating warping
215   */
216   class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping,
217                    public virtual NumericalFunctor_i
218   {
219   public:
220     Warping_i();
221     FunctorType                     GetFunctorType();
222   };
223   
224   
225   /*
226     Class       : Taper_i
227     Description : Functor for calculating taper
228   */
229   class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper,
230                  public virtual NumericalFunctor_i
231   {
232   public:
233     Taper_i();
234     FunctorType                     GetFunctorType();
235   };
236   
237   
238   /*
239     Class       : Skew_i
240     Description : Functor for calculating skew in degrees
241   */
242   class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew,
243                 public virtual NumericalFunctor_i
244   {
245   public:
246     Skew_i();
247     FunctorType                     GetFunctorType();
248   };
249   
250   
251   /*
252     Class       : Area_i
253     Description : Functor for calculating area
254   */
255   class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area,
256                 public virtual NumericalFunctor_i
257   {
258   public:
259     Area_i();
260     FunctorType                     GetFunctorType();
261   };
262   
263   
264   /*
265     Class       : Volume3D_i
266     Description : Functor for calculating volume of 3D element
267   */
268   class SMESH_I_EXPORT Volume3D_i: public virtual POA_SMESH::Volume3D,
269                     public virtual NumericalFunctor_i
270   {
271   public:
272     Volume3D_i();
273     FunctorType                     GetFunctorType();
274   };
275   
276   
277   /*
278     Class       : MaxElementLength2D_i
279     Description : Functor for calculating maximum length of 2D element
280   */
281   class SMESH_I_EXPORT MaxElementLength2D_i: public virtual POA_SMESH::MaxElementLength2D,
282                                              public virtual NumericalFunctor_i
283   {
284   public:
285     MaxElementLength2D_i();
286     FunctorType                     GetFunctorType();
287   };
288   
289   
290   /*
291     Class       : MaxElementLength3D_i
292     Description : Functor for calculating maximum length of 3D element
293   */
294   class SMESH_I_EXPORT MaxElementLength3D_i: public virtual POA_SMESH::MaxElementLength3D,
295                                              public virtual NumericalFunctor_i
296   {
297   public:
298     MaxElementLength3D_i();
299     FunctorType                     GetFunctorType();
300   };
301   
302   
303   /*
304     Class       : Length_i
305     Description : Functor for calculating length of edge
306   */
307   class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length,
308                   public virtual NumericalFunctor_i
309   {
310   public:
311     Length_i();
312     FunctorType                     GetFunctorType();
313   };
314   
315   /*
316     Class       : Length2D_i
317     Description : Functor for calculating length of edge
318   */
319   class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D,
320                     public virtual NumericalFunctor_i
321   {
322   public:
323     Length2D_i();
324     SMESH::Length2D::Values*        GetValues();
325     FunctorType                     GetFunctorType();
326     
327   protected:
328     Controls::Length2DPtr          myLength2DPtr;
329   };
330   
331   
332   /*
333     Class       : MultiConnection_i
334     Description : Functor for calculating number of faces conneted to the edge
335   */
336   class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection,
337                            public virtual NumericalFunctor_i
338   {
339   public:
340     MultiConnection_i();
341     FunctorType                     GetFunctorType();
342   };
343   
344   /*
345     Class       : MultiConnection2D_i
346     Description : Functor for calculating number of faces conneted to the edge
347   */
348   class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D,
349                              public virtual NumericalFunctor_i
350   {
351   public:
352     MultiConnection2D_i();
353     SMESH::MultiConnection2D::Values*  GetValues();
354     FunctorType                        GetFunctorType();
355     
356   protected:
357     Controls::MultiConnection2DPtr     myMulticonnection2DPtr;
358   };
359   
360   
361   /*
362     PREDICATES
363   */
364   /*
365     Class       : Predicate_i
366     Description : Base class for all predicates
367   */
368   class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate,
369                      public virtual Functor_i
370   {
371   public:
372     CORBA::Boolean                  IsSatisfy( CORBA::Long theElementId );
373     Controls::PredicatePtr          GetPredicate();
374     
375   protected:
376     Controls::PredicatePtr          myPredicatePtr;
377   };
378   
379   
380   /*
381     Class       : BadOrientedVolume_i
382     Description : Verify whether a mesh volume is incorrectly oriented from
383     the point of view of MED convention
384   */
385   class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume,
386                              public virtual Predicate_i
387   {
388   public:
389     BadOrientedVolume_i();
390     FunctorType                     GetFunctorType();
391   };
392   
393   /*
394     Class       : BareBorderVolume_i
395     Description : Verify whether a mesh volume has a free facet without a face on it
396   */
397   class SMESH_I_EXPORT BareBorderVolume_i: public virtual POA_SMESH::BareBorderVolume,
398                                            public virtual Predicate_i
399   {
400   public:
401     BareBorderVolume_i();
402     FunctorType                     GetFunctorType();
403   };
404   
405   /*
406     Class       : BareBorderFace_i
407     Description : Verify whether a mesh face has a free border without an edge on it
408   */
409   class SMESH_I_EXPORT BareBorderFace_i: public virtual POA_SMESH::BareBorderFace,
410                                            public virtual Predicate_i
411   {
412   public:
413     BareBorderFace_i();
414     FunctorType                     GetFunctorType();
415   };
416   
417   /*
418     Class       : OverConstrainedVolume_i
419     Description : Verify whether a mesh volume has only one facet shared with other volumes
420   */
421   class SMESH_I_EXPORT OverConstrainedVolume_i: public virtual POA_SMESH::OverConstrainedVolume,
422                                            public virtual Predicate_i
423   {
424   public:
425     OverConstrainedVolume_i();
426     FunctorType                     GetFunctorType();
427   };
428   
429   /*
430     Class       : OverConstrainedFace_i
431     Description : Verify whether a mesh face has only one border shared with other faces
432   */
433   class SMESH_I_EXPORT OverConstrainedFace_i: public virtual POA_SMESH::OverConstrainedFace,
434                                            public virtual Predicate_i
435   {
436   public:
437     OverConstrainedFace_i();
438     FunctorType                     GetFunctorType();
439   };
440   
441   /*
442     Class       : BelongToGeom_i
443     Description : Predicate for selection on geometrical support
444   */
445   class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom,
446                         public virtual Predicate_i
447   {
448   public:
449     BelongToGeom_i();
450     virtual                         ~BelongToGeom_i();
451     
452     void                            SetGeom( GEOM::GEOM_Object_ptr theGeom );
453     void                            SetElementType( ElementType theType );
454     FunctorType                     GetFunctorType();
455     
456     void                            SetGeom( const TopoDS_Shape& theShape );
457     
458     void                            SetShapeName( const char* theName );
459     void                            SetShape( const char* theID, const char* theName );
460     char*                           GetShapeName();
461     char*                           GetShapeID();
462
463     void                            SetTolerance( CORBA::Double );
464     CORBA::Double                   GetTolerance();
465     
466   protected:
467     Controls::BelongToGeomPtr       myBelongToGeomPtr;
468     char*                           myShapeName;
469     char*                           myShapeID;
470   };
471   
472   /*
473     Class       : BelongToSurface_i
474     Description : Verify whether mesh element lie in pointed Geom planar object
475   */
476   class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface,
477                            public virtual Predicate_i
478   {
479   public:
480     BelongToSurface_i( const Handle(Standard_Type)& );
481     virtual                         ~BelongToSurface_i();
482     
483     void                            SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
484     
485     void                            SetShapeName( const char* theName, ElementType theType );
486     void                            SetShape( const char* theID, const char* theName, ElementType theType );
487     char*                           GetShapeName();
488     char*                           GetShapeID();
489
490     void                            SetTolerance( CORBA::Double );
491     CORBA::Double                   GetTolerance();
492     
493     void                            SetUseBoundaries( CORBA::Boolean theUseBndRestrictions );
494     CORBA::Boolean                  GetUseBoundaries();
495
496   protected:
497     Controls::ElementsOnSurfacePtr  myElementsOnSurfacePtr;
498     char*                           myShapeName;
499     char*                           myShapeID;
500     Handle(Standard_Type)           mySurfaceType;
501   };
502   
503   /*
504     Class       : BelongToPlane_i
505     Description : Verify whether mesh element lie in pointed Geom planar object
506   */
507   class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane,
508                          public virtual BelongToSurface_i
509   {
510   public:
511     BelongToPlane_i();
512     void                            SetPlane( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
513     FunctorType                     GetFunctorType();
514   };
515   
516   /*
517     Class       : BelongToCylinder_i
518     Description : Verify whether mesh element lie in pointed Geom cylindrical object
519   */
520   class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder,
521                             public virtual BelongToSurface_i
522   {
523   public:
524     BelongToCylinder_i();
525     void                            SetCylinder( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
526     FunctorType                     GetFunctorType();
527   };
528
529   /*
530     Class       : BelongToGenSurface_i
531     Description : Verify whether mesh element lie on pointed Geom surfasic object
532   */
533   class BelongToGenSurface_i: public virtual POA_SMESH::BelongToGenSurface,
534                               public virtual BelongToSurface_i
535   {
536   public:
537     BelongToGenSurface_i();
538     void                            SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
539     FunctorType                     GetFunctorType();
540   };
541   
542   /*
543     Class       : LyingOnGeom_i
544     Description : Predicate for selection on geometrical support(lying or partially lying)
545   */
546   class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom,
547                        public virtual Predicate_i
548   {
549   public:
550     LyingOnGeom_i();
551     virtual                         ~LyingOnGeom_i();
552     
553     void                            SetGeom( GEOM::GEOM_Object_ptr theGeom );
554     void                            SetElementType( ElementType theType );
555     FunctorType                     GetFunctorType();
556     
557     void                            SetGeom( const TopoDS_Shape& theShape );
558     
559     void                            SetShapeName( const char* theName );
560     void                            SetShape( const char* theID, const char* theName );
561     char*                           GetShapeName();
562     char*                           GetShapeID();
563
564     void                            SetTolerance( CORBA::Double );
565     CORBA::Double                   GetTolerance();
566     
567   protected:
568     Controls::LyingOnGeomPtr        myLyingOnGeomPtr;
569     char*                           myShapeName;
570     char*                           myShapeID;
571   };
572   
573   /*
574     Class       : FreeBorders_i
575     Description : Predicate for free borders
576   */
577   class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders,
578                        public virtual Predicate_i
579   {
580   public:
581     FreeBorders_i();
582     FunctorType                     GetFunctorType();
583   };
584   
585   
586   /*
587     Class       : FreeEdges_i
588     Description : Predicate for free edges
589   */
590   class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges,
591                      public virtual Predicate_i
592   {
593   public:
594     FreeEdges_i();
595     SMESH::FreeEdges::Borders*      GetBorders();
596     FunctorType                     GetFunctorType();
597     
598   protected:
599     Controls::FreeEdgesPtr          myFreeEdgesPtr;
600   };
601   
602
603   /*
604     Class       : FreeFaces_i
605     Description : Predicate for free faces
606   */
607   class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces,
608                        public virtual Predicate_i
609   {
610   public:
611     FreeFaces_i();
612     FunctorType                     GetFunctorType();
613   };
614   
615
616   /*
617     Class       : FreeNodes_i
618     Description : Predicate for free nodes
619   */
620   class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes,
621                        public virtual Predicate_i
622   {
623   public:
624     FreeNodes_i();
625     FunctorType                     GetFunctorType();
626   };
627   
628   
629   /*
630     Class       : RangeOfIds_i
631     Description : Predicate for Range of Ids
632   */
633   class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds,
634                       public virtual Predicate_i
635   {
636   public:
637     RangeOfIds_i();
638     void                            SetRange( const SMESH::long_array& theIds );
639     CORBA::Boolean                  SetRangeStr( const char* theRange );
640     char*                           GetRangeStr();
641     
642     void                            SetElementType( ElementType theType );
643     FunctorType                     GetFunctorType();
644     
645   protected:
646     Controls::RangeOfIdsPtr         myRangeOfIdsPtr;
647   };
648
649   /*
650     Class       : LinearOrQuadratic_i
651     Description : Verify whether a mesh element is linear
652   */
653   class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic,
654                              public virtual Predicate_i
655   {
656   public:
657     LinearOrQuadratic_i();
658     FunctorType                    GetFunctorType();
659     void                           SetElementType( ElementType theType );
660
661   private:
662    Controls::LinearOrQuadraticPtr  myLinearOrQuadraticPtr;
663   };
664   
665   /*
666     Class       : GroupColor_i
667     Description : Functor for check color of group to whic mesh element belongs to
668   */
669   class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor,
670                   public virtual Predicate_i
671   {
672   public:
673     GroupColor_i();
674     FunctorType             GetFunctorType();
675
676     void                    SetElementType( ElementType theType );
677     void                    SetColorStr( const char* theColor );
678     char*                   GetColorStr();
679
680   private:
681     Controls::GroupColorPtr myGroupColorPtr;
682   };
683   
684   /*
685     Class       : ElemGeomType_i
686     Description : Functor for check element geometry type
687   */
688   class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType,
689                   public virtual Predicate_i
690   {
691   public:
692     ElemGeomType_i();
693     FunctorType             GetFunctorType();
694
695     void                    SetElementType ( ElementType  theType );
696     void                    SetGeometryType( GeometryType theType );
697     GeometryType            GetGeometryType() const;
698
699   private:
700     Controls::ElemGeomTypePtr myElemGeomTypePtr;
701   };
702   
703   /*
704     Class       : CoplanarFaces_i
705     Description : Returns true if a mesh face is a coplanar neighbour to a given one
706   */
707   class SMESH_I_EXPORT CoplanarFaces_i: public virtual POA_SMESH::CoplanarFaces,
708                   public virtual Predicate_i
709   {
710   public:
711     CoplanarFaces_i();
712     FunctorType             GetFunctorType();
713
714     void                    SetFace ( CORBA::Long theFaceID );
715     void                    SetTolerance( CORBA::Double theToler );
716     char*                   GetFaceAsString () const;
717     CORBA::Long             GetFace () const;
718     CORBA::Double           GetTolerance () const;
719   private:
720     Controls::CoplanarFacesPtr myCoplanarFacesPtr;
721   };
722   
723   /*
724     Class       : Comparator_i
725     Description : Base class for comparators
726   */
727   class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator,
728                       public virtual Predicate_i
729   {
730   public:
731     virtual                         ~Comparator_i();
732     
733     virtual void                    SetMargin( CORBA::Double );
734     virtual void                    SetNumFunctor( NumericalFunctor_ptr );
735     
736     Controls::ComparatorPtr         GetComparator();
737     NumericalFunctor_i*             GetNumFunctor_i();
738     CORBA::Double                   GetMargin();
739     
740   protected:
741     Comparator_i();
742   protected:                                  
743     Controls::ComparatorPtr         myComparatorPtr;
744     NumericalFunctor_i*             myNumericalFunctor;
745   };
746   
747   
748   /*
749     Class       : LessThan_i
750     Description : Comparator "<"
751   */
752   class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan,
753                     public virtual Comparator_i
754   {
755   public:
756     LessThan_i();
757     FunctorType                     GetFunctorType();
758   };
759   
760   
761   /*
762     Class       : MoreThan_i
763     Description : Comparator ">"
764   */
765   class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan,
766                     public virtual Comparator_i
767   {
768   public:
769     MoreThan_i();
770     FunctorType                     GetFunctorType();
771   };
772   
773   
774   /*
775     Class       : EqualTo_i
776     Description : Comparator "="
777   */
778   class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo,
779                    public virtual Comparator_i
780   {
781   public:
782     EqualTo_i();
783     virtual void                    SetTolerance( CORBA::Double );
784     CORBA::Double                   GetTolerance();
785     FunctorType                     GetFunctorType();
786     
787   protected:
788     Controls::EqualToPtr            myEqualToPtr;
789   };
790   
791   
792   /*
793     Class       : LogicalNOT_i
794     Description : Logical NOT predicate
795   */
796   class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT,
797                       public virtual Predicate_i
798   {
799   public:
800     LogicalNOT_i();
801   virtual                         ~LogicalNOT_i();
802     
803     virtual void                    SetPredicate( Predicate_ptr );
804     Predicate_i*                    GetPredicate_i();
805     FunctorType                     GetFunctorType();
806     
807   protected:
808     Controls::LogicalNOTPtr         myLogicalNOTPtr;
809     Predicate_i*                    myPredicate;
810   };
811   
812   
813   /*
814     Class       : LogicalBinary_i
815     Description : Base class for binary logical predicate
816   */
817   class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary,
818                          public virtual Predicate_i
819   {
820   public:
821     virtual                         ~LogicalBinary_i();
822     virtual void                    SetMesh( SMESH_Mesh_ptr theMesh );
823     virtual void                    SetPredicate1( Predicate_ptr );
824     virtual void                    SetPredicate2( Predicate_ptr );
825     
826     Controls::LogicalBinaryPtr      GetLogicalBinary();
827     Predicate_i*                    GetPredicate1_i();
828     Predicate_i*                    GetPredicate2_i();
829     
830   protected:
831     LogicalBinary_i();
832   protected:  
833     Controls::LogicalBinaryPtr      myLogicalBinaryPtr;
834     Predicate_i*                    myPredicate1;
835     Predicate_i*                    myPredicate2;
836   };
837   
838   
839   /*
840     Class       : LogicalAND_i
841     Description : Logical AND
842   */
843   class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND,
844                       public virtual LogicalBinary_i
845   {
846   public:
847     LogicalAND_i();
848     FunctorType                     GetFunctorType();
849   };
850   
851   
852   /*
853     Class       : LogicalOR_i
854     Description : Logical OR
855   */
856   class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR,
857                      public virtual LogicalBinary_i
858   {
859   public:
860     LogicalOR_i();
861     FunctorType                     GetFunctorType();
862   };
863   
864   
865   /*
866     FILTER
867   */
868   class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter,
869                   public virtual SALOME::GenericObj_i
870   {
871   public:
872     Filter_i();
873     ~Filter_i();
874     
875     virtual
876     void
877     SetPredicate( Predicate_ptr );
878
879     virtual
880     void
881     SetMesh( SMESH_Mesh_ptr );
882
883     static
884     void
885     GetElementsId( Predicate_i*,
886                    const SMDS_Mesh*,
887                    Controls::Filter::TIdSequence& );
888     static
889     void           
890     GetElementsId( Predicate_i*,
891                    SMESH_Mesh_ptr,
892                    Controls::Filter::TIdSequence& );
893     
894     virtual
895     long_array*      
896     GetElementsId( SMESH_Mesh_ptr );
897
898     virtual
899     ElementType      
900     GetElementType();
901     
902     virtual
903     CORBA::Boolean   
904     GetCriteria( SMESH::Filter::Criteria_out theCriteria );
905
906     virtual
907     CORBA::Boolean
908     SetCriteria( const SMESH::Filter::Criteria& theCriteria );
909     
910     virtual
911     Predicate_ptr
912     GetPredicate();
913
914     Predicate_i*     GetPredicate_i();
915
916     // =========================
917     // SMESH_IDSource interface
918     // =========================
919     virtual SMESH::long_array*           GetIDs();
920     virtual SMESH::long_array*           GetMeshInfo();
921     virtual SMESH::array_of_ElementType* GetTypes();
922     virtual SMESH::SMESH_Mesh_ptr        GetMesh();
923
924   private:
925     Controls::Filter myFilter;
926     Predicate_i*     myPredicate;
927     SMESH_Mesh_var   myMesh;
928   };
929   
930   
931   /*
932     FILTER LIBRARY
933   */
934   class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary,
935                          public virtual SALOME::GenericObj_i
936   {
937   public:
938     FilterLibrary_i( const char* theFileName );
939     FilterLibrary_i();
940     ~FilterLibrary_i();
941     
942     Filter_ptr              Copy( const char* theFilterName );
943     
944     CORBA::Boolean          Add     ( const char* theFilterName, Filter_ptr theFilter );
945     CORBA::Boolean          AddEmpty( const char* theFilterName, ElementType theType );
946     CORBA::Boolean          Delete  ( const char* theFilterName );
947     CORBA::Boolean          Replace ( const char* theFilterName, 
948                                       const char* theNewName, 
949                                       Filter_ptr  theFilter );
950     
951     CORBA::Boolean          Save();
952     CORBA::Boolean          SaveAs( const char* aFileName );
953     
954     CORBA::Boolean          IsPresent( const char* aFilterName );
955     CORBA::Long             NbFilters( ElementType );
956     string_array*           GetNames( ElementType );
957     string_array*           GetAllNames();
958     void                    SetFileName( const char* theFileName );
959     char*                   GetFileName();
960     
961   private:
962     char*                   myFileName;
963     LDOM_Document           myDoc;
964     FilterManager_var       myFilterMgr;
965   };
966   
967   
968   /*
969     FILTER MANAGER
970   */
971   
972   class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager,
973                          public virtual SALOME::GenericObj_i
974   {
975   public:
976     FilterManager_i();
977     ~FilterManager_i();
978
979     MinimumAngle_ptr          CreateMinimumAngle();
980     AspectRatio_ptr           CreateAspectRatio();
981     AspectRatio3D_ptr         CreateAspectRatio3D();
982     Warping_ptr               CreateWarping();
983     Taper_ptr                 CreateTaper();
984     Skew_ptr                  CreateSkew();
985     Area_ptr                  CreateArea();
986     Volume3D_ptr              CreateVolume3D();
987     MaxElementLength2D_ptr    CreateMaxElementLength2D();
988     MaxElementLength3D_ptr    CreateMaxElementLength3D();
989     Length_ptr                CreateLength();
990     Length2D_ptr              CreateLength2D();
991     MultiConnection_ptr       CreateMultiConnection();
992     MultiConnection2D_ptr     CreateMultiConnection2D();
993     
994     BelongToGeom_ptr          CreateBelongToGeom();
995     BelongToPlane_ptr         CreateBelongToPlane();
996     BelongToCylinder_ptr      CreateBelongToCylinder();
997     BelongToGenSurface_ptr    CreateBelongToGenSurface();
998     
999     LyingOnGeom_ptr           CreateLyingOnGeom();
1000     
1001     FreeBorders_ptr           CreateFreeBorders();
1002     FreeEdges_ptr             CreateFreeEdges();
1003     FreeNodes_ptr             CreateFreeNodes();
1004     FreeFaces_ptr             CreateFreeFaces();
1005     
1006     RangeOfIds_ptr            CreateRangeOfIds();
1007     BadOrientedVolume_ptr     CreateBadOrientedVolume();
1008     BareBorderFace_ptr        CreateBareBorderFace();
1009     BareBorderVolume_ptr      CreateBareBorderVolume();
1010     OverConstrainedFace_ptr   CreateOverConstrainedFace();
1011     OverConstrainedVolume_ptr CreateOverConstrainedVolume();
1012     LinearOrQuadratic_ptr     CreateLinearOrQuadratic();
1013     GroupColor_ptr            CreateGroupColor();
1014     ElemGeomType_ptr          CreateElemGeomType();
1015     CoplanarFaces_ptr         CreateCoplanarFaces();
1016
1017     LessThan_ptr              CreateLessThan();
1018     MoreThan_ptr              CreateMoreThan();
1019     EqualTo_ptr               CreateEqualTo();
1020     
1021     LogicalNOT_ptr            CreateLogicalNOT();
1022     LogicalAND_ptr            CreateLogicalAND();
1023     LogicalOR_ptr             CreateLogicalOR();
1024     
1025     Filter_ptr                CreateFilter();
1026     
1027     FilterLibrary_ptr         LoadLibrary( const char* aFileName );
1028     FilterLibrary_ptr         CreateLibrary();
1029     CORBA::Boolean            DeleteLibrary( const char* aFileName );
1030   };
1031   
1032   
1033   Predicate_i* 
1034   GetPredicate( SMESH::Predicate_ptr thePredicate );
1035 }
1036
1037
1038 #endif