File indexing completed on 2026-06-19 08:28:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _BOPAlgo_Options_HeaderFile
0016 #define _BOPAlgo_Options_HeaderFile
0017
0018 #include <Message_Report.hxx>
0019 #include <Standard_OStream.hxx>
0020
0021 #include <NCollection_BaseAllocator.hxx>
0022
0023 class Message_ProgressScope;
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class BOPAlgo_Options
0037 {
0038 public:
0039 DEFINE_STANDARD_ALLOC
0040
0041
0042 Standard_EXPORT BOPAlgo_Options();
0043
0044
0045 Standard_EXPORT BOPAlgo_Options(const Handle(NCollection_BaseAllocator)& theAllocator);
0046
0047
0048 Standard_EXPORT virtual ~BOPAlgo_Options();
0049
0050
0051 const Handle(NCollection_BaseAllocator)& Allocator() const { return myAllocator; }
0052
0053
0054
0055 virtual void Clear() { myReport->Clear(); }
0056
0057 public:
0058
0059
0060
0061 void AddError(const Handle(Message_Alert)& theAlert)
0062 {
0063 myReport->AddAlert(Message_Fail, theAlert);
0064 }
0065
0066
0067 void AddWarning(const Handle(Message_Alert)& theAlert)
0068 {
0069 myReport->AddAlert(Message_Warning, theAlert);
0070 }
0071
0072
0073 Standard_Boolean HasErrors() const { return !myReport->GetAlerts(Message_Fail).IsEmpty(); }
0074
0075
0076 Standard_Boolean HasError(const Handle(Standard_Type)& theType) const
0077 {
0078 return myReport->HasAlert(theType, Message_Fail);
0079 }
0080
0081
0082 Standard_Boolean HasWarnings() const { return !myReport->GetAlerts(Message_Warning).IsEmpty(); }
0083
0084
0085 Standard_Boolean HasWarning(const Handle(Standard_Type)& theType) const
0086 {
0087 return myReport->HasAlert(theType, Message_Warning);
0088 }
0089
0090
0091 const Handle(Message_Report)& GetReport() const { return myReport; }
0092
0093
0094 Standard_EXPORT void DumpErrors(Standard_OStream& theOS) const;
0095
0096
0097 Standard_EXPORT void DumpWarnings(Standard_OStream& theOS) const;
0098
0099
0100 void ClearWarnings() { myReport->Clear(Message_Warning); }
0101
0102 public:
0103
0104
0105
0106 Standard_EXPORT static Standard_Boolean GetParallelMode();
0107
0108
0109 Standard_EXPORT static void SetParallelMode(const Standard_Boolean theNewMode);
0110
0111
0112
0113
0114 void SetRunParallel(const Standard_Boolean theFlag) { myRunParallel = theFlag; }
0115
0116
0117 Standard_Boolean RunParallel() const { return myRunParallel; }
0118
0119 public:
0120
0121
0122
0123 Standard_EXPORT void SetFuzzyValue(const Standard_Real theFuzz);
0124
0125
0126 Standard_Real FuzzyValue() const { return myFuzzyValue; }
0127
0128 public:
0129
0130
0131
0132 void SetUseOBB(const Standard_Boolean theUseOBB) { myUseOBB = theUseOBB; }
0133
0134
0135 Standard_Boolean UseOBB() const { return myUseOBB; }
0136
0137 protected:
0138
0139
0140 Standard_EXPORT Standard_Boolean UserBreak(const Message_ProgressScope& thePS);
0141
0142 protected:
0143 Handle(NCollection_BaseAllocator) myAllocator;
0144 Handle(Message_Report) myReport;
0145 Standard_Boolean myRunParallel;
0146 Standard_Real myFuzzyValue;
0147 Standard_Boolean myUseOBB;
0148 };
0149
0150 #endif