Go to the documentation of this file.
27 #ifndef SMESH_HypoFilter_HeaderFile
28 #define SMESH_HypoFilter_HeaderFile
38 #include <TopoDS_Shape.hxx>
46 const TopoDS_Shape& aShape)
const = 0;
84 const TopoDS_Shape& aShape)
const;
88 bool IsAny()
const {
return myPredicates.empty(); }
113 myPredicates.push_back( pred );
119 template <
typename TValue>
126 if ( _comp == EQUAL )
return _val == Value( aHyp );
127 else if ( _comp == NOT_EQUAL )
return _val != Value( aHyp );
128 else if ( _comp == MORE )
return _val < Value( aHyp );
129 else return _val > Value( aHyp );
137 const TopoDS_Shape& aShape)
const;
142 { _comp = comp; _val = hypType; }
148 { _comp = comp; _val = dim; }
156 const TopoDS_Shape& aShape)
const;
163 const TopoDS_Shape& aShape)
const;
170 const TopoDS_Shape& aShape)
const;
177 const TopoDS_Shape& aShape)
const;
182 const TopoDS_Shape& aShape)
const;
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
static SMESH_HypoPredicate * IsApplicableTo(const TopoDS_Shape &theShape)
static SMESH_HypoPredicate * Is(const SMESH_Hypothesis *theHypo)
static SMESH_HypoPredicate * HasName(const std::string &theName)
virtual bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &) const
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
int Value(const SMESH_Hypothesis *aHyp) const
IsMoreLocalThanPredicate(const TopoDS_Shape &shape)
NamePredicate(std::string name)
static SMESH_HypoPredicate * IsAuxiliary()
IsAssignedToPredicate(const TopoDS_Shape &mainShape)
SMESH_HypoFilter & Init(SMESH_HypoPredicate *aPredicate, bool notNagate=true)
SMESH_HypoFilter & And(SMESH_HypoPredicate *aPredicate)
InstancePredicate(const SMESH_Hypothesis *hypo)
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
SMESH_HypoFilter & OrNot(SMESH_HypoPredicate *aPredicate)
std::list< SMESH_HypoPredicate * > myPredicates
static SMESH_HypoPredicate * IsAlgo()
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
TopAbs_ShapeEnum _shapeType
ApplicablePredicate(const TopoDS_Shape &theShape)
bool IsAny() const
return true if contains no predicates
static SMESH_HypoPredicate * IsAssignedTo(const TopoDS_Shape &theShape)
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
virtual TValue Value(const SMESH_Hypothesis *aHyp) const =0
TypePredicate(Comparison comp, int hypType)
static SMESH_HypoPredicate * IsMoreLocalThan(const TopoDS_Shape &theShape)
static SMESH_HypoPredicate * IsGlobal(const TopoDS_Shape &theMainShape)
virtual bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const =0
static SMESH_HypoPredicate * HasType(const int theHypType)
SMESH_HypoFilter & AndNot(SMESH_HypoPredicate *aPredicate)
void add(Logical bool_op, SMESH_HypoPredicate *pred)
SMESH_HypoFilter(const SMESH_HypoFilter &other)
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const
check aHyp or/and aShape it is assigned to
const SMESH_Hypothesis * _hypo
DimPredicate(Comparison comp, int dim)
virtual ~SMESH_HypoPredicate()
int Value(const SMESH_Hypothesis *aHyp) const
static SMESH_HypoPredicate * HasDim(const int theDim)
SMESH_HypoFilter(SMESH_HypoPredicate *aPredicate, bool notNagate=true)
SMESH_HypoFilter & Or(SMESH_HypoPredicate *aPredicate)