Version: 6.3.1
Typedefs | Functions

src/SMESH_I/SMESH_Group_i.cxx File Reference

#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"
Include dependency graph for SMESH_Group_i.cxx:

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 Documentation

typedef bool(SMESHDS_Group::* TFunChangeGroup)(const int)

Definition at line 308 of file SMESH_Group_i.cxx.


Function Documentation

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;
}
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS