1 // Created by: Peter KURNEV
2 // Copyright (c) 2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
16 #include <BRepAlgoAPI_Algo.hxx>
17 #include <Message_ProgressIndicator.hxx>
18 #include <NCollection_BaseAllocator.hxx>
19 #include <Standard_NotImplemented.hxx>
20 #include <TopoDS_Shape.hxx>
22 //=======================================================================
25 //=======================================================================
26 BRepAlgoAPI_Algo::BRepAlgoAPI_Algo()
28 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
31 myRunParallel(Standard_False)
33 //=======================================================================
36 //=======================================================================
37 BRepAlgoAPI_Algo::BRepAlgoAPI_Algo
38 (const Handle(NCollection_BaseAllocator)& theAllocator)
40 myAllocator(theAllocator),
43 myRunParallel(Standard_False)
46 //=======================================================================
49 //=======================================================================
50 BRepAlgoAPI_Algo::~BRepAlgoAPI_Algo()
53 //=======================================================================
54 //function : Allocator
56 //=======================================================================
57 const Handle(NCollection_BaseAllocator)& BRepAlgoAPI_Algo::Allocator()const
61 //=======================================================================
62 // function: ErrorStatus
64 //=======================================================================
65 Standard_Integer BRepAlgoAPI_Algo::ErrorStatus()const
69 //=======================================================================
70 // function: WarningStatus
72 //=======================================================================
73 Standard_Integer BRepAlgoAPI_Algo::WarningStatus()const
75 return myWarningStatus;
77 //=======================================================================
78 //function : SetRunParallel
80 //=======================================================================
81 void BRepAlgoAPI_Algo::SetRunParallel(const Standard_Boolean theFlag)
83 myRunParallel=theFlag;
85 //=======================================================================
86 //function : RunParallel
88 //=======================================================================
89 Standard_Boolean BRepAlgoAPI_Algo::RunParallel()const
93 //=======================================================================
94 //function : SetProgressIndicator
96 //=======================================================================
97 void BRepAlgoAPI_Algo::SetProgressIndicator
98 (const Handle(Message_ProgressIndicator)& theObj)
100 if (!theObj.IsNull()) {
101 myProgressIndicator=theObj;
104 //=======================================================================
105 //function : UserBreak
107 //=======================================================================
108 void BRepAlgoAPI_Algo::UserBreak() const
110 if (myProgressIndicator.IsNull()) {
113 if (myProgressIndicator->UserBreak()) {
114 Standard_NotImplemented::Raise("");
117 //=======================================================================
120 //=======================================================================
121 const TopoDS_Shape& BRepAlgoAPI_Algo::Shape() const
125 //=======================================================================
128 //=======================================================================
129 void BRepAlgoAPI_Algo::Clear()
134 // 1 - object is just initialized