File indexing completed on 2025-01-18 10:03:04
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
0040 DEFINE_STANDARD_ALLOC
0041
0042
0043 Standard_EXPORT BOPAlgo_Options();
0044
0045
0046 Standard_EXPORT BOPAlgo_Options(const Handle(NCollection_BaseAllocator)& theAllocator);
0047
0048
0049 Standard_EXPORT virtual ~BOPAlgo_Options();
0050
0051
0052 const Handle(NCollection_BaseAllocator)& Allocator() const
0053 {
0054 return myAllocator;
0055 }
0056
0057
0058
0059 virtual void Clear()
0060 {
0061 myReport->Clear();
0062 }
0063
0064 public:
0065
0066
0067
0068 void AddError (const Handle(Message_Alert)& theAlert)
0069 {
0070 myReport->AddAlert (Message_Fail, theAlert);
0071 }
0072
0073
0074 void AddWarning (const Handle(Message_Alert)& theAlert)
0075 {
0076 myReport->AddAlert (Message_Warning, theAlert);
0077 }
0078
0079
0080 Standard_Boolean HasErrors() const
0081 {
0082 return ! myReport->GetAlerts(Message_Fail).IsEmpty();
0083 }
0084
0085
0086 Standard_Boolean HasError (const Handle(Standard_Type)& theType) const
0087 {
0088 return myReport->HasAlert(theType, Message_Fail);
0089 }
0090
0091
0092 Standard_Boolean HasWarnings() const
0093 {
0094 return ! myReport->GetAlerts(Message_Warning).IsEmpty();
0095 }
0096
0097
0098 Standard_Boolean HasWarning (const Handle(Standard_Type)& theType) const
0099 {
0100 return myReport->HasAlert(theType, Message_Warning);
0101 }
0102
0103
0104 const Handle(Message_Report)& GetReport () const { return myReport; }
0105
0106
0107 Standard_EXPORT void DumpErrors(Standard_OStream& theOS) const;
0108
0109
0110 Standard_EXPORT void DumpWarnings(Standard_OStream& theOS) const;
0111
0112
0113 void ClearWarnings()
0114 {
0115 myReport->Clear (Message_Warning);
0116 }
0117
0118 public:
0119
0120
0121
0122 Standard_EXPORT static Standard_Boolean GetParallelMode();
0123
0124
0125 Standard_EXPORT static void SetParallelMode(const Standard_Boolean theNewMode);
0126
0127
0128
0129
0130 void SetRunParallel(const Standard_Boolean theFlag)
0131 {
0132 myRunParallel = theFlag;
0133 }
0134
0135
0136 Standard_Boolean RunParallel() const
0137 {
0138 return myRunParallel;
0139 }
0140
0141 public:
0142
0143
0144
0145 Standard_EXPORT void SetFuzzyValue(const Standard_Real theFuzz);
0146
0147
0148 Standard_Real FuzzyValue() const
0149 {
0150 return myFuzzyValue;
0151 }
0152
0153 public:
0154
0155
0156
0157 void SetUseOBB(const Standard_Boolean theUseOBB)
0158 {
0159 myUseOBB = theUseOBB;
0160 }
0161
0162
0163 Standard_Boolean UseOBB() const
0164 {
0165 return myUseOBB;
0166 }
0167
0168 protected:
0169
0170
0171 Standard_EXPORT Standard_Boolean UserBreak(const Message_ProgressScope& thePS);
0172
0173 protected:
0174
0175 Handle(NCollection_BaseAllocator) myAllocator;
0176 Handle(Message_Report) myReport;
0177 Standard_Boolean myRunParallel;
0178 Standard_Real myFuzzyValue;
0179 Standard_Boolean myUseOBB;
0180
0181 };
0182
0183 #endif