Back to index

salome-smesh  6.5.0
Public Member Functions
MyElemIterator Class Reference
Inheritance diagram for MyElemIterator:
Inheritance graph
[legend]
Collaboration diagram for MyElemIterator:
Collaboration graph
[legend]

List of all members.

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_MeshElement * next ()
 Return the current object and step to the next one.
const SMDS_MeshElement * next ()
 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 326 of file SMESHDS_SubMesh.cxx.


Constructor & Destructor Documentation

MyElemIterator::MyElemIterator ( const set< const SMESHDS_SubMesh * > &  theSubMeshes) [inline]

Definition at line 329 of file SMESHDS_SubMesh.cxx.


Member Function Documentation

SMDS_ElemIteratorPtr MyElemIterator::getElements ( const SMESHDS_SubMesh *  theSubMesh) const [inline, virtual]

Implements MyIterator< const SMDS_MeshElement * >.

Definition at line 331 of file SMESHDS_SubMesh.cxx.

  { return theSubMesh->GetElements(); }
bool MyIterator< const SMDS_MeshElement * >::more ( ) [inline, 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 ( ) [inline, virtual, inherited]

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

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 295 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 ( ) [inline, 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 ( ) [inline, virtual, inherited]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 305 of file SMESHDS_SubMesh.cxx.

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

Delete the current element and step to the next one.

Definition at line 44 of file SMDS_Iterator.hxx.

{}

The documentation for this class was generated from the following file: