Version: 6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

SMESH.Controls.Filter Class Reference

#include <SMESH_ControlsDef.hxx>

Public Types

typedef std::vector< long > TIdSequence

Public Member Functions

 Filter ()
virtual ~Filter ()
virtual void SetPredicate (PredicatePtr thePred)
virtual void GetElementsId (const SMDS_Mesh *theMesh, TIdSequence &theSequence)

Static Public Member Functions

static void GetElementsId (const SMDS_Mesh *theMesh, PredicatePtr thePredicate, TIdSequence &theSequence)

Protected Attributes

PredicatePtr myPredicate

Detailed Description

Definition at line 908 of file SMESH_ControlsDef.hxx.


Member Typedef Documentation

typedef std::vector<long> SMESH.Controls.Filter.TIdSequence

Definition at line 914 of file SMESH_ControlsDef.hxx.


Constructor & Destructor Documentation

Filter::Filter ( )

Definition at line 3001 of file SMESH_Controls.cxx.

{}
Filter::~Filter ( ) [virtual]

Definition at line 3004 of file SMESH_Controls.cxx.

{}

Member Function Documentation

void Filter::GetElementsId ( const SMDS_Mesh theMesh,
Filter::TIdSequence theSequence 
) [virtual]

Definition at line 3063 of file SMESH_Controls.cxx.

References SMESH.Controls.Filter.myPredicate.

Referenced by SMESH_MeshEditor_i.RemoveOrphanNodes().

{
  GetElementsId(theMesh,myPredicate,theSequence);
}
void Filter::GetElementsId ( const SMDS_Mesh theMesh,
PredicatePtr  thePredicate,
TIdSequence theSequence 
) [static]

Definition at line 3029 of file SMESH_Controls.cxx.

References SMDS_Mesh.edgesIterator(), SMDS_Mesh.facesIterator(), SMDS_Mesh.nodesIterator(), SMDSAbs_All, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, SMDSAbs_Volume, and SMDS_Mesh.volumesIterator().

{
  theSequence.clear();

  if ( !theMesh || !thePredicate )
    return;

  thePredicate->SetMesh( theMesh );

  SMDSAbs_ElementType aType = thePredicate->GetType();
  switch(aType){
  case SMDSAbs_Node:
    FillSequence<const SMDS_MeshNode*>(theMesh->nodesIterator(),thePredicate,theSequence);
    break;
  case SMDSAbs_Edge:
    FillSequence<const SMDS_MeshElement*>(theMesh->edgesIterator(),thePredicate,theSequence);
    break;
  case SMDSAbs_Face:
    FillSequence<const SMDS_MeshElement*>(theMesh->facesIterator(),thePredicate,theSequence);
    break;
  case SMDSAbs_Volume:
    FillSequence<const SMDS_MeshElement*>(theMesh->volumesIterator(),thePredicate,theSequence);
    break;
  case SMDSAbs_All:
    FillSequence<const SMDS_MeshElement*>(theMesh->edgesIterator(),thePredicate,theSequence);
    FillSequence<const SMDS_MeshElement*>(theMesh->facesIterator(),thePredicate,theSequence);
    FillSequence<const SMDS_MeshElement*>(theMesh->volumesIterator(),thePredicate,theSequence);
    break;
  }
}
void Filter::SetPredicate ( PredicatePtr  thePred) [virtual]

Definition at line 3007 of file SMESH_Controls.cxx.

References SMESH.Controls.Filter.myPredicate.

Referenced by SMESH.Filter_i.SetPredicate().

{
  myPredicate = thePredicate;
}

Field Documentation

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