+bool HYDROData_Entity::HasReference( const Handle_HYDROData_Entity& theObj,
+ const int theTag ) const
+{
+ if ( theObj.IsNull() )
+ return false;
+
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
+ if ( aRefs.IsNull() || aRefs->IsEmpty() )
+ return false;
+
+ TDF_ListIteratorOfLabelList aListIt( aRefs->List() );
+ for ( ; aListIt.More(); aListIt.Next() )
+ {
+ const TDF_Label& aRefLabel = aListIt.Value();
+ if ( theObj->Label() == aRefLabel )
+ return true;
+ }
+
+ return false;
+}
+