0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_Algo.hxx
CommitLineData
42cf5bc1 1// Created by: Peter KURNEV
2// Copyright (c) 2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
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.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _BRepAlgoAPI_Algo_HeaderFile
16#define _BRepAlgoAPI_Algo_HeaderFile
17
18#include <Standard.hxx>
19#include <Standard_DefineAlloc.hxx>
20#include <Standard_Handle.hxx>
21
22#include <BOPCol_BaseAllocator.hxx>
23#include <Standard_Integer.hxx>
24#include <Standard_Boolean.hxx>
25#include <BRepBuilderAPI_MakeShape.hxx>
26class Message_ProgressIndicator;
27class TopoDS_Shape;
28
29
30//! provides the root interface for algorithms
31class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape
32{
33public:
34
35 DEFINE_STANDARD_ALLOC
36
37
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;
42
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;
47
48 Standard_EXPORT const BOPCol_BaseAllocator& Allocator() const;
49
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);
54
55 //! Returns the flag of parallel processing
56 Standard_EXPORT Standard_Boolean RunParallel() const;
57
58 //! Set the Progress Indicator object.
59 Standard_EXPORT void SetProgressIndicator (const Handle(Message_ProgressIndicator)& theObj);
60
61 Standard_EXPORT virtual const TopoDS_Shape& Shape() const Standard_OVERRIDE;
62
63
64
65
66protected:
67
68
69 //! Empty constructor
70 Standard_EXPORT BRepAlgoAPI_Algo();
71Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
72
73 //! Empty constructor
74 Standard_EXPORT BRepAlgoAPI_Algo(const BOPCol_BaseAllocator& theAllocator);
75
76 //! Breaks the execution if the break signal
77 //! is indicated by myProgressIndicator.
78 Standard_EXPORT void UserBreak() const;
79
80 Standard_EXPORT virtual void Clear();
81
82
83 BOPCol_BaseAllocator myAllocator;
84 Standard_Integer myErrorStatus;
85 Standard_Integer myWarningStatus;
86 Standard_Boolean myRunParallel;
87 Handle(Message_ProgressIndicator) myProgressIndicator;
88
89
90private:
91
92
93
94
95
96};
97
98
99
100
101
102
103
104#endif // _BRepAlgoAPI_Algo_HeaderFile