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