#include <TDF_Label.hxx>
#include <Standard_DomainError.hxx>
-// This bug concerns the method IsDescendant():
-#define BUC60817
-
-// This bug concerns the method BeforeForget() - Forget/Resume, Undo/Redo behaviour of the attribute
-#define BUC60844
-
//=======================================================================
//function : Find
//purpose :
Standard_Boolean TDataStd_TreeNode::IsDescendant (const Handle(TDataStd_TreeNode)& ofTN) const
{
-#ifdef BUC60817
-
TDataStd_TreeNode* O = (TDataStd_TreeNode*) this;
while (O->myFather != NULL)
{
return Standard_True;
O = O->myFather;
}
-
-#else
- Handle(TDataStd_TreeNode) current;
- for (current = this; current = current->Father(); current->HasFather()) {
- if (current == ofTN) return Standard_True;
- }
-#endif
return Standard_False;
}
//=======================================================================
void TDataStd_TreeNode::BeforeForget() {
-#ifdef BUC60844
if (!IsBackuped()) {
Remove();
while (HasFirst()) First()->Remove();
}
-#else
- if (!IsBackuped()) Remove();
-#endif
}
//=======================================================================