#include <SMESH_HypoFilter.hxx>

Data Structures | |
| struct | ApplicablePredicate |
| struct | DimPredicate |
| struct | InstancePredicate |
| struct | IsAssignedToPredicate |
| struct | IsAuxiliaryPredicate |
| struct | IsMoreLocalThanPredicate |
| struct | NamePredicate |
| struct | templPredicate |
| struct | TypePredicate |
Public Member Functions | |
| SMESH_HypoFilter () | |
| SMESH_HypoFilter (SMESH_HypoPredicate *aPredicate, bool notNagate=true) | |
| SMESH_HypoFilter & | Init (SMESH_HypoPredicate *aPredicate, bool notNagate=true) |
| SMESH_HypoFilter & | And (SMESH_HypoPredicate *aPredicate) |
| SMESH_HypoFilter & | AndNot (SMESH_HypoPredicate *aPredicate) |
| SMESH_HypoFilter & | Or (SMESH_HypoPredicate *aPredicate) |
| SMESH_HypoFilter & | OrNot (SMESH_HypoPredicate *aPredicate) |
| bool | IsEmpty () const |
| bool | IsOk (const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const |
| check aHyp or/and aShape it is assigned to | |
| bool | IsAny () const |
| return true if contains no predicates | |
| ~SMESH_HypoFilter () | |
Static Public Member Functions | |
| static SMESH_HypoPredicate * | IsAlgo () |
| static SMESH_HypoPredicate * | IsAuxiliary () |
| static SMESH_HypoPredicate * | IsApplicableTo (const TopoDS_Shape &theShape) |
| static SMESH_HypoPredicate * | IsAssignedTo (const TopoDS_Shape &theShape) |
| static SMESH_HypoPredicate * | Is (const SMESH_Hypothesis *theHypo) |
| static SMESH_HypoPredicate * | IsGlobal (const TopoDS_Shape &theMainShape) |
| static SMESH_HypoPredicate * | IsMoreLocalThan (const TopoDS_Shape &theShape) |
| static SMESH_HypoPredicate * | HasName (const std::string &theName) |
| static SMESH_HypoPredicate * | HasDim (const int theDim) |
| static SMESH_HypoPredicate * | HasType (const int theHypType) |
Protected Types | |
| enum | Logical { AND, AND_NOT, OR, OR_NOT } |
| enum | Comparison { EQUAL, NOT_EQUAL, MORE, LESS } |
Protected Member Functions | |
| SMESH_HypoFilter (const SMESH_HypoFilter &other) | |
| void | add (Logical bool_op, SMESH_HypoPredicate *pred) |
Protected Attributes | |
| std::list< SMESH_HypoPredicate * > | myPredicates |
Definition at line 54 of file SMESH_HypoFilter.hxx.
enum SMESH_HypoFilter::Comparison [protected] |
enum SMESH_HypoFilter::Logical [protected] |
| SMESH_HypoFilter::SMESH_HypoFilter | ( | ) |
Definition at line 152 of file SMESH_HypoFilter.cxx.
{
}
| SMESH_HypoFilter::SMESH_HypoFilter | ( | SMESH_HypoPredicate * | aPredicate, |
| bool | notNagate = true |
||
| ) |
Definition at line 161 of file SMESH_HypoFilter.cxx.
| SMESH_HypoFilter::~SMESH_HypoFilter | ( | ) |
Definition at line 360 of file SMESH_HypoFilter.cxx.
References batchmode_smesh.Init().
{
Init(0);
}
| SMESH_HypoFilter.SMESH_HypoFilter | ( | const SMESH_HypoFilter & | other | ) | [protected] |
Definition at line 105 of file SMESH_HypoFilter.hxx.
{}
| void SMESH_HypoFilter.add | ( | Logical | bool_op, |
| SMESH_HypoPredicate * | pred | ||
| ) | [protected] |
Definition at line 107 of file SMESH_HypoFilter.hxx.
References SMESH_HypoPredicate._logical_op.
{
if ( pred ) {
pred->_logical_op = bool_op;
myPredicates.push_back( pred );
}
}
| SMESH_HypoFilter & SMESH_HypoFilter::And | ( | SMESH_HypoPredicate * | aPredicate | ) |
Definition at line 171 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), SMESH_Gen.GetAlgo(), and SMESH_subMesh.GetSimilarAttached().
| SMESH_HypoFilter & SMESH_HypoFilter::AndNot | ( | SMESH_HypoPredicate * | aPredicate | ) |
Definition at line 182 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), SMESH_subMesh.GetSimilarAttached(), and SMESH_Algo.InitCompatibleHypoFilter().
| SMESH_HypoPredicate * SMESH_HypoFilter::HasDim | ( | const int | theDim | ) | [static] |
Definition at line 276 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.GetSimilarAttached().
{
return new DimPredicate( EQUAL, theDim );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::HasName | ( | const std::string & | theName | ) | [static] |
Definition at line 266 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.GetSimilarAttached(), StdMeshers_Regular_1D.getVertexHyp(), SMESH_Algo.InitCompatibleHypoFilter(), and SMESH_Mesh.IsNotConformAllowed().
{
return new NamePredicate( theName );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::HasType | ( | const int | theHypType | ) | [static] |
Definition at line 306 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), and SMESH_subMesh.GetSimilarAttached().
{
return new TypePredicate( EQUAL, theHypType );
}
| SMESH_HypoFilter & SMESH_HypoFilter::Init | ( | SMESH_HypoPredicate * | aPredicate, |
| bool | notNagate = true |
||
| ) |
Definition at line 343 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), SMESH_subMesh.GetSimilarAttached(), and SMESH_Algo.InitCompatibleHypoFilter().
{
list<SMESH_HypoPredicate*>::const_iterator pred = myPredicates.begin();
for ( ; pred != myPredicates.end(); ++pred )
delete *pred;
myPredicates.clear();
add( notNagate ? AND : AND_NOT, aPredicate );
return *this;
}
| SMESH_HypoPredicate * SMESH_HypoFilter::Is | ( | const SMESH_Hypothesis * | theHypo | ) | [static] |
Definition at line 215 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), SMESH_subMesh.GetSimilarAttached(), and SMESH_Gen.IsGlobalHypothesis().
{
return new InstancePredicate( theHypo );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::IsAlgo | ( | ) | [static] |
Definition at line 225 of file SMESH_HypoFilter.cxx.
References SMESHDS_Hypothesis.PARAM_ALGO.
Referenced by SMESH_subMesh.AlgoStateEngine(), and SMESH_Gen.GetAlgo().
{
return new TypePredicate( MORE, SMESHDS_Hypothesis::PARAM_ALGO );
}
| bool SMESH_HypoFilter.IsAny | ( | ) | const |
return true if contains no predicates
Definition at line 90 of file SMESH_HypoFilter.hxx.
{ return myPredicates.empty(); }
| SMESH_HypoPredicate * SMESH_HypoFilter::IsApplicableTo | ( | const TopoDS_Shape & | theShape | ) | [static] |
Definition at line 286 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), SMESH_Gen.GetAlgo(), and SMESH_subMesh.GetSimilarAttached().
{
return new ApplicablePredicate( theShape );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::IsAssignedTo | ( | const TopoDS_Shape & | theShape | ) | [static] |
Definition at line 256 of file SMESH_HypoFilter.cxx.
{
return new IsAssignedToPredicate( theShape );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::IsAuxiliary | ( | ) | [static] |
Definition at line 235 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.GetSimilarAttached(), and SMESH_Algo.InitCompatibleHypoFilter().
{
return new IsAuxiliaryPredicate();
}
| bool SMESH_HypoFilter.IsEmpty | ( | ) | const |
Definition at line 80 of file SMESH_HypoFilter.hxx.
{ return myPredicates.empty(); }
| SMESH_HypoPredicate * SMESH_HypoFilter::IsGlobal | ( | const TopoDS_Shape & | theMainShape | ) | [static] |
Definition at line 246 of file SMESH_HypoFilter.cxx.
{
return new IsAssignedToPredicate( theMainShape );
}
| SMESH_HypoPredicate * SMESH_HypoFilter::IsMoreLocalThan | ( | const TopoDS_Shape & | theShape | ) | [static] |
Definition at line 296 of file SMESH_HypoFilter.cxx.
{
return new IsMoreLocalThanPredicate( theShape );
}
| bool SMESH_HypoFilter::IsOk | ( | const SMESH_Hypothesis * | aHyp, |
| const TopoDS_Shape & | aShape | ||
| ) | const [virtual] |
check aHyp or/and aShape it is assigned to
Implements SMESH_HypoPredicate.
Definition at line 316 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_Mesh.GetHypotheses().
{
if ( myPredicates.empty() )
return true;
bool ok = ( myPredicates.front()->_logical_op <= AND_NOT );
list<SMESH_HypoPredicate*>::const_iterator pred = myPredicates.begin();
for ( ; pred != myPredicates.end(); ++pred )
{
bool ok2 = (*pred)->IsOk( aHyp, aShape );
switch ( (*pred)->_logical_op ) {
case AND: ok = ok && ok2; break;
case AND_NOT: ok = ok && !ok2; break;
case OR: ok = ok || ok2; break;
case OR_NOT: ok = ok || !ok2; break;
default:;
}
}
return ok;
}
| SMESH_HypoFilter & SMESH_HypoFilter::Or | ( | SMESH_HypoPredicate * | aPredicate | ) |
Definition at line 193 of file SMESH_HypoFilter.cxx.
Referenced by SMESH_subMesh.AlgoStateEngine(), and SMESH_Algo.InitCompatibleHypoFilter().
| SMESH_HypoFilter & SMESH_HypoFilter::OrNot | ( | SMESH_HypoPredicate * | aPredicate | ) |
Definition at line 204 of file SMESH_HypoFilter.cxx.
std::list<SMESH_HypoPredicate*> SMESH_HypoFilter.myPredicates [protected] |
Definition at line 98 of file SMESH_HypoFilter.hxx.