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