00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 #ifndef __INTERPKERNELGEO2DABSTRACTEDGE_HXX__ 00021 #define __INTERPKERNELGEO2DABSTRACTEDGE_HXX__ 00022 00023 #include "INTERPKERNELGEOMETRIC2DDefines.hxx" 00024 00025 #include <set> 00026 #include <list> 00027 #include <fstream> 00028 00029 namespace INTERP_KERNEL 00030 { 00031 class Edge; 00032 class Node; 00033 class Bounds; 00034 00035 class ComposedEdge; 00036 class ElementaryEdge; 00037 00041 class INTERPKERNELGEOMETRIC2D_EXPORT IteratorOnComposedEdge 00042 { 00043 friend class ComposedEdge; 00044 friend class ElementaryEdge; 00045 friend class QuadraticPolygon; 00046 public: 00047 IteratorOnComposedEdge(); 00048 IteratorOnComposedEdge(ComposedEdge *compEdges); 00049 bool isValid() const { return _list_handle!=0; } 00050 void operator=(const IteratorOnComposedEdge& other); 00051 void first() { _deep_it=_list_handle->begin(); } 00052 void next() { _deep_it++; } 00053 void last(); 00054 void nextLoop(); 00055 void previousLoop(); 00056 bool finished() const { return _deep_it==_list_handle->end(); } 00057 bool goToNextInOn(bool direction, int& i, int nbMax); 00058 ElementaryEdge *current() { return *_deep_it; } 00059 void assignMySelfToAllElems(ComposedEdge *elems); 00060 void insertElemEdges(ComposedEdge *elems, bool changeMySelf); 00061 private: 00062 std::list<ElementaryEdge *>::iterator _deep_it; 00063 std::list<ElementaryEdge *>* _list_handle; 00064 }; 00065 } 00066 00067 #endif