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>
48 // TDataStd_Name - name of the object
49 // TDataStd_IntegerArray - state of the object execution, transaction ID of update
50 // TDataStd_BooleanArray - array of flags of this data:
51 // 0 - is in history or not
52 static const int kFlagInHistory = 0;
53 // 1 - is displayed or not
54 static const int kFlagDisplayed = 1;
57 const static std::shared_ptr<ModelAPI_Data> kInvalid(new Model_Data());
59 Model_Data::Model_Data() : mySendAttributeUpdated(true)
63 void Model_Data::setLabel(TDF_Label theLab)
66 // set or get the default flags
67 if (!myLab.FindAttribute(TDataStd_BooleanArray::GetID(), myFlags)) {
68 // set default values if not found
69 myFlags = TDataStd_BooleanArray::Set(myLab, 0, 1);
70 myFlags->SetValue(kFlagInHistory, Standard_True); // is in history by default is true
71 myFlags->SetValue(kFlagDisplayed, Standard_True); // is displayed by default is true
75 std::string Model_Data::name()
77 Handle(TDataStd_Name) aName;
78 if (myLab.FindAttribute(TDataStd_Name::GetID(), aName))
79 return std::string(TCollection_AsciiString(aName->Get()).ToCString());
80 return ""; // not defined
83 void Model_Data::setName(const std::string& theName)
85 bool isModified = false;
86 std::string anOldName = name();
87 Handle(TDataStd_Name) aName;
88 if (!myLab.FindAttribute(TDataStd_Name::GetID(), aName)) {
89 TDataStd_Name::Set(myLab, theName.c_str());
92 isModified = !aName->Get().IsEqual(theName.c_str());
94 aName->Set(theName.c_str());
96 if (mySendAttributeUpdated && isModified)
97 ModelAPI_ObjectRenamedMessage::send(myObject, anOldName, theName, this);
100 AttributePtr Model_Data::addAttribute(const std::string& theID, const std::string theAttrType)
102 AttributePtr aResult;
103 TDF_Label anAttrLab = myLab.FindChild(myAttrs.size() + 1);
104 ModelAPI_Attribute* anAttr = 0;
105 if (theAttrType == ModelAPI_AttributeDocRef::typeId()) {
106 anAttr = new Model_AttributeDocRef(anAttrLab);
107 } else if (theAttrType == Model_AttributeInteger::typeId()) {
108 anAttr = new Model_AttributeInteger(anAttrLab);
109 } else if (theAttrType == ModelAPI_AttributeDouble::typeId()) {
110 Model_AttributeDouble* anAttribute = new Model_AttributeDouble(anAttrLab);
111 TDF_Label anExpressionLab = anAttrLab.FindChild(anAttrLab.NbChildren() + 1);
112 anAttribute->myExpression.reset(new Model_Expression(anExpressionLab));
113 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression->isInitialized();
114 anAttr = anAttribute;
115 } else if (theAttrType == Model_AttributeBoolean::typeId()) {
116 anAttr = new Model_AttributeBoolean(anAttrLab);
117 } else if (theAttrType == Model_AttributeString::typeId()) {
118 anAttr = new Model_AttributeString(anAttrLab);
119 } else if (theAttrType == ModelAPI_AttributeReference::typeId()) {
120 anAttr = new Model_AttributeReference(anAttrLab);
121 } else if (theAttrType == ModelAPI_AttributeSelection::typeId()) {
122 anAttr = new Model_AttributeSelection(anAttrLab);
123 } else if (theAttrType == ModelAPI_AttributeSelectionList::typeId()) {
124 anAttr = new Model_AttributeSelectionList(anAttrLab);
125 } else if (theAttrType == ModelAPI_AttributeRefAttr::typeId()) {
126 anAttr = new Model_AttributeRefAttr(anAttrLab);
127 } else if (theAttrType == ModelAPI_AttributeRefList::typeId()) {
128 anAttr = new Model_AttributeRefList(anAttrLab);
129 } else if (theAttrType == ModelAPI_AttributeIntArray::typeId()) {
130 anAttr = new Model_AttributeIntArray(anAttrLab);
132 // create also GeomData attributes here because only here the OCAF structure is known
133 else if (theAttrType == GeomData_Point::typeId()) {
134 GeomData_Point* anAttribute = new GeomData_Point(anAttrLab);
135 for (int aComponent = 0; aComponent < GeomData_Point::NUM_COMPONENTS; ++aComponent) {
136 TDF_Label anExpressionLab = anAttrLab.FindChild(anAttrLab.NbChildren() + 1);
137 anAttribute->myExpression[aComponent].reset(new Model_Expression(anExpressionLab));
138 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression[aComponent]->isInitialized();
140 anAttr = anAttribute;
141 } else if (theAttrType == GeomData_Dir::typeId()) {
142 anAttr = new GeomData_Dir(anAttrLab);
143 } else if (theAttrType == GeomData_Point2D::typeId()) {
144 GeomData_Point2D* anAttribute = new GeomData_Point2D(anAttrLab);
145 for (int aComponent = 0; aComponent < GeomData_Point2D::NUM_COMPONENTS; ++aComponent) {
146 TDF_Label anExpressionLab = anAttrLab.FindChild(anAttrLab.NbChildren() + 1);
147 anAttribute->myExpression[aComponent].reset(new Model_Expression(anExpressionLab));
148 anAttribute->myIsInitialized = anAttribute->myIsInitialized && anAttribute->myExpression[aComponent]->isInitialized();
150 anAttr = anAttribute;
153 aResult = std::shared_ptr<ModelAPI_Attribute>(anAttr);
154 myAttrs[theID] = aResult;
155 anAttr->setObject(myObject);
156 anAttr->setID(theID);
158 Events_Error::send("Can not create unknown type of attribute " + theAttrType);
163 // macro for gthe generic returning of the attribute by the ID
164 #define GET_ATTRIBUTE_BY_ID(ATTR_TYPE, METHOD_NAME) \
165 std::shared_ptr<ATTR_TYPE> Model_Data::METHOD_NAME(const std::string& theID) { \
166 std::shared_ptr<ATTR_TYPE> aRes; \
167 std::map<std::string, AttributePtr >::iterator aFound = \
168 myAttrs.find(theID); \
169 if (aFound != myAttrs.end()) { \
170 aRes = std::dynamic_pointer_cast<ATTR_TYPE>(aFound->second); \
174 // implement nice getting methods for all ModelAPI attributes
175 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeDocRef, document);
176 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeDouble, real);
177 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeInteger, integer);
178 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeBoolean, boolean);
179 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeString, string);
180 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeReference, reference);
181 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeSelection, selection);
182 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeSelectionList, selectionList);
183 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefAttr, refattr);
184 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeRefList, reflist);
185 GET_ATTRIBUTE_BY_ID(ModelAPI_AttributeIntArray, intArray);
187 std::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
189 std::shared_ptr<ModelAPI_Attribute> aResult;
190 if (myAttrs.find(theID) == myAttrs.end()) // no such attribute
192 return myAttrs[theID];
195 const std::string& Model_Data::id(const std::shared_ptr<ModelAPI_Attribute>& theAttr)
197 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr =
199 for (; anAttr != myAttrs.end(); anAttr++) {
200 if (anAttr->second == theAttr)
201 return anAttr->first;
204 static std::string anEmpty;
208 bool Model_Data::isEqual(const std::shared_ptr<ModelAPI_Data>& theData)
210 std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(theData);
212 return myLab.IsEqual(aData->myLab) == Standard_True ;
216 bool Model_Data::isValid()
218 return !myLab.IsNull() && myLab.HasAttribute();
221 std::list<std::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std::string& theType)
223 std::list<std::shared_ptr<ModelAPI_Attribute> > aResult;
224 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
226 for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
227 if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
228 aResult.push_back(anAttrsIter->second);
234 std::list<std::string> Model_Data::attributesIDs(const std::string& theType)
236 std::list<std::string> aResult;
237 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
239 for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
240 if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
241 aResult.push_back(anAttrsIter->first);
247 void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
249 theAttr->setInitialized();
250 if (theAttr->isArgument()) {
251 static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
252 ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
253 if (mySendAttributeUpdated && myObject) {
254 myObject->attributeChanged(theAttr->id());
259 void Model_Data::blockSendAttributeUpdated(const bool theBlock)
261 mySendAttributeUpdated = !theBlock;
264 void Model_Data::erase()
267 myLab.ForgetAllAttributes();
270 // indexes in the state array
272 STATE_INDEX_STATE = 1, // the state type itself
273 STATE_INDEX_TRANSACTION = 2, // transaction ID
276 /// Returns the label array, initialises it by default values if not exists
277 static Handle(TDataStd_IntegerArray) stateArray(TDF_Label& theLab)
279 Handle(TDataStd_IntegerArray) aStateArray;
280 if (!theLab.FindAttribute(TDataStd_IntegerArray::GetID(), aStateArray)) {
281 aStateArray = TDataStd_IntegerArray::Set(theLab, 1, 2);
282 aStateArray->SetValue(STATE_INDEX_STATE, ModelAPI_StateMustBeUpdated); // default state
283 aStateArray->SetValue(STATE_INDEX_TRANSACTION, 0); // default transaction ID (not existing)
288 void Model_Data::execState(const ModelAPI_ExecState theState)
290 if (theState != ModelAPI_StateNothing) {
291 stateArray(myLab)->SetValue(STATE_INDEX_STATE, (int)theState);
295 ModelAPI_ExecState Model_Data::execState()
297 return ModelAPI_ExecState(stateArray(myLab)->Value(STATE_INDEX_STATE));
300 int Model_Data::updateID()
302 return stateArray(myLab)->Value(STATE_INDEX_TRANSACTION);
305 void Model_Data::setUpdateID(const int theID)
307 stateArray(myLab)->SetValue(STATE_INDEX_TRANSACTION, theID);
310 void Model_Data::setError(const std::string& theError, bool theSend)
312 execState(ModelAPI_StateExecFailed);
314 Events_Error::send(theError);
316 TDataStd_AsciiString::Set(myLab, theError.c_str());
319 std::string Model_Data::error() const
321 Handle(TDataStd_AsciiString) anErrorAttr;
322 if (myLab.FindAttribute(TDataStd_AsciiString::GetID(), anErrorAttr)) {
323 return std::string(anErrorAttr->Get().ToCString());
325 return std::string();
328 int Model_Data::featureId() const
330 return myLab.Father().Tag(); // tag of the feature label
333 void Model_Data::eraseBackReferences()
336 std::shared_ptr<ModelAPI_Result> aRes =
337 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
339 aRes->setIsConcealed(false);
342 void Model_Data::removeBackReference(FeaturePtr theFeature, std::string theAttrID)
344 AttributePtr anAttribute = theFeature->data()->attribute(theAttrID);
345 if (myRefsToMe.find(anAttribute) == myRefsToMe.end())
348 myRefsToMe.erase(anAttribute);
350 // remove concealment immideately: on deselection it must be posible to reselect in GUI the same
351 if (ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
352 updateConcealmentFlag();
356 void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID,
357 const bool theApplyConcealment)
359 // do not add the same attribute twice
360 AttributePtr anAttribute = theFeature->data()->attribute(theAttrID);
361 if (myRefsToMe.find(anAttribute) != myRefsToMe.end())
364 myRefsToMe.insert(theFeature->data()->attribute(theAttrID));
365 if (theApplyConcealment &&
366 ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
367 std::shared_ptr<ModelAPI_Result> aRes =
368 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
369 // the second condition is for history upper than concealment causer, so the feature result may
370 // be displayed and previewed; also for avoiding of quick show/hide on history
372 if (aRes && !theFeature->isDisabled()) {
373 aRes->setIsConcealed(true);
378 void Model_Data::updateConcealmentFlag()
380 std::set<AttributePtr>::iterator aRefsIter = myRefsToMe.begin();
381 for(; aRefsIter != myRefsToMe.end(); aRefsIter++) {
382 if (aRefsIter->get()) {
383 FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefsIter)->owner());
384 if (aFeature.get() && !aFeature->isDisabled()) {
385 if (ModelAPI_Session::get()->validators()->isConcealed(
386 aFeature->getKind(), (*aRefsIter)->id())) {
387 return; // it is still concealed, nothing to do
392 // thus, no concealment references anymore => make not-concealed
393 std::shared_ptr<ModelAPI_Result> aRes =
394 std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
396 aRes->setIsConcealed(false);
397 static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
398 ModelAPI_EventCreator::get()->sendUpdated(aRes, anEvent);
399 Events_Loop::loop()->flush(anEvent);
403 #include <Model_Validator.h>
405 std::set<std::string> set_union(const std::set<std::string>& theLeft,
406 const std::set<std::string>& theRight)
408 std::set<std::string> aResult;
409 aResult.insert(theLeft.begin(), theLeft.end());
410 aResult.insert(theRight.begin(), theRight.end());
414 std::set<std::string> usedParameters(const AttributePointPtr& theAttribute)
416 std::set<std::string> anUsedParameters;
417 for (int aComponent = 0; aComponent < 3; ++aComponent)
418 anUsedParameters = set_union(anUsedParameters, theAttribute->usedParameters(aComponent));
419 return anUsedParameters;
422 std::set<std::string> usedParameters(const AttributePoint2DPtr& theAttribute)
424 std::set<std::string> anUsedParameters;
425 for (int aComponent = 0; aComponent < 2; ++aComponent)
426 anUsedParameters = set_union(anUsedParameters, theAttribute->usedParameters(aComponent));
427 return anUsedParameters;
430 std::list<ResultParameterPtr> findVariables(const std::set<std::string>& theParameters)
432 std::list<ResultParameterPtr> aResult;
433 std::set<std::string>::const_iterator aParamIt = theParameters.cbegin();
434 for (; aParamIt != theParameters.cend(); ++aParamIt) {
435 const std::string& aName = *aParamIt;
437 ResultParameterPtr aParam;
438 if (ModelAPI_Tools::findVariable(aName, aValue, aParam))
439 aResult.push_back(aParam);
444 void Model_Data::referencesToObjects(
445 std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs)
447 static Model_ValidatorsFactory* aValidators =
448 static_cast<Model_ValidatorsFactory*>(ModelAPI_Session::get()->validators());
449 FeaturePtr aMyFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(myObject);
451 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = myAttrs.begin();
452 std::list<ObjectPtr> aReferenced; // not inside of cycle to avoid excess memory management
453 for(; anAttr != myAttrs.end(); anAttr++) {
454 // skip not-case attributes, that really may refer to anything not-used (issue 671)
455 if (aMyFeature.get() && !aValidators->isCase(aMyFeature, anAttr->second->id()))
458 std::string aType = anAttr->second->attributeType();
459 if (aType == ModelAPI_AttributeReference::typeId()) { // reference to object
460 std::shared_ptr<ModelAPI_AttributeReference> aRef = std::dynamic_pointer_cast<
461 ModelAPI_AttributeReference>(anAttr->second);
462 aReferenced.push_back(aRef->value());
463 } else if (aType == ModelAPI_AttributeRefAttr::typeId()) { // reference to attribute or object
464 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
465 ModelAPI_AttributeRefAttr>(anAttr->second);
466 aReferenced.push_back(aRef->isObject() ? aRef->object() : aRef->attr()->owner());
467 } else if (aType == ModelAPI_AttributeRefList::typeId()) { // list of references
468 aReferenced = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr->second)->list();
469 } else if (aType == ModelAPI_AttributeSelection::typeId()) { // selection attribute
470 std::shared_ptr<ModelAPI_AttributeSelection> aRef = std::dynamic_pointer_cast<
471 ModelAPI_AttributeSelection>(anAttr->second);
472 aReferenced.push_back(aRef->context());
473 } else if (aType == ModelAPI_AttributeSelectionList::typeId()) { // list of selection attributes
474 std::shared_ptr<ModelAPI_AttributeSelectionList> aRef = std::dynamic_pointer_cast<
475 ModelAPI_AttributeSelectionList>(anAttr->second);
476 for(int a = aRef->size() - 1; a >= 0; a--) {
477 aReferenced.push_back(aRef->value(a)->context());
479 } else if (aType == ModelAPI_AttributeDouble::typeId()) { // double attribute
480 AttributeDoublePtr anAttribute =
481 std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(anAttr->second);
482 std::set<std::string> anUsedParameters = anAttribute->usedParameters();
483 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters);
484 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
485 } else if (aType == GeomDataAPI_Point::typeId()) { // point attribute
486 AttributePointPtr anAttribute =
487 std::dynamic_pointer_cast<GeomDataAPI_Point>(anAttr->second);
488 std::set<std::string> anUsedParameters = usedParameters(anAttribute);
489 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters);
490 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
491 } else if (aType == GeomDataAPI_Point2D::typeId()) { // point attribute
492 AttributePoint2DPtr anAttribute =
493 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->second);
494 std::set<std::string> anUsedParameters = usedParameters(anAttribute);
495 std::list<ResultParameterPtr> aParameters = findVariables(anUsedParameters);
496 aReferenced.insert(aReferenced.end(), aParameters.begin(), aParameters.end());
498 continue; // nothing to do, not reference
500 if (!aReferenced.empty()) {
501 theRefs.push_back(std::pair<std::string, std::list<ObjectPtr> >(anAttr->first, aReferenced));
507 /// makes copy of all attributes on the given label and all sub-labels
508 static void copyAttrs(TDF_Label theSource, TDF_Label theDestination) {
509 TDF_AttributeIterator anAttrIter(theSource);
510 for(; anAttrIter.More(); anAttrIter.Next()) {
511 Handle(TDF_Attribute) aTargetAttr;
512 if (!theDestination.FindAttribute(anAttrIter.Value()->ID(), aTargetAttr)) {
513 // create a new attribute if not yet exists in the destination
514 aTargetAttr = anAttrIter.Value()->NewEmpty();
515 theDestination.AddAttribute(aTargetAttr);
517 Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); // no relocation, empty map
518 anAttrIter.Value()->Paste(aTargetAttr, aRelocTable);
520 // copy the sub-labels content
521 TDF_ChildIterator aSubLabsIter(theSource);
522 for(; aSubLabsIter.More(); aSubLabsIter.Next()) {
523 copyAttrs(aSubLabsIter.Value(), theDestination.FindChild(aSubLabsIter.Value().Tag()));
527 void Model_Data::copyTo(std::shared_ptr<ModelAPI_Data> theTarget)
529 TDF_Label aTargetRoot = std::dynamic_pointer_cast<Model_Data>(theTarget)->label();
530 copyAttrs(myLab, aTargetRoot);
531 // make initialized the initialized attributes
532 std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator aMyIter = myAttrs.begin();
533 for(; aMyIter != myAttrs.end(); aMyIter++) {
534 if (aMyIter->second->isInitialized()) {
535 theTarget->attribute(aMyIter->first)->setInitialized();
540 bool Model_Data::isInHistory()
542 return myFlags->Value(kFlagInHistory) == Standard_True;
545 void Model_Data::setIsInHistory(const bool theFlag)
547 return myFlags->SetValue(kFlagInHistory, theFlag);
550 bool Model_Data::isDisplayed()
552 if (!myObject.get() || !myObject->document().get() || // object is in valid
553 myFlags->Value(kFlagDisplayed) != Standard_True) // or it was not displayed before
555 if (myObject->document()->isActive()) // for active documents it must be ok anyway
557 // any object from the root document except part result may be displayed
558 if (myObject->document() == ModelAPI_Session::get()->moduleDocument() &&
559 myObject->groupName() != ModelAPI_ResultPart::group())
564 void Model_Data::setDisplayed(const bool theDisplay)
566 if (theDisplay != isDisplayed()) {
567 myFlags->SetValue(kFlagDisplayed, theDisplay);
568 static Events_Loop* aLoop = Events_Loop::loop();
569 static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
570 static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
571 aECreator->sendUpdated(myObject, EVENT_DISP);
575 std::shared_ptr<ModelAPI_Data> Model_Data::invalidPtr()
580 std::shared_ptr<ModelAPI_Data> Model_Data::invalidData()
585 bool Model_Data::isOwner(ModelAPI_Object* theOwner)
587 return theOwner == myObject.get();