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