aCopy.Perform();
}
+Handle(HYDROData_Entity) HYDROData_Entity::GetFatherObject() const
+{
+ Handle(HYDROData_Entity) aFather;
+
+ if ( !myLab.IsNull() )
+ {
+ TDF_Label aFatherLabel = myLab.Father();
+
+ while ( aFather.IsNull() && !aFatherLabel.IsNull() && !aFatherLabel.IsRoot() )
+ {
+ aFather = HYDROData_Iterator::Object( aFatherLabel );
+ aFatherLabel = aFatherLabel.Father();
+ }
+ }
+
+ return aFather;
+}
+
void HYDROData_Entity::SetLabel(TDF_Label theLabel)
{
myLab = theLabel;
return aRefs.IsNull() ? 0 : aRefs->Extent();
}
+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;
+}
+
void HYDROData_Entity::AddReferenceObject( const Handle_HYDROData_Entity& theObj,
const int theTag )
{