Back to index

salome-smesh  6.5.0
Public Member Functions | Private Attributes
_MyEdgeIterator Class Reference

=================================================================== More...

Inheritance diagram for _MyEdgeIterator:
Inheritance graph
[legend]
Collaboration diagram for _MyEdgeIterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 _MyEdgeIterator (const SMDS_FaceOfNodes *face)
virtual bool more ()
 Return true if and only if there are other object in this iterator.
virtual const SMDS_MeshElement * next ()
 Return the current object and step to the next one.
 _MyEdgeIterator (const SMDS_MeshFace *face)
virtual bool more ()
 Return true if and only if there are other object in this iterator.
virtual const SMDS_MeshElement * next ()
 Return the current object and step to the next one.
 _MyEdgeIterator (const SMDS_QuadraticFaceOfNodes *face)
virtual bool more ()
 Return true if and only if there are other object in this iterator.
virtual 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.

Private Attributes

vector< const SMDS_MeshElement * > myElems
int myIndex

Detailed Description

===================================================================

Iterator on edges of face ===================================================================

Definition at line 90 of file SMDS_FaceOfNodes.cxx.


Constructor & Destructor Documentation

_MyEdgeIterator::_MyEdgeIterator ( const SMDS_FaceOfNodes *  face) [inline]

Definition at line 95 of file SMDS_FaceOfNodes.cxx.

                                               :myIndex(0) {
    myElems.reserve( face->NbNodes() );
    for ( int i = 0; i < face->NbNodes(); ++i ) {
      const SMDS_MeshElement* edge =
        SMDS_Mesh::FindEdge( face->GetNode( i ), face->GetNodeWrap( i + 1 ));
      if ( edge )
        myElems.push_back( edge );
    }
  }
_MyEdgeIterator::_MyEdgeIterator ( const SMDS_MeshFace *  face) [inline]

Definition at line 155 of file SMDS_PolygonalFaceOfNodes.cxx.

                                            :myIndex(0) {
    myElems.reserve( face->NbNodes() );
    for ( int i = 0; i < face->NbNodes(); ++i ) {
      const SMDS_MeshElement* edge =
        SMDS_Mesh::FindEdge( face->GetNode( i ), face->GetNodeWrap( i + 1 ));
      if ( edge )
        myElems.push_back( edge );
    }
  }
_MyEdgeIterator::_MyEdgeIterator ( const SMDS_QuadraticFaceOfNodes *  face) [inline]

Definition at line 258 of file SMDS_QuadraticFaceOfNodes.cxx.

                                                        :myIndex(0) {
    myElems.reserve( face->NbNodes() );
    SMDS_ElemIteratorPtr nIt = face->interlacedNodesElemIterator();
    const SMDS_MeshNode* n0 = face->GetNodeWrap( -1 );
    while ( nIt->more() ) {
      const SMDS_MeshNode* n1 = static_cast<const SMDS_MeshNode*>( nIt->next() );
      const SMDS_MeshElement* edge = SMDS_Mesh::FindEdge( n0, n1 );
      if ( edge )
        myElems.push_back( edge );
      n0 = n1;
    }
  }

Member Function Documentation

virtual bool _MyEdgeIterator::more ( ) [inline, virtual]

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

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 105 of file SMDS_FaceOfNodes.cxx.

{ return myIndex < myElems.size(); }
virtual bool _MyEdgeIterator::more ( ) [inline, virtual]

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

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 165 of file SMDS_PolygonalFaceOfNodes.cxx.

{ return myIndex < myElems.size(); }
virtual bool _MyEdgeIterator::more ( ) [inline, virtual]

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

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 271 of file SMDS_QuadraticFaceOfNodes.cxx.

{ return myIndex < myElems.size(); }
virtual const SMDS_MeshElement* _MyEdgeIterator::next ( ) [inline, virtual]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 108 of file SMDS_FaceOfNodes.cxx.

{ return myElems[ myIndex++ ]; }
virtual const SMDS_MeshElement* _MyEdgeIterator::next ( ) [inline, virtual]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 168 of file SMDS_PolygonalFaceOfNodes.cxx.

{ return myElems[ myIndex++ ]; }
virtual const SMDS_MeshElement* _MyEdgeIterator::next ( ) [inline, virtual]

Return the current object and step to the next one.

Implements SMDS_Iterator< const SMDS_MeshElement * >.

Definition at line 274 of file SMDS_QuadraticFaceOfNodes.cxx.

{ return myElems[ myIndex++ ]; }
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.

{}

Member Data Documentation

vector< const SMDS_MeshElement * > _MyEdgeIterator::myElems [private]

Definition at line 92 of file SMDS_FaceOfNodes.cxx.

int _MyEdgeIterator::myIndex [private]

Definition at line 93 of file SMDS_FaceOfNodes.cxx.


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