X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_CompositeFeature.h;h=bc31a21eb80cc57f014b44c3e9478cf2843aaf4d;hb=1a59f21be05badd17bcac9ce82b2857b961f1d2e;hp=f243cb3338bec21e2e6728846c097efc249f054b;hpb=9e117aef205c7ee70ff7e6342c5b863726e58764;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_CompositeFeature.h b/src/ModelAPI/ModelAPI_CompositeFeature.h index f243cb333..bc31a21eb 100644 --- a/src/ModelAPI/ModelAPI_CompositeFeature.h +++ b/src/ModelAPI/ModelAPI_CompositeFeature.h @@ -25,20 +25,24 @@ public: virtual std::shared_ptr addFeature(std::string theID) = 0; /// Returns the number of sub-elements - virtual int numberOfSubs() const = 0; + virtual int numberOfSubs(bool forTree = false) const = 0; /// Returns the sub-feature by zero-base index - virtual std::shared_ptr subFeature(const int theIndex) const = 0; + virtual std::shared_ptr subFeature(const int theIndex, bool forTree = false) = 0; /// Returns the sub-feature unique identifier in this composite feature by zero-base index virtual int subFeatureId(const int theIndex) const = 0; - /// Returns true if feature or reuslt belong to this composite feature as subs + /// Returns true if feature or result belong to this composite feature as subs virtual bool isSub(ObjectPtr theObject) const = 0; /// This method to inform that sub-feature is removed and must be removed from the internal data /// structures of the owner (the remove from the document will be done outside just after) virtual void removeFeature(std::shared_ptr theFeature) = 0; + + /// Exchanges IDs of two given features: needed for more correct naming in some cases (issue 769) + MODELAPI_EXPORT virtual void exchangeIDs(std::shared_ptr theFeature1, + std::shared_ptr theFeature2); }; //! Pointer on the composite feature object