From c8050ec0d5df002543f0bc82f85d1fa7f085ffcd Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 9 Feb 2010 11:03:51 +0000 Subject: [PATCH] + // 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(); } --- src/SMDS/SMDS_MeshElement.hxx | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.39.2