From c448c8ff749619177a1c040b92b9c28688f052b9 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 16 May 2013 16:10:37 +0000 Subject: [PATCH] - SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; --- src/SMDS/SMDS_QuadraticEdge.cxx | 27 ------------------------ src/SMDS/SMDS_QuadraticEdge.hxx | 2 -- src/SMDS/SMDS_QuadraticFaceOfNodes.cxx | 29 ++------------------------ src/SMDS/SMDS_QuadraticFaceOfNodes.hxx | 2 -- 4 files changed, 2 insertions(+), 58 deletions(-) diff --git a/src/SMDS/SMDS_QuadraticEdge.cxx b/src/SMDS/SMDS_QuadraticEdge.cxx index caf28eff8..b0f60c13e 100644 --- a/src/SMDS/SMDS_QuadraticEdge.cxx +++ b/src/SMDS/SMDS_QuadraticEdge.cxx @@ -116,21 +116,6 @@ namespace } }; - //======================================================================= - //class : _MyInterlacedNodeElemIterator - //purpose : - //======================================================================= - - class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator - { - SMDS_NodeIteratorPtr myItr; - public: - _MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr): - myItr( interlacedNodeItr ) {} - bool more() { return myItr->more(); } - const SMDS_MeshElement* next() { return myItr->next(); } - }; - //======================================================================= //class : _MyNodeIterator //purpose : @@ -154,18 +139,6 @@ SMDS_NodeIteratorPtr SMDS_QuadraticEdge::interlacedNodesIterator() const return SMDS_NodeIteratorPtr (new _MyInterlacedNodeIterator (myNodes)); } - -//======================================================================= -//function : interlacedNodesElemIterator -//purpose : -//======================================================================= - -SMDS_ElemIteratorPtr SMDS_QuadraticEdge::interlacedNodesElemIterator() const -{ - return SMDS_ElemIteratorPtr - (new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() )); -} - //======================================================================= //function : elementsIterator //purpose : diff --git a/src/SMDS/SMDS_QuadraticEdge.hxx b/src/SMDS/SMDS_QuadraticEdge.hxx index d6acab105..cdabd8f34 100644 --- a/src/SMDS/SMDS_QuadraticEdge.hxx +++ b/src/SMDS/SMDS_QuadraticEdge.hxx @@ -56,8 +56,6 @@ public: SMDS_NodeIteratorPtr interlacedNodesIterator() const; - SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; - protected: SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const; diff --git a/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx index 43093dafb..de4dbb474 100644 --- a/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx +++ b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx @@ -192,21 +192,6 @@ namespace { } }; - //======================================================================= - //class : _MyInterlacedNodeElemIterator - //purpose : - //======================================================================= - - class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator - { - SMDS_NodeIteratorPtr myItr; - public: - _MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr): - myItr( interlacedNodeItr ) {} - bool more() { return myItr->more(); } - const SMDS_MeshElement* next() { return myItr->next(); } - }; - //======================================================================= //class : _MyNodeIterator //purpose : @@ -234,16 +219,6 @@ SMDS_NodeIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesIterator() const (new _MyInterlacedNodeIterator (myNodes, myNodes.size()==6 ? triaInterlace : quadInterlace)); } -//======================================================================= -//function : interlacedNodesElemIterator -//purpose : -//======================================================================= - -SMDS_ElemIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesElemIterator() const -{ - return SMDS_ElemIteratorPtr - (new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() )); -} /// =================================================================== /*! * \brief Iterator on edges of face @@ -257,10 +232,10 @@ class _MyEdgeIterator : public SMDS_ElemIterator public: _MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) { myElems.reserve( face->NbNodes() ); - SMDS_ElemIteratorPtr nIt = face->interlacedNodesElemIterator(); + SMDS_NodeIteratorPtr nIt = face->interlacedNodesIterator(); const SMDS_MeshNode* n0 = face->GetNodeWrap( -1 ); while ( nIt->more() ) { - const SMDS_MeshNode* n1 = static_cast( nIt->next() ); + const SMDS_MeshNode* n1 = nIt->next(); const SMDS_MeshElement* edge = SMDS_Mesh::FindEdge( n0, n1 ); if ( edge ) myElems.push_back( edge ); diff --git a/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx b/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx index e1829cd1f..e56a3ab99 100644 --- a/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx +++ b/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx @@ -66,8 +66,6 @@ public: SMDS_NodeIteratorPtr interlacedNodesIterator() const; - SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; - /*! * \brief Return node by its index * \param ind - node index -- 2.39.2