myCoords->SetValue(1, theY);
myCoords->SetValue(2, theZ);
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
myCoords->SetValue(1, theY);
myCoords->SetValue(2, theZ);
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
myCoords->SetValue(0, theX);
myCoords->SetValue(1, theY);
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
myComment->Set(TCollection_ExtendedString(theDoc->id().c_str()));
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
if (myReal->Get() != theValue) {
myReal->Set(theValue);
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
void Model_AttributeRefAttr::setAttr(boost::shared_ptr<ModelAPI_Attribute> theAttr)
{
boost::shared_ptr<Model_Data> aData =
- boost::dynamic_pointer_cast<Model_Data>(theAttr->feature()->data());
+ boost::dynamic_pointer_cast<Model_Data>(theAttr->owner()->data());
string anID = aData->id(theAttr);
- if (feature() == theAttr->feature() && myID->Get().IsEqual(anID.c_str()))
+ if (feature() == theAttr->owner() && myID->Get().IsEqual(anID.c_str()))
return; // nothing is changed
myRef->Set(aData->label());
myID->Set(""); // feature is identified by the empty ID
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
{
if (myRef->Get() != myRef->Label()) { // initialized
boost::shared_ptr<Model_Document> aDoc =
- boost::dynamic_pointer_cast<Model_Document>(feature()->document());
+ boost::dynamic_pointer_cast<Model_Document>(owner()->document());
if (aDoc) {
TDF_Label aRefLab = myRef->Get();
TDF_Label aFeatureLab = aRefLab.Father();
myRef->Append(aData->label());
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
{
std::list< boost::shared_ptr<ModelAPI_Feature> > aResult;
boost::shared_ptr<Model_Document> aDoc =
- boost::dynamic_pointer_cast<Model_Document>(feature()->document());
+ boost::dynamic_pointer_cast<Model_Document>(owner()->document());
if (aDoc) {
const TDF_LabelList& aList = myRef->List();
for(TDF_ListIteratorOfLabelList aLIter(aList); aLIter.More(); aLIter.Next()) {
boost::dynamic_pointer_cast<Model_Data>(theFeature->data());
if (myRef.IsNull()) {
boost::shared_ptr<Model_Data> aMyData =
- boost::dynamic_pointer_cast<Model_Data>(feature()->data());
+ boost::dynamic_pointer_cast<Model_Data>(owner()->data());
TDF_Reference::Set(aMyData->label(), aData->label());
} else {
myRef->Set(aData->label());
}
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
Events_Loop::loop()->send(aMsg);
}
}
{
if (!myRef.IsNull()) {
boost::shared_ptr<Model_Document> aDoc =
- boost::dynamic_pointer_cast<Model_Document>(feature()->document());
+ boost::dynamic_pointer_cast<Model_Document>(owner()->document());
if (aDoc) {
TDF_Label aRefLab = myRef->Get();
return aDoc->feature(aRefLab);
{myFeature = theFeature;}
/// Returns the owner of this attribute
- MODELAPI_EXPORT const boost::shared_ptr<ModelAPI_Feature>& feature()
+ MODELAPI_EXPORT const boost::shared_ptr<ModelAPI_Feature>& owner()
{return myFeature;}
protected:
/// Objects are created for features automatically