21 #ifndef GEOS_GEOM_UTIL_GEOMETRYEXTRACTER_H 22 #define GEOS_GEOM_UTIL_GEOMETRYEXTRACTER_H 24 #include <geos/export.h> 25 #include <geos/geom/GeometryFilter.h> 26 #include <geos/geom/GeometryCollection.h> 27 #include <geos/platform.h> 48 template <
class ComponentType,
class TargetContainer>
51 if (
const ComponentType* c = dynamic_cast<const ComponentType*>(&geom) )
56 dynamic_cast<const GeometryCollection*>(&geom) )
58 GeometryExtracter::Extracter<ComponentType, TargetContainer> extracter(lst);
59 c->apply_ro(&extracter);
65 template <
class ComponentType,
class TargetContainer>
73 Extracter(TargetContainer& comps) : comps_(comps) {}
75 TargetContainer& comps_;
79 if (
const ComponentType* c = dynamic_cast<const ComponentType*>(geom) ) {
85 Extracter(
const Extracter& other);
86 Extracter& operator=(
const Extracter& rhs);
90 GeometryExtracter(
const GeometryExtracter& other);
91 GeometryExtracter& operator=(
const GeometryExtracter& rhs);
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:48
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:56
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25