Salome HOME
Merge V8_4_BR branch.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_PartitionDriver.cxx
index e888b27083d7c638e79b9c31fbf210ab035374fd..0988e6ddccff7804391aa700753c104ed9f88b27 100644 (file)
@@ -44,6 +44,7 @@
 #include <Standard_NullObject.hxx>
 #include <StdFail_NotDone.hxx>
 #include <BOPAlgo_CheckerSI.hxx>
+#include <BOPAlgo_Alerts.hxx>
 #include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
 #include <BOPCol_ListOfShape.hxx>
 #include <BOPDS_DS.hxx>
@@ -106,8 +107,7 @@ static void CheckSelfIntersection(const TopoDS_Shape &theShape)
   aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
   aCSI.SetArguments(aList);
   aCSI.Perform();
-
-  if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+  if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
     StdFail_NotDone::Raise("Partition operation will not be performed, because argument shape is self-intersected");
   }
 }
@@ -116,7 +116,7 @@ static void CheckSelfIntersection(const TopoDS_Shape &theShape)
 //function : Execute
 //purpose  :
 //=======================================================================
-Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
+Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& log) const
 {
   if (Label().IsNull()) return 0;
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@@ -411,7 +411,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
   aShape = PS.Shape();
   if (aShape.IsNull()) {
     // Mantis issue 22009
-    if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
+    if (PS.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments)) && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
       aShape = PS.Arguments().First();
     else
       return 0;
@@ -497,7 +497,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
     }
   }
 
-  log.SetTouched(Label());
+  log->SetTouched(Label());
 
   return 1;
 }
@@ -555,5 +555,4 @@ GetCreationInformation(std::string&             theOperationName,
   return true;
 }
 
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PartitionDriver,GEOM_BaseDriver);
 IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PartitionDriver,GEOM_BaseDriver);