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.
15 #ifndef _BRepAlgoAPI_Algo_HeaderFile
16 #define _BRepAlgoAPI_Algo_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <BOPCol_BaseAllocator.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <BRepBuilderAPI_MakeShape.hxx>
26 class Message_ProgressIndicator;
30 //! provides the root interface for algorithms
31 class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape
38 //! Returns error status of the algorithm
39 //! ==0 - no errors occured
40 //! !=0 - is in the event of various error conditions
41 Standard_EXPORT Standard_Integer ErrorStatus() const;
43 //! Returns warning status of the algorithm
44 //! ==0 - no warning occured
45 //! !=0 - is in the event of various warning conditions
46 Standard_EXPORT Standard_Integer WarningStatus() const;
48 Standard_EXPORT const BOPCol_BaseAllocator& Allocator() const;
50 //! Set the flag of parallel processing
51 //! if <theFlag> is true the parallel processing is switched on
52 //! if <theFlag> is false the parallel processing is switched off
53 Standard_EXPORT void SetRunParallel (const Standard_Boolean theFlag);
55 //! Returns the flag of parallel processing
56 Standard_EXPORT Standard_Boolean RunParallel() const;
58 //! Set the Progress Indicator object.
59 Standard_EXPORT void SetProgressIndicator (const Handle(Message_ProgressIndicator)& theObj);
61 Standard_EXPORT virtual const TopoDS_Shape& Shape() Standard_OVERRIDE;
70 Standard_EXPORT BRepAlgoAPI_Algo();
71 Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
74 Standard_EXPORT BRepAlgoAPI_Algo(const BOPCol_BaseAllocator& theAllocator);
76 //! Breaks the execution if the break signal
77 //! is indicated by myProgressIndicator.
78 Standard_EXPORT void UserBreak() const;
80 Standard_EXPORT virtual void Clear();
83 BOPCol_BaseAllocator myAllocator;
84 Standard_Integer myErrorStatus;
85 Standard_Integer myWarningStatus;
86 Standard_Boolean myRunParallel;
87 Handle(Message_ProgressIndicator) myProgressIndicator;
104 #endif // _BRepAlgoAPI_Algo_HeaderFile