+ObjectPtr Model_AttributeRefList::object(const int theIndex) const
+{
+ boost::shared_ptr<Model_Document> aDoc = boost::dynamic_pointer_cast<Model_Document>(
+ owner()->document());
+ if (aDoc) {
+ const TDF_LabelList& aList = myRef->List();
+ int anIndex = 0;
+ for (TDF_ListIteratorOfLabelList aLIter(aList); aLIter.More(); aLIter.Next(), anIndex++) {
+ if (anIndex == theIndex)
+ return aDoc->object(aLIter.Value());
+ }
+ }
+ return ObjectPtr();
+}
+