+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: Model_Data.hxx
// Created: 21 Mar 2014
// Author: Mikhail PONIKAROV
#include <Model_AttributeString.h>
#include <Model_AttributeSelection.h>
#include <Model_AttributeSelectionList.h>
+#include <Model_AttributeIntArray.h>
#include <Model_Events.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Result.h>
// TDataStd_Name - name of the object
// TDataStd_Integer - state of the object execution
-Model_Data::Model_Data()
+Model_Data::Model_Data() : mySendAttributeUpdated(true)
{
}
anAttr = new Model_AttributeRefAttr(anAttrLab);
} else if (theAttrType == ModelAPI_AttributeRefList::type()) {
anAttr = new Model_AttributeRefList(anAttrLab);
+ } else if (theAttrType == ModelAPI_AttributeIntArray::type()) {
+ anAttr = new Model_AttributeIntArray(anAttrLab);
}
// create also GeomData attributes here because only here the OCAF strucure is known
else if (theAttrType == GeomData_Point::type()) {
GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeSelectionList, selectionList);
GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefAttr, refattr);
GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefList, reflist);
+GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeIntArray, intArray);
std::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
{
if (theAttr->isArgument()) {
static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
- if (myObject) {
+ if (mySendAttributeUpdated && myObject) {
myObject->attributeChanged(theAttr->id());
}
}
}
+void Model_Data::blockSendAttributeUpdated(const bool theBlock)
+{
+ mySendAttributeUpdated = !theBlock;
+}
+
void Model_Data::erase()
{
if (!myLab.IsNull())