Version: 6.3.1
Public Member Functions

MyNodeIterator Class Reference

Inheritance diagram for MyNodeIterator:
Inheritance graph
[legend]

Public Member Functions

 MyNodeIterator (const set< const SMESHDS_SubMesh * > &theSubMeshes)
SMDS_NodeIteratorPtr 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_MeshNodenext ()
 Return the current object and step to the next one.
virtual void remove ()
 Delete the current element and step to the next one.
virtual void remove ()
 Delete the current element and step to the next one.

Detailed Description

Definition at line 334 of file SMESHDS_SubMesh.cxx.


Constructor & Destructor Documentation

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

Definition at line 337 of file SMESHDS_SubMesh.cxx.

    :MyIterator<const SMDS_MeshNode*>( theSubMeshes ) {}

Member Function Documentation

SMDS_NodeIteratorPtr MyNodeIterator.getElements ( const SMESHDS_SubMesh theSubMesh) const [virtual]

Implements MyIterator< const SMDS_MeshNode * >.

Definition at line 339 of file SMESHDS_SubMesh.cxx.

References SMESHDS_SubMesh.GetNodes().

  { return theSubMesh->GetNodes(); }
bool MyIterator< const SMDS_MeshNode * >.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.

References MyIterator< VALUE >.myElem, MyIterator< VALUE >.myNodeIt, MyIterator< VALUE >.myType, and SMDSAbs_Node.

  {
    if ( myType == SMDSAbs_Node && myNodeIt )
      return myNodeIt->more();
    return ( myElem != 0 );
  }
bool MyIterator< const SMDS_MeshNode * >.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_MeshNode * MyIterator< const SMDS_MeshNode * >.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;
  }
const SMDS_MeshElement* MyIterator< const SMDS_MeshNode * >.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.

References SMDS_MeshElement.GetType(), MyIterator< VALUE >.myElem, MyIterator< VALUE >.myElemIt, MyIterator< VALUE >.myNodeIt, MyIterator< VALUE >.myType, SMESH_AdvancedEditor.res, and SMDSAbs_Node.

  {
    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;
  }
virtual void SMDS_Iterator< const SMDS_MeshNode * >.remove ( ) [virtual, inherited]

Delete the current element and step to the next one.

Definition at line 44 of file SMDS_Iterator.hxx.

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