Salome HOME
Issue #1701 Preselecting before calling constraints does not put objects in the input...
[modules/shaper.git] / src / ModuleBase / ModuleBase_ResultPrs.h
index 240d64eafd18e2c84a2789d880bdaeafd0e64c3f..6d7dc8b1c52d4d4eedf1f3745f1cdcf9c676714f 100644 (file)
@@ -15,6 +15,8 @@
 #include <Standard_DefineHandle.hxx>
 #include <StdSelect_BRepOwner.hxx>
 
+#include <QMap>
+
 DEFINE_STANDARD_HANDLE(ModuleBase_BRepOwner, StdSelect_BRepOwner)
 
 /**
@@ -56,6 +58,13 @@ DEFINE_STANDARD_HANDLE(ModuleBase_ResultPrs, ViewerData_AISShape)
 */
 class ModuleBase_ResultPrs: public ViewerData_AISShape
 {
+public:
+  enum SelectionModes {
+    Sel_Result = TopAbs_SHAPE + 1 /// it should be combined with Compsolid results, so it is not
+                                  /// the Shape type. It is not defined in XML as compound type
+                                  /// because this type is processed as shape with compounds inside.
+  };
+
 public:
   /// Constructor
   /// \param theResult a result object
@@ -73,6 +82,15 @@ public:
   /// Returns result object
   Standard_EXPORT ResultPtr getResult() const { return myResult; }
 
+  /// Returns selection priorities that will be added to created selection owner
+  /// \return integer value
+  Standard_EXPORT int getAdditionalSelectionPriority() const { return myAdditionalSelectionPriority; }
+
+  /// Appends a special priority for the mode of selection
+  /// \param theSelectionMode a mode of selection, used in ComputeSelection
+  /// \param thePriority a new priority value
+  Standard_EXPORT void setAdditionalSelectionPriority(const int thePriority);
+
   DEFINE_STANDARD_RTTI(ModuleBase_ResultPrs)
 protected:
   /// Redefinition of virtual function
@@ -95,6 +113,8 @@ private:
 
   /// Original shape of the result object
   TopoDS_Shape myOriginalShape;
+  /// selection priority that will be added to the standard selection priority of the selection entity
+  int myAdditionalSelectionPriority;
 };