Quotes around otherwise ambiguous (underline containing) name
[geos.git] / src / geom / util / LinearComponentExtracter.cpp
blob3492cdbbfa12536688f2d51b178c3351bac4d237
1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2006 Refractions Research Inc.
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
14 **********************************************************************/
16 #include <geos/export.h>
17 #include <vector>
19 #include <geos/geom/GeometryComponentFilter.h>
20 #include <geos/geom/util/LinearComponentExtracter.h>
22 namespace geos {
23 namespace geom { // geos.geom
24 namespace util { // geos.geom.util
26 LinearComponentExtracter::LinearComponentExtracter(std::vector<const LineString*> &newComps)
28 comps(newComps)
31 void LinearComponentExtracter::getLines(const Geometry &geom, std::vector<const LineString*> &ret)
33 LinearComponentExtracter lce(ret);
34 geom.apply_ro(&lce);
37 void LinearComponentExtracter::filter_rw(Geometry *geom)
39 if ( const LineString *ls=dynamic_cast<const LineString *>(geom) )
40 comps.push_back(ls);
43 void LinearComponentExtracter::filter_ro(const Geometry *geom)
45 if ( const LineString *ls=dynamic_cast<const LineString *>(geom) )
46 comps.push_back(ls);