X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Selection.h;h=8612a81256884465f831bd860368418fe0b8c861;hb=9d8267a424a809d0f96593b13f8472666553ce2e;hp=1aa1788e862cf813b14edfe0ac79324979939922;hpb=6f213b9cc0ff018596fee19029d88ff8f8346025;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Selection.h b/src/ModelHighAPI/ModelHighAPI_Selection.h index 1aa1788e8..8612a8125 100644 --- a/src/ModelHighAPI/ModelHighAPI_Selection.h +++ b/src/ModelHighAPI/ModelHighAPI_Selection.h @@ -28,6 +28,7 @@ #include #include //-------------------------------------------------------------------------------------- +class GeomAPI_Pnt; class GeomAPI_Shape; class ModelAPI_AttributeSelection; class ModelAPI_AttributeSelectionList; @@ -36,6 +37,8 @@ class ModelAPI_Result; typedef std::pair, std::shared_ptr > ResultSubShapePair; typedef std::pair TypeSubShapeNamePair; +typedef std::pair > TypeInnerPointPair; +typedef std::pair > TypeWeakNamingPair; //-------------------------------------------------------------------------------------- /**\class ModelHighAPI_Selection * \ingroup CPPHighAPI @@ -47,7 +50,9 @@ public: enum VariantType { VT_Empty, VT_ResultSubShapePair, - VT_TypeSubShapeNamePair + VT_TypeSubShapeNamePair, + VT_TypeInnerPointPair, + VT_WeakNamingPair }; public: @@ -64,6 +69,18 @@ public: MODELHIGHAPI_EXPORT ModelHighAPI_Selection(const std::string& theType, const std::string& theSubShapeName); + + /// Constructor for sub-shape by inner point coordinates + MODELHIGHAPI_EXPORT + ModelHighAPI_Selection(const std::string& theType, + const std::shared_ptr& theSubShapeInnerPoint); + + + /// Constructor for sub-shape by weak naming identifier + MODELHIGHAPI_EXPORT + ModelHighAPI_Selection(const std::string& theType, + const std::string& theContextName, const int theIndex); + /// Destructor MODELHIGHAPI_EXPORT virtual ~ModelHighAPI_Selection(); @@ -88,6 +105,10 @@ public: MODELHIGHAPI_EXPORT virtual TypeSubShapeNamePair typeSubShapeNamePair() const; + /// \return pair of sub-shape type and inner point to identify sub-shape. + MODELHIGHAPI_EXPORT + virtual TypeInnerPointPair typeInnerPointPair() const; + /// \return shape type. MODELHIGHAPI_EXPORT virtual std::string shapeType() const; @@ -96,6 +117,10 @@ public: MODELHIGHAPI_EXPORT void setName(const std::string& theName); + /// Shortcut for result()->data()->name() + MODELHIGHAPI_EXPORT + std::string name() const; + /// Change result's color MODELHIGHAPI_EXPORT void setColor(int theRed, int theGreen, int theBlue); @@ -120,6 +145,8 @@ private: VariantType myVariantType; ResultSubShapePair myResultSubShapePair; TypeSubShapeNamePair myTypeSubShapeNamePair; + TypeInnerPointPair myTypeInnerPointPair; + TypeWeakNamingPair myWeakNamingPair; }; //--------------------------------------------------------------------------------------