X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_AttributeSelection.h;h=61b1979a0b2c1643f126059a716fe8b556948649;hb=4587841469935cb1a28754558dece0ee77aa20a6;hp=b2986b3bb3b6fa963fd15c0977cbfb8e96b1ebeb;hpb=28b7c94db082ec6dd8a6fd4c6770df0fa5f2b6a3;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.h b/src/ModelAPI/ModelAPI_AttributeSelection.h index b2986b3bb..61b1979a0 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelection.h +++ b/src/ModelAPI/ModelAPI_AttributeSelection.h @@ -19,8 +19,13 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute { public: /// Defines the result and its selected sub-shape + /// \param theContext object where the sub-shape was selected + /// \param theSubShape selected sub-shape (if null, the whole context is selected) + /// \param theTemporarily if it is true, do not store and name the added in the data framework + /// (used to remove immideately, without the following updates) virtual void setValue( - const ResultPtr& theContext, const std::shared_ptr& theSubShape) = 0; + const ResultPtr& theContext, const std::shared_ptr& theSubShape, + const bool theTemporarily = false) = 0; /// Returns the selected subshape virtual std::shared_ptr value() = 0; @@ -33,7 +38,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute virtual bool update() = 0; /// Returns the type of this class of attributes - static std::string type() + static std::string typeId() { return "Selection"; } @@ -42,7 +47,8 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute MODELAPI_EXPORT virtual std::string attributeType(); /// Returns a textual string of the selection - virtual std::string namingName() = 0; + /// \param theDefaultValue a value, which is used if the naming name can not be obtained + virtual std::string namingName(const std::string& theDefaultValue = "") = 0; /// Returns an id of the selection virtual int Id() = 0; @@ -51,6 +57,9 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute /// Selects sub-shape by the textual Name virtual void selectSubShape(const std::string& theType, const std::string& theSubShapeName) = 0; + /// Returns true if recompute of selection become impossible + virtual bool isInvalid() = 0; + /// To virtually destroy the fields of successors MODELAPI_EXPORT virtual ~ModelAPI_AttributeSelection();