X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Data.h;h=e505d375165731acd0fbd6b7ae75afd03132d667;hb=690012a1c13c51062fc01656ee18dd8edb947e02;hp=da40e7d4a8de9e5247bd08e92167765da748209c;hpb=204a8ad6efa9e33e01da086109418fdb9253b0d7;p=modules%2Fshaper.git diff --git a/src/Model/Model_Data.h b/src/Model/Model_Data.h index da40e7d4a..e505d3751 100644 --- a/src/Model/Model_Data.h +++ b/src/Model/Model_Data.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,8 @@ class Model_Data : public ModelAPI_Data std::set myRefsToMe; /// flag that may block the "attribute updated" sending bool mySendAttributeUpdated; + /// if some attribute was changed, but mySendAttributeUpdated was false, this stores this + std::list myWasChangedButBlocked; /// Returns label of this feature TDF_Label label() @@ -68,6 +71,7 @@ class Model_Data : public ModelAPI_Data friend class Model_AttributeReference; friend class Model_AttributeRefAttr; friend class Model_AttributeRefList; + friend class Model_AttributeRefAttrList; friend class Model_AttributeSelection; friend class Model_AttributeSelectionList; @@ -100,6 +104,10 @@ class Model_Data : public ModelAPI_Data /// Returns the attribute that contains list of references to features MODEL_EXPORT virtual std::shared_ptr reflist(const std::string& theID); + /// Returns the attribute that contains list of references to features + /// or reference to an attribute of a feature + MODEL_EXPORT virtual std::shared_ptr + refattrlist(const std::string& theID); /// Returns the attribute that contains boolean value MODEL_EXPORT virtual std::shared_ptr boolean(const std::string& theID); @@ -147,7 +155,11 @@ class Model_Data : public ModelAPI_Data /// makes attribute initialized MODEL_EXPORT virtual void sendAttributeUpdated(ModelAPI_Attribute* theAttr); /// Blocks sending "attribute updated" if theBlock is true - MODEL_EXPORT virtual void blockSendAttributeUpdated(const bool theBlock); + /// \param theBlock allows switching on/off the blocking state + /// \param theSendMessage if false, it does not send the update message even if something is changed + /// (normally is it used in attributeChanged because this message will be sent anyway) + MODEL_EXPORT virtual void blockSendAttributeUpdated( + const bool theBlock, const bool theSendMessage = true); /// Puts feature to the document data sub-structure MODEL_EXPORT void setLabel(TDF_Label theLab);