From: eap Date: Tue, 9 Feb 2010 11:03:51 +0000 (+0000) Subject: + // std-like iteration on nodes X-Git-Tag: V5_1_4a1~102 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c8050ec0d5df002543f0bc82f85d1fa7f085ffcd;p=modules%2Fsmesh.git + // std-like iteration on nodes + typedef SMDS_StdIterator< const SMDS_MeshNode*, SMDS_ElemIteratorPtr > iterator; + iterator begin_nodes() const { return iterator( nodesIterator() ); } + iterator end_nodes() const { return iterator(); } --- diff --git a/src/SMDS/SMDS_MeshElement.hxx b/src/SMDS/SMDS_MeshElement.hxx index 806224d2f..8c8d353eb 100644 --- a/src/SMDS/SMDS_MeshElement.hxx +++ b/src/SMDS/SMDS_MeshElement.hxx @@ -32,6 +32,7 @@ #include "SMDS_MeshObject.hxx" #include "SMDS_ElemIterator.hxx" #include "SMDS_MeshElementIDFactory.hxx" +#include "SMDS_StdIterator.hxx" #include #include @@ -55,6 +56,11 @@ public: SMDS_ElemIteratorPtr facesIterator() const; virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const; + // std-like iteration on nodes + typedef SMDS_StdIterator< const SMDS_MeshNode*, SMDS_ElemIteratorPtr > iterator; + iterator begin_nodes() const { return iterator( nodesIterator() ); } + iterator end_nodes() const { return iterator(); } + virtual int NbNodes() const; virtual int NbEdges() const; virtual int NbFaces() const;