0025269: Make parallel version of boolean operations avaible from DRAW
[occt.git] / src / BOPAlgo / BOPAlgo_Algo.cxx
index 4d1b441..6a34b54 100644 (file)
 #include <Standard_ProgramError.hxx>
 #include <Standard_NotImplemented.hxx>
 
+namespace
+{
+  Standard_Boolean myGlobalRunParallel = Standard_False;
+}
+
+//=======================================================================
+// function: 
+// purpose: 
+//=======================================================================
+void BOPAlgo_Algo::SetParallelMode(Standard_Boolean theNewMode)
+{
+  myGlobalRunParallel = theNewMode;
+}
+
+//=======================================================================
+// function: 
+// purpose: 
+//=======================================================================
+Standard_Boolean BOPAlgo_Algo::GetParallelMode()
+{
+  return myGlobalRunParallel;
+}
+
+
 //=======================================================================
 // function: 
 // purpose: 
@@ -31,7 +55,7 @@ BOPAlgo_Algo::BOPAlgo_Algo()
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
   myErrorStatus(1),
   myWarningStatus(0),
-  myRunParallel(Standard_False)
+  myRunParallel(myGlobalRunParallel)
 {}
 //=======================================================================
 // function: 
@@ -43,7 +67,7 @@ BOPAlgo_Algo::BOPAlgo_Algo
   myAllocator(theAllocator),
   myErrorStatus(1),
   myWarningStatus(0),
-  myRunParallel(Standard_False)
+  myRunParallel(myGlobalRunParallel)
 {}
 
 //=======================================================================