1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_Data.hxx
4 // Created: 21 Mar 2014
5 // Author: Mikhail PONIKAROV
7 #include <Model_Data.h>
8 #include <Model_AttributeDocRef.h>
9 #include <Model_AttributeInteger.h>
10 #include <Model_AttributeDouble.h>
11 #include <Model_AttributeReference.h>
12 #include <Model_AttributeRefAttr.h>
13 #include <Model_AttributeRefList.h>
14 #include <Model_AttributeBoolean.h>
15 #include <Model_AttributeString.h>
16 #include <Model_AttributeSelection.h>
17 #include <Model_AttributeSelectionList.h>
18 #include <Model_AttributeIntArray.h>
19 #include <Model_Events.h>
20 #include <Model_Expression.h>
21 #include <ModelAPI_Feature.h>
22 #include <ModelAPI_Result.h>
23 #include <ModelAPI_ResultParameter.h>
24 #include <ModelAPI_Validator.h>
25 #include <ModelAPI_Session.h>
26 #include <ModelAPI_ResultPart.h>
27 #include <ModelAPI_Tools.h>
29 #include <GeomDataAPI_Point.h>
30 #include <GeomDataAPI_Point2D.h>
32 #include <GeomData_Point.h>
33 #include <GeomData_Point2D.h>
34 #include <GeomData_Dir.h>
35 #include <Events_Loop.h>
36 #include <Events_Error.h>
38 #include <TDataStd_Name.hxx>
39 #include <TDataStd_AsciiString.hxx>
40 #include <TDataStd_IntegerArray.hxx>
41 #include <TDF_AttributeIterator.hxx>
42 #include <TDF_ChildIterator.hxx>
43 #include <TDF_RelocationTable.hxx>
47 #ifdef WNT // to avoid too long decorated name warning
48 #pragma warning( disable : 4503 )
52 // TDataStd_Name - name of the object
53 // TDataStd_IntegerArray - state of the object execution, transaction ID of update
54 // TDataStd_BooleanArray - array of flags of this data:
55 // 0 - is in history or not
56 static const int kFlagInHistory = 0;
57 // 1 - is displayed or not
58 static const int kFlagDisplayed = 1;
61 const static std::shared_ptr<ModelAPI_Data> kInvalid(new Model_Data());
63 Model_Data::Model_Data() : mySendAttributeUpdated(true)
67 void Model_Data::setLabel(TDF_Label theLab)
70 // set or get the default flags
71 if (!myLab.FindAttribute(TDataStd_BooleanArray::GetID(), myFlags)) {
72 // set default values if not found
73 myFlags = TDataStd_BooleanArray::Set(myLab, 0, 1);
74 myFlags->SetValue(kFlagInHistory, Standard_True); // is in history by default is true
75 myFlags->SetValue(kFlagDisplayed, Standard_True); // is displayed by default is true
79 std::string Model_Data::name()
81 Handle(TDataStd_Name) aName;
82 if (myLab.FindAttribute(TDataStd_Name::GetID(), aName))
83 return std::string(TCollection_AsciiString(aName->Get()).ToCString());
84 return ""; // not defined
87 void Model_Data::setName(const std::string& theName)
89 bool isModified = false;
90 std::string anOldName = name();
91 Handle(TDataStd_Name) aName;
92 if (!myLab.FindAttribute(TDataStd_Name::GetID(), aName)) {
93 TDataStd_Name::Set(myLab, theName.c_str());
96 isModified = !aName->Get().IsEqual(theName.c_str());
98 aName->Set(theName.c_str());
100 if (mySendAttributeUpdated && isModified)
101 ModelAPI_ObjectRenamedMessage::send(myObject, anOldName, theName, this);
104 AttributePtr Model_Data::addAttribute(const std::string& theID, const std::string theAttrType)
106 AttributePtr aResult;
107 TDF_Label anAttrLab = myLab.FindChild(myAttrs.size() + 1);
108 ModelAPI_Attribute* anAttr = 0;
109 if (theAttrType == ModelAPI_AttributeDocRef::typeId()) {
110 anAttr = new Model_AttributeDocRef(anAttrLab);
111 } else if (theAttrType == Model_AttributeInteger::typeId()) {
112 anAttr = new Model_AttributeInteger(anAttrLab);
113 } else if (theAttrType == ModelAPI_AttributeDouble::typeId()) {
114 Model_AttributeDouble* anAttribute = new Model_AttributeDouble(anAttrLab);
115 TDF_Label anExpressionLab = anAttrLab.FindChild(1);
116 anAttribute->myExpression.reset(new Model_Expression(anExpressionLab));
117 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression->isInitialized();
118 anAttr = anAttribute;
119 } else if (theAttrType == Model_AttributeBoolean::typeId()) {
120 anAttr = new Model_AttributeBoolean(anAttrLab);
121 } else if (theAttrType == Model_AttributeString::typeId()) {
122 anAttr = new Model_AttributeString(anAttrLab);
123 } else if (theAttrType == ModelAPI_AttributeReference::typeId()) {
124 anAttr = new Model_AttributeReference(anAttrLab);
125 } else if (theAttrType == ModelAPI_AttributeSelection::typeId()) {
126 anAttr = new Model_AttributeSelection(anAttrLab);
127 } else if (theAttrType == ModelAPI_AttributeSelectionList::typeId()) {
128 anAttr = new Model_AttributeSelectionList(anAttrLab);
129 } else if (theAttrType == ModelAPI_AttributeRefAttr::typeId()) {
130 anAttr = new Model_AttributeRefAttr(anAttrLab);
131 } else if (theAttrType == ModelAPI_AttributeRefList::typeId()) {
132 anAttr = new Model_AttributeRefList(anAttrLab);
133 } else if (theAttrType == ModelAPI_AttributeIntArray::typeId()) {
134 anAttr = new Model_AttributeIntArray(anAttrLab);
136 // create also GeomData attributes here because only here the OCAF structure is known
137 else if (theAttrType == GeomData_Point::typeId()) {
138 GeomData_Point* anAttribute = new GeomData_Point(anAttrLab);
139 for (int aComponent = 0; aComponent < GeomData_Point::NUM_COMPONENTS; ++aComponent) {
140 TDF_Label anExpressionLab = anAttrLab.FindChild(aComponent + 1);
141 anAttribute->myExpression[aComponent].reset(new Model_Expression(anExpressionLab));
142 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression[aComponent]->isInitialized();
144 anAttr = anAttribute;
145 } else if (theAttrType == GeomData_Dir::typeId()) {
146 anAttr = new GeomData_Dir(anAttrLab);
147 } else if (theAttrType == GeomData_Point2D::typeId()) {
148 GeomData_Point2D* anAttribute = new GeomData_Point2D(anAttrLab);
149 for (int aComponent = 0; aComponent < GeomData_Point2D::NUM_COMPONENTS; ++aComponent) {
150 TDF_Label anExpressionLab = anAttrLab.FindChild(aComponent + 1);
151 anAttribute->myExpression[aComponent].reset(new Model_Expression(anExpressionLab));
152 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression[aComponent]->isInitialized();
154 anAttr = anAttribute;
157 aResult = std::shared_ptr<ModelAPI_Attribute>(anAttr);
158 myAttrs[theID] = aResult;
159 anAttr->setObject(myObject);
160 anAttr->setID(theID);
162 Events_Error::send("Can not create unknown type of attribute " + theAttrType);
167 // macro for gthe generic returning of the attribute by the ID
168 #define GET_ATTRIBUTE_BY_ID(ATTR_TYPE, METHOD_NAME) \
169 std::shared_ptr<ATTR_TYPE> Model_Data::METHOD_NAME(const std::string& theID) { \
170 std::shared_ptr<ATTR_TYPE> aRes; \
171 std::map<std::string, AttributePtr >::iterator aFound = \
172 myAttrs.find(theID); \
173 if (aFound != myAttrs.end()) { \
174 aRes = std::dynamic_pointer_cast<ATTR_TYPE>(aFound->second); \
178 // implement nice getting methods for all ModelAPI attributes
179 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeDocRef, document);
180 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeDouble, real);
181 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeInteger, integer);
182 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeBoolean, boolean);
183 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeString, string);
184 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeReference, reference);
185 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeSelection, selection);
186 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeSelectionList, selectionList);
187 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefAttr, refattr);
188 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefList, reflist);
189 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeIntArray, intArray);
191 std::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
193 std::shared_ptr<ModelAPI_Attribute> aResult;
194 if (myAttrs.find(theID) == myAttrs.end()) // no such attribute
196 return myAttrs[theID];
199 const std::string& Model_Data::id(const std::shared_ptr<ModelAPI_Attribute>& theAttr)
201 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr =
203 for (; anAttr != myAttrs.end(); anAttr++) {
204 if (anAttr->second == theAttr)
205 return anAttr->first;
208 static std::string anEmpty;
212 bool Model_Data::isEqual(const std::shared_ptr<ModelAPI_Data>& theData)
214 std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theData);
216 return myLab.IsEqual(aData->myLab) == Standard_True ;
220 bool Model_Data::isValid()
222 return !myLab.IsNull() && myLab.HasAttribute();
225 std::list<std::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std::string& theType)
227 std::list<std::shared_ptr<ModelAPI_Attribute> > aResult;
228 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
230 for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
231 if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
232 aResult.push_back(anAttrsIter->second);
238 std::list<std::string> Model_Data::attributesIDs(const std::string& theType)
240 std::list<std::string> aResult;
241 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
243 for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
244 if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
245 aResult.push_back(anAttrsIter->first);
251 void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
253 theAttr->setInitialized();
254 if (theAttr->isArgument()) {
255 static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
256 ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
257 if (mySendAttributeUpdated && myObject) {
258 myObject->attributeChanged(theAttr->id());
263 void Model_Data::blockSendAttributeUpdated(const bool theBlock)
265 mySendAttributeUpdated = !theBlock;
268 void Model_Data::erase()
271 myLab.ForgetAllAttributes();
274 // indexes in the state array
276 STATE_INDEX_STATE = 1, // the state type itself
277 STATE_INDEX_TRANSACTION = 2, // transaction ID
280 /// Returns the label array, initialises it by default values if not exists
281 static Handle(TDataStd_IntegerArray) stateArray(TDF_Label& theLab)
283 Handle(TDataStd_IntegerArray) aStateArray;
284 if (!theLab.FindAttribute(TDataStd_IntegerArray::GetID(), aStateArray)) {
285 aStateArray = TDataStd_IntegerArray::Set(theLab, 1, 2);
286 aStateArray->SetValue(STATE_INDEX_STATE, ModelAPI_StateMustBeUpdated); // default state
287 aStateArray->SetValue(STATE_INDEX_TRANSACTION, 0); // default transaction ID (not existing)
292 void Model_Data::execState(const ModelAPI_ExecState theState)
294 if (theState != ModelAPI_StateNothing) {
295 stateArray(myLab)->SetValue(STATE_INDEX_STATE, (int)theState);
299 ModelAPI_ExecState Model_Data::execState()
301 return ModelAPI_ExecState(stateArray(myLab)->Value(STATE_INDEX_STATE));
304 int Model_Data::updateID()
306 return stateArray(myLab)->Value(STATE_INDEX_TRANSACTION);
309 void Model_Data::setUpdateID(const int theID)
311 stateArray(myLab)->SetValue(STATE_INDEX_TRANSACTION, theID);
314 void Model_Data::setError(const std::string& theError, bool theSend)
316 execState(ModelAPI_StateExecFailed);
318 Events_Error::send(theError);
320 TDataStd_AsciiString::Set(myLab, theError.c_str());
323 std::string Model_Data::error() const
325 Handle(TDataStd_AsciiString) anErrorAttr;
326 if (myLab.FindAttribute(TDataStd_AsciiString::GetID(), anErrorAttr)) {
327 return std::string(anErrorAttr->Get().ToCString());
329 return std::string();
332 int Model_Data::featureId() const
334 return myLab.Father().Tag(); // tag of the feature label
337 void Model_Data::eraseBackReferences()
340 std::shared_ptr<ModelAPI_Result> aRes =
341 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
343 aRes->setIsConcealed(false);
346 void Model_Data::removeBackReference(FeaturePtr theFeature, std::string theAttrID)
348 AttributePtr anAttribute = theFeature->data()->attribute(theAttrID);
349 if (myRefsToMe.find(anAttribute) == myRefsToMe.end())
352 myRefsToMe.erase(anAttribute);
354 // remove concealment immideately: on deselection it must be posible to reselect in GUI the same
355 if (ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
356 updateConcealmentFlag();
360 void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID,
361 const bool theApplyConcealment)
363 // do not add the same attribute twice
364 AttributePtr anAttribute = theFeature->data()->attribute(theAttrID);
365 if (myRefsToMe.find(anAttribute) != myRefsToMe.end())
368 myRefsToMe.insert(theFeature->data()->attribute(theAttrID));
369 if (theApplyConcealment &&
370 ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
371 std::shared_ptr<ModelAPI_Result> aRes =
372 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
373 // the second condition is for history upper than concealment causer, so the feature result may
374 // be displayed and previewed; also for avoiding of quick show/hide on history
376 if (aRes && !theFeature->isDisabled()) {
377 aRes->setIsConcealed(true);
382 void Model_Data::updateConcealmentFlag()
384 std::set<AttributePtr>::iterator aRefsIter = myRefsToMe.begin();
385 for(; aRefsIter != myRefsToMe.end(); aRefsIter++) {
386 if (aRefsIter->get()) {
387 FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefsIter)->owner());
388 if (aFeature.get() && !aFeature->isDisabled()) {
389 if (ModelAPI_Session::get()->validators()->isConcealed(
390 aFeature->getKind(), (*aRefsIter)->id())) {
391 return; // it is still concealed, nothing to do
396 // thus, no concealment references anymore => make not-concealed
397 std::shared_ptr<ModelAPI_Result> aRes =
398 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
400 aRes->setIsConcealed(false);
401 static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
402 ModelAPI_EventCreator::get()->sendUpdated(aRes, anEvent);
403 Events_Loop::loop()->flush(anEvent);
407 #include <Model_Validator.h>
409 std::set<std::string> set_union(const std::set<std::string>& theLeft,
410 const std::set<std::string>& theRight)
412 std::set<std::string> aResult;
413 aResult.insert(theLeft.begin(), theLeft.end());
414 aResult.insert(theRight.begin(), theRight.end());
418 std::set<std::string> usedParameters(const AttributePointPtr& theAttribute)
420 std::set<std::string> anUsedParameters;
421 for (int aComponent = 0; aComponent < 3; ++aComponent)
422 anUsedParameters = set_union(anUsedParameters, theAttribute->usedParameters(aComponent));
423 return anUsedParameters;
426 std::set<std::string> usedParameters(const AttributePoint2DPtr& theAttribute)
428 std::set<std::string> anUsedParameters;
429 for (int aComponent = 0; aComponent < 2; ++aComponent)
430 anUsedParameters = set_union(anUsedParameters, theAttribute->usedParameters(aComponent));
431 return anUsedParameters;
434 std::list<ResultParameterPtr> findVariables(const std::set<std::string>& theParameters,
435 const DocumentPtr& theDocument)
437 std::list<ResultParameterPtr> aResult;
438 std::set<std::string>::const_iterator aParamIt = theParameters.cbegin();
439 for (; aParamIt != theParameters.cend(); ++aParamIt) {
440 const std::string& aName = *aParamIt;
442 ResultParameterPtr aParam;
443 if (ModelAPI_Tools::findVariable(aName, aValue, aParam, theDocument))
444 aResult.push_back(aParam);
449 void Model_Data::referencesToObjects(
450 std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs)
452 static Model_ValidatorsFactory* aValidators =
453 static_cast<Model_ValidatorsFactory*>(ModelAPI_Session::get()->validators());
454 FeaturePtr aMyFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(myObject);
456 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = myAttrs.begin();
457 std::list<ObjectPtr> aReferenced; // not inside of cycle to avoid excess memory management
458 for(; anAttr != myAttrs.end(); anAttr++) {
459 // skip not-case attributes, that really may refer to anything not-used (issue 671)
460 if (aMyFeature.get() && !aValidators->isCase(aMyFeature, anAttr->second->id()))
463 std::string aType = anAttr->second->attributeType();
464 if (aType == ModelAPI_AttributeReference::typeId()) { // reference to object
465 std::shared_ptr<ModelAPI_AttributeReference> aRef = std::dynamic_pointer_cast<
466 ModelAPI_AttributeReference>(anAttr->second);
467 aReferenced.push_back(aRef->value());
468 } else if (aType == ModelAPI_AttributeRefAttr::typeId()) { // reference to attribute or object
469 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
470 ModelAPI_AttributeRefAttr>(anAttr->second);
471 aReferenced.push_back(aRef->isObject() ? aRef->object() : aRef->attr()->owner());
472 } else if (aType == ModelAPI_AttributeRefList::typeId()) { // list of references
473 aReferenced = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr->second)->list();
474 } else if (aType == ModelAPI_AttributeSelection::typeId()) { // selection attribute
475 std::shared_ptr<ModelAPI_AttributeSelection> aRef = std::dynamic_pointer_cast<
476 ModelAPI_AttributeSelection>(anAttr->second);
477 aReferenced.push_back(aRef->context());
478 } else if (aType == ModelAPI_AttributeSelectionList::typeId()) { // list of selection attributes
479 std::shared_ptr<ModelAPI_AttributeSelectionList> aRef = std::dynamic_pointer_cast<
480 ModelAPI_AttributeSelectionList>(anAttr->second);
481 for(int a = aRef->size() - 1; a >= 0; a--) {
482 aReferenced.push_back(aRef->value(a)->context());
484 } else if (aType == ModelAPI_AttributeDouble::typeId()) { // double attribute
485 AttributeDoublePtr anAttribute =
486 std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(anAttr->second);
487 std::set<std::string> anUsedParameters = anAttribute->usedParameters();
488 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters, aMyFeature->document());
489 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
490 } else if (aType == GeomDataAPI_Point::typeId()) { // point attribute
491 AttributePointPtr anAttribute =
492 std::dynamic_pointer_cast<GeomDataAPI_Point>(anAttr->second);
493 std::set<std::string> anUsedParameters = usedParameters(anAttribute);
494 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters, aMyFeature->document());
495 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
496 } else if (aType == GeomDataAPI_Point2D::typeId()) { // point attribute
497 AttributePoint2DPtr anAttribute =
498 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->second);
499 std::set<std::string> anUsedParameters = usedParameters(anAttribute);
500 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters, aMyFeature->document());
501 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
503 continue; // nothing to do, not reference
505 if (!aReferenced.empty()) {
506 theRefs.push_back(std::pair<std::string, std::list<ObjectPtr> >(anAttr->first, aReferenced));
512 /// makes copy of all attributes on the given label and all sub-labels
513 static void copyAttrs(TDF_Label theSource, TDF_Label theDestination) {
514 TDF_AttributeIterator anAttrIter(theSource);
515 for(; anAttrIter.More(); anAttrIter.Next()) {
516 Handle(TDF_Attribute) aTargetAttr;
517 if (!theDestination.FindAttribute(anAttrIter.Value()->ID(), aTargetAttr)) {
518 // create a new attribute if not yet exists in the destination
519 aTargetAttr = anAttrIter.Value()->NewEmpty();
520 theDestination.AddAttribute(aTargetAttr);
522 Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); // no relocation, empty map
523 anAttrIter.Value()->Paste(aTargetAttr, aRelocTable);
525 // copy the sub-labels content
526 TDF_ChildIterator aSubLabsIter(theSource);
527 for(; aSubLabsIter.More(); aSubLabsIter.Next()) {
528 copyAttrs(aSubLabsIter.Value(), theDestination.FindChild(aSubLabsIter.Value().Tag()));
532 void Model_Data::copyTo(std::shared_ptr<ModelAPI_Data> theTarget)
534 TDF_Label aTargetRoot = std::dynamic_pointer_cast<Model_Data>(theTarget)->label();
535 copyAttrs(myLab, aTargetRoot);
536 // make initialized the initialized attributes
537 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aMyIter = myAttrs.begin();
538 for(; aMyIter != myAttrs.end(); aMyIter++) {
539 if (aMyIter->second->isInitialized()) {
540 theTarget->attribute(aMyIter->first)->setInitialized();
545 bool Model_Data::isInHistory()
547 return myFlags->Value(kFlagInHistory) == Standard_True;
550 void Model_Data::setIsInHistory(const bool theFlag)
552 return myFlags->SetValue(kFlagInHistory, theFlag);
555 bool Model_Data::isDisplayed()
557 if (!myObject.get() || !myObject->document().get() || // object is in valid
558 myFlags->Value(kFlagDisplayed) != Standard_True) // or it was not displayed before
560 if (myObject->document()->isActive()) // for active documents it must be ok anyway
562 // any object from the root document except part result may be displayed
563 if (myObject->document() == ModelAPI_Session::get()->moduleDocument() &&
564 myObject->groupName() != ModelAPI_ResultPart::group())
569 void Model_Data::setDisplayed(const bool theDisplay)
571 if (theDisplay != isDisplayed()) {
572 myFlags->SetValue(kFlagDisplayed, theDisplay);
573 static Events_Loop* aLoop = Events_Loop::loop();
574 static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
575 static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
576 aECreator->sendUpdated(myObject, EVENT_DISP);
580 std::shared_ptr<ModelAPI_Data> Model_Data::invalidPtr()
585 std::shared_ptr<ModelAPI_Data> Model_Data::invalidData()
590 std::shared_ptr<ModelAPI_Object> Model_Data::owner()