1 /**
2  *   SFCGAL
3  *
4  *   Copyright (C) 2012-2013 Oslandia <infos@oslandia.com>
5  *   Copyright (C) 2012-2013 IGN (http://www.ign.fr)
6  *
7  *   This library is free software; you can redistribute it and/or
8  *   modify it under the terms of the GNU Library General Public
9  *   License as published by the Free Software Foundation; either
10  *   version 2 of the License, or (at your option) any later version.
11  *
12  *   This library is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  *   Library General Public License for more details.
16 
17  *   You should have received a copy of the GNU Library General Public
18  *   License along with this library; if not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef _SFCGAL_DETAIL_ENVELOPEVISITOR_H_
22 #define _SFCGAL_DETAIL_ENVELOPEVISITOR_H_
23 
24 #include <SFCGAL/config.h>
25 #include <SFCGAL/Envelope.h>
26 #include <SFCGAL/GeometryVisitor.h>
27 
28 #include <vector>
29 
30 namespace SFCGAL {
31 namespace detail {
32 
33 /**
34  * Get the list of points from a Geometry
35  *
36  * @todo ConstPointVisitor
37  */
38 class SFCGAL_API EnvelopeVisitor : public ConstGeometryVisitor {
39 public:
40     EnvelopeVisitor( Envelope& envelope_ );
41 
42     virtual void visit( const Point& g ) ;
43     virtual void visit( const LineString& g ) ;
44     virtual void visit( const Polygon& g ) ;
45     virtual void visit( const Triangle& g ) ;
46     virtual void visit( const Solid& g ) ;
47     virtual void visit( const MultiPoint& g ) ;
48     virtual void visit( const MultiLineString& g ) ;
49     virtual void visit( const MultiPolygon& g ) ;
50     virtual void visit( const MultiSolid& g ) ;
51     virtual void visit( const GeometryCollection& g ) ;
52     virtual void visit( const PolyhedralSurface& g ) ;
53     virtual void visit( const TriangulatedSurface& g ) ;
54 public:
55     Envelope& envelope ;
56 };
57 
58 
59 }//detail
60 }//SFCGAL
61 
62 
63 #endif
64