X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomValidators%2FGeomValidators_Tools.cpp;h=ef49c197d24bd69d48ae8108bb351b6c4509252e;hb=4fc2dc9fdc0c14fab5f2780598eccdc1368d81b9;hp=f98088ed3b17f4059b46cbfc430d9838032497ae;hpb=ad777acf40828575ffa8a9ba6db103a7cc17dd71;p=modules%2Fshaper.git diff --git a/src/GeomValidators/GeomValidators_Tools.cpp b/src/GeomValidators/GeomValidators_Tools.cpp index f98088ed3..ef49c197d 100644 --- a/src/GeomValidators/GeomValidators_Tools.cpp +++ b/src/GeomValidators/GeomValidators_Tools.cpp @@ -10,27 +10,30 @@ #include "ModelAPI_AttributeSelection.h" #include "ModelAPI_AttributeReference.h" +#include + namespace GeomValidators_Tools { ObjectPtr getObject(const AttributePtr& theAttribute) { ObjectPtr anObject; std::string anAttrType = theAttribute->attributeType(); - if (anAttrType == ModelAPI_AttributeRefAttr::type()) { + if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) { AttributeRefAttrPtr anAttr = std::dynamic_pointer_cast(theAttribute); if (anAttr != NULL && anAttr->isObject()) anObject = anAttr->object(); } - if (anAttrType == ModelAPI_AttributeSelection::type()) { + if (anAttrType == ModelAPI_AttributeSelection::typeId()) { AttributeSelectionPtr anAttr = std::dynamic_pointer_cast(theAttribute); - if (anAttr != NULL && anAttr->isInitialized()) + if (anAttr != NULL) anObject = anAttr->context(); } - if (anAttrType == ModelAPI_AttributeReference::type()) { + if (anAttrType == ModelAPI_AttributeReference::typeId()) { AttributeReferencePtr anAttr = std::dynamic_pointer_cast(theAttribute); - if (anAttr.get() != NULL && anAttr->isInitialized()) + if (anAttr.get() != NULL) anObject = anAttr->value(); } return anObject; } + }