Salome HOME
Updated copyright comment
[modules/shaper.git] / src / ModelAPI / ModelAPI_FiltersFactory.h
index bc24d0d3eee8f9841958c00fb695b431654be199..53f7970a56b314d38dec87bdea66991e8a7202bc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -22,6 +22,7 @@
 
 #include "ModelAPI_Feature.h"
 #include "ModelAPI_Filter.h"
+#include "ModelAPI_ResultBody.h"
 
 #include <GeomAPI_Shape.h>
 
@@ -33,6 +34,8 @@
 class ModelAPI_FiltersFactory
 {
 public:
+  virtual ~ModelAPI_FiltersFactory() {}
+
   /// Register an instance of a filter
   /// \param theID unique identifier of the filter, not necessary equal to the name of filter
   /// \param theFilter the filter's instance
@@ -41,8 +44,19 @@ public:
   /// Returns true if all filters of the Filters feature are ok for the Shape (taking into account
   /// the Reversed states).
   /// \param theFiltersFeature feature that contains all information about the filters
+  /// \param theResult parent result of the shape to check
   /// \param theShape the checked shape
-  virtual bool isValid(FeaturePtr theFiltersFeature, GeomShapePtr theShape) = 0;
+  virtual bool isValid(FeaturePtr theFiltersFeature,
+                       ResultPtr theResult,
+                       GeomShapePtr theShape) = 0;
+
+  /// Returns list of all shapes and subshapes in the study, satisfying
+  ///         criteria of all filters of \a theFilterFeature.
+  /// \param theFiltersFeature feature that contains all information about the filters
+  /// \param theShapeType the type of sub-shapes to find
+  virtual std::list< std::pair<ResultPtr, GeomShapePtr> > select
+    (const FiltersFeaturePtr& theFilterFeature,
+     const GeomAPI_Shape::ShapeType theShapeType) = 0;
 
   /// Returns the filters that support the given shape type
   virtual std::list<FilterPtr> filters(GeomAPI_Shape::ShapeType theType) = 0;
@@ -58,4 +72,4 @@ protected:
   ModelAPI_FiltersFactory() {}
 };
 
-#endif
\ No newline at end of file
+#endif