From 2d7c7fed9bafca3532d01c5c66b0aca8d66c4856 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 4 Jan 2013 09:17:58 -0800 Subject: [PATCH] use more forward declares in renderer headers to speed up compiles of process cpp files --- include/mapnik/agg_renderer.hpp | 36 +++++++++++----------- include/mapnik/grid/grid_renderer.hpp | 30 +++++++++--------- include/mapnik/svg/output/svg_renderer.hpp | 24 ++++++++++++++- 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index 5f6d36e0f..27e5be3b1 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -24,33 +24,33 @@ #define MAPNIK_AGG_RENDERER_HPP // mapnik -#include +#include // for MAPNIK_DECL #include -#include -#include -#include -#include // for all symbolizers -#include +#include // for face_manager, etc +#include // for noncopyable +#include // for rule, symbolizers +#include // for box2d +#include // for color +#include // for CoordTransform +#include // for composite_mode_e // boost #include #include -#include -// FIXME -// forward declare so that -// apps using mapnik do not -// need agg headers -namespace agg { -struct trans_affine; -} +namespace agg { struct trans_affine; } +namespace mapnik { class Map; } +namespace mapnik { class feature_impl; } +namespace mapnik { class feature_type_style; } +namespace mapnik { class label_collision_detector4; } +namespace mapnik { class layer; } +namespace mapnik { class marker; } +namespace mapnik { class proj_transform; } +namespace mapnik { struct rasterizer; } +struct pixel_position; namespace mapnik { -class marker; - -struct rasterizer; - template class MAPNIK_DECL agg_renderer : public feature_style_processor >, private mapnik::noncopyable diff --git a/include/mapnik/grid/grid_renderer.hpp b/include/mapnik/grid/grid_renderer.hpp index bc9c03885..4e23b18d1 100644 --- a/include/mapnik/grid/grid_renderer.hpp +++ b/include/mapnik/grid/grid_renderer.hpp @@ -27,29 +27,31 @@ #include #include #include -#include -#include -#include // for all symbolizers #include #include +#include // for rule, symbolizers +#include // for box2d +#include // for color +#include // for CoordTransform +#include // for composite_mode_e // boost #include +#include -// FIXME -// forward declare so that -// apps using mapnik do not -// need agg headers -namespace agg { -struct trans_affine; -} +namespace agg { struct trans_affine; } +namespace mapnik { class Map; } +namespace mapnik { class feature_impl; } +namespace mapnik { class feature_type_style; } +namespace mapnik { class label_collision_detector4; } +namespace mapnik { class layer; } +namespace mapnik { class marker; } +namespace mapnik { class proj_transform; } +namespace mapnik { struct grid_rasterizer; } +struct pixel_position; namespace mapnik { -class marker; - -struct grid_rasterizer; - template class MAPNIK_DECL grid_renderer : public feature_style_processor >, private mapnik::noncopyable diff --git a/include/mapnik/svg/output/svg_renderer.hpp b/include/mapnik/svg/output/svg_renderer.hpp index 0461fb909..d2d82b12d 100644 --- a/include/mapnik/svg/output/svg_renderer.hpp +++ b/include/mapnik/svg/output/svg_renderer.hpp @@ -24,15 +24,37 @@ #define MAPNIK_SVG_RENDERER_HPP // mapnik +#include #include -#include +#include #include #include #include +#include // for rule, symbolizers +#include // for box2d +#include // for color +#include // for CoordTransform +#include // for composite_mode_e + +// boost +#include +#include // stl #include +namespace agg { struct trans_affine; } +namespace mapnik { class Map; } +namespace mapnik { class feature_impl; } +namespace mapnik { class feature_type_style; } +namespace mapnik { class label_collision_detector4; } +namespace mapnik { class layer; } +namespace mapnik { class marker; } +namespace mapnik { class proj_transform; } +namespace mapnik { struct grid_rasterizer; } +struct pixel_position; + + namespace mapnik { // parameterized with the type of output iterator it will use for output.