Version: 6.3.1
Public Member Functions | Private Attributes

_MyEdgeIterator Class Reference

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

Inheritance diagram for _MyEdgeIterator:
Inheritance graph
[legend]

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_MeshElementnext ()
 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_MeshElementnext ()
 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_MeshElementnext ()
 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)

Definition at line 95 of file SMDS_FaceOfNodes.cxx.

References SMESH_test.edge, SMDS_Mesh.FindEdge(), SMDS_FaceOfNodes.GetNode(), SMDS_MeshElement.GetNodeWrap(), and SMDS_FaceOfNodes.NbNodes().

                                               :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)

Definition at line 155 of file SMDS_PolygonalFaceOfNodes.cxx.

References SMESH_test.edge, SMDS_Mesh.FindEdge(), SMDS_MeshElement.GetNode(), SMDS_MeshElement.GetNodeWrap(), and SMDS_MeshElement.NbNodes().

                                            :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)

Definition at line 258 of file SMDS_QuadraticFaceOfNodes.cxx.

References SMESH_test.edge, SMDS_Mesh.FindEdge(), SMDS_MeshElement.GetNodeWrap(), SMDS_QuadraticFaceOfNodes.interlacedNodesElemIterator(), SMESH_AdvancedEditor.n1, and SMDS_QuadraticFaceOfNodes.NbNodes().

                                                        :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 ( ) [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 ( ) [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 bool _MyEdgeIterator.more ( ) [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 const SMDS_MeshElement* _MyEdgeIterator.next ( ) [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 ( ) [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 ( ) [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 ( ) [virtual, inherited]

Delete the current element and step to the next one.

Definition at line 44 of file SMDS_Iterator.hxx.

{}

Field Documentation

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

Definition at line 92 of file SMDS_FaceOfNodes.cxx.

Definition at line 93 of file SMDS_FaceOfNodes.cxx.

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