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