Version: 6.3.1
Public Member Functions

MyElemIterator Class Reference

Inheritance diagram for MyElemIterator:
Inheritance graph
[legend]

Public Member Functions

 MyElemIterator (const set< const SMESHDS_SubMesh * > &theSubMeshes)
SMDS_ElemIteratorPtr getElements (const SMESHDS_SubMesh *theSubMesh) const
bool more ()
 Return true if and only if there are other object in this iterator.
bool more ()
 Return true if and only if there are other object in this iterator.
const SMDS_MeshElementnext ()
 Return the current object and step to the next one.
const SMDS_MeshElementnext ()
 Return the current object and step to the next one.
virtual void remove ()
 Delete the current element and step to the next one.

Detailed Description

Definition at line 321 of file SMESHDS_SubMesh.cxx.


Constructor & Destructor Documentation

MyElemIterator.MyElemIterator ( const set< const SMESHDS_SubMesh * > &  theSubMeshes)

Definition at line 324 of file SMESHDS_SubMesh.cxx.


Member Function Documentation

SMDS_ElemIteratorPtr MyElemIterator.getElements ( const SMESHDS_SubMesh theSubMesh) const [virtual]

Implements MyIterator< const SMDS_MeshElement * >.

Definition at line 326 of file SMESHDS_SubMesh.cxx.

References SMESHDS_SubMesh.GetElements().

  { return theSubMesh->GetElements(); }
bool MyIterator< const SMDS_MeshElement * >.more ( ) [virtual, inherited]

Return true if and only if there are other object in this iterator.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 78 of file SMESHDS_GroupOnGeom.cxx.

  {
    if ( myType == SMDSAbs_Node && myNodeIt )
      return myNodeIt->more();
    return ( myElem != 0 );
  }
bool MyIterator< const SMDS_MeshElement * >.more ( ) [virtual, inherited]

Return true if and only if there are other object in this iterator.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 290 of file SMESHDS_SubMesh.cxx.

  {
    while (( !myElemIt.get() || !myElemIt->more() ) && mySubIt != mySubEnd)
    {
      myElemIt = getElements(*mySubIt);
      mySubIt++;
    }
    myMore = myElemIt.get() && myElemIt->more();
    return myMore;
  }
const SMDS_MeshElement* MyIterator< const SMDS_MeshElement * >.next ( ) [virtual, inherited]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 84 of file SMESHDS_GroupOnGeom.cxx.

  {
    if ( myType == SMDSAbs_Node && myNodeIt )
      return myNodeIt->next();
    const SMDS_MeshElement* res = myElem;
    myElem = 0;
    while ( myElemIt && myElemIt->more() ) {
      myElem = myElemIt->next();
      if ( myElem && myElem->GetType() == myType )
        break;
      else
        myElem = 0;
    }
    return res;
  }
const SMDS_MeshElement * MyIterator< const SMDS_MeshElement * >.next ( ) [virtual, inherited]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 300 of file SMESHDS_SubMesh.cxx.

  {
    VALUE elem = 0;
    if ( myMore )
      elem = myElemIt->next();
    return elem;
  }
virtual void SMDS_Iterator< const SMDS_MeshElement * >.remove ( ) [virtual, inherited]

Delete the current element and step to the next one.

Definition at line 44 of file SMDS_Iterator.hxx.

{}
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