Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 Lawrence Livermore National Laboratory. Under
5 : : the terms of Contract B545069 with the University of Wisconsin --
6 : : Madison, Lawrence Livermore National Laboratory retains certain
7 : : rights in this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : (2006) [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : #ifndef MSQ_PATCH_ITERATOR_HPP
28 : : #define MSQ_PATCH_ITERATOR_HPP
29 : :
30 : : #include "Mesquite.hpp"
31 : : #include "PatchSet.hpp"
32 : :
33 : : namespace MBMesquite
34 : : {
35 : :
36 : : class PatchData;
37 : : class MsqError;
38 : :
39 : 146 : class PatchIterator
40 : : {
41 : : public:
42 [ + - ][ + - ]: 73 : inline PatchIterator( PatchSet* set ) : patchSet( set ) {}
43 : :
44 : : bool get_next_patch( PatchData&, MsqError& err );
45 : :
46 : : PatchSet* get_patch_set() const
47 : : {
48 : : return patchSet;
49 : : }
50 : :
51 : : void reset(); //!< reset current position to beginning o
52 : :
53 : : private:
54 : : PatchSet* patchSet;
55 : :
56 : : std::vector< PatchSet::PatchHandle > patches;
57 : : std::vector< Mesh::ElementHandle > elems;
58 : : std::vector< Mesh::VertexHandle > verts;
59 : : std::vector< PatchSet::PatchHandle >::iterator current;
60 : : };
61 : :
62 : : } // namespace MBMesquite
63 : :
64 : : #endif
|