#include "SMESH_Group_i.hxx"#include "SMESH_Mesh_i.hxx"#include "SMESH_Gen_i.hxx"#include "SMESH_Group.hxx"#include "SMESHDS_Group.hxx"#include "SMESHDS_GroupOnGeom.hxx"#include "SMDSAbs_ElementType.hxx"#include "SMESH_Filter_i.hxx"#include "SMESH_PythonDump.hxx"#include <CORBA_SERVER_HEADER(SMESH_Filter)>#include "utilities.h"
Go to the source code of this file.
Typedefs | |
| typedef bool(SMESHDS_Group::* | TFunChangeGroup )(const int) |
Functions | |
| CORBA::Long | ChangeByPredicate (SMESH::Predicate_i *thePredicate, SMESHDS_GroupBase *theGroupBase, TFunChangeGroup theFun) |
| typedef bool(SMESHDS_Group::* TFunChangeGroup)(const int) |
Definition at line 308 of file SMESH_Group_i.cxx.
| CORBA::Long ChangeByPredicate | ( | SMESH::Predicate_i * | thePredicate, |
| SMESHDS_GroupBase * | theGroupBase, | ||
| TFunChangeGroup | theFun | ||
| ) |
Definition at line 311 of file SMESH_Group_i.cxx.
References SMESH.Filter_i.GetElementsId(), and SMESHDS_GroupBase.GetMesh().
Referenced by SMESH_Group_i.AddByPredicate(), and SMESH_Group_i.RemoveByPredicate().
{
CORBA::Long aNb = 0;
if(SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>(theGroupBase)){
SMESH::Controls::Filter::TIdSequence aSequence;
const SMDS_Mesh* aMesh = theGroupBase->GetMesh();
SMESH::Filter_i::GetElementsId(thePredicate,aMesh,aSequence);
CORBA::Long i = 0, iEnd = aSequence.size();
for(; i < iEnd; i++)
if((aGroupDS->*theFun)(aSequence[i]))
aNb++;
return aNb;
}
return aNb;
}