refactor headers involving variant attempting to move as much variant usage out of hpp files to speed up compiles

This commit is contained in:
Dane Springmeyer 2013-01-12 21:00:45 -08:00
parent 577c04e3f9
commit bbcd53c6f4
29 changed files with 62 additions and 30 deletions

View file

@ -21,6 +21,8 @@
*****************************************************************************/ *****************************************************************************/
#include <boost/python.hpp> #include <boost/python.hpp>
#include <mapnik/value.hpp>
#include <mapnik/attribute.hpp>
#include <mapnik/building_symbolizer.hpp> #include <mapnik/building_symbolizer.hpp>
using namespace mapnik; using namespace mapnik;

View file

@ -22,6 +22,7 @@
// boost // boost
#include <boost/python.hpp> #include <boost/python.hpp>
#include <boost/variant.hpp>
// mapnik // mapnik
//symbolizer typdef here rather than mapnik/symbolizer.hpp //symbolizer typdef here rather than mapnik/symbolizer.hpp

View file

@ -27,6 +27,7 @@
#include <mapnik/transform_processor.hpp> #include <mapnik/transform_processor.hpp>
#include <mapnik/noncopyable.hpp> #include <mapnik/noncopyable.hpp>
#include <mapnik/attribute.hpp> #include <mapnik/attribute.hpp>
#include <mapnik/symbolizer.hpp> // for transform_list_ptr
#include <mapnik/building_symbolizer.hpp> #include <mapnik/building_symbolizer.hpp>
#include <mapnik/line_symbolizer.hpp> #include <mapnik/line_symbolizer.hpp>
#include <mapnik/line_pattern_symbolizer.hpp> #include <mapnik/line_pattern_symbolizer.hpp>
@ -39,15 +40,17 @@
#include <mapnik/markers_symbolizer.hpp> #include <mapnik/markers_symbolizer.hpp>
#include <mapnik/rule.hpp> // for rule::symbolizers #include <mapnik/rule.hpp> // for rule::symbolizers
#include <mapnik/expression.hpp> // for expression_ptr, etc #include <mapnik/expression.hpp> // for expression_ptr, etc
#include <mapnik/expression_node_types.hpp>
#include <mapnik/expression_node.hpp> #include <mapnik/expression_node.hpp>
#include <mapnik/parse_path.hpp> // for path_processor_type #include <mapnik/parse_path.hpp> // for path_processor_type
#include <mapnik/path_expression.hpp> // for path_expression_ptr #include <mapnik/path_expression.hpp> // for path_expression_ptr
#include <mapnik/text_placements/base.hpp> // for text_placements #include <mapnik/text_placements/base.hpp> // for text_placements
#include <mapnik/transform_expression.hpp>
// boost // boost
#include <boost/variant.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/apply_visitor.hpp>
// stl // stl
#include <set> #include <set>

View file

@ -29,6 +29,8 @@
#include <mapnik/expression_node.hpp> #include <mapnik/expression_node.hpp>
// boost // boost
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/apply_visitor.hpp>
#include <boost/regex.hpp> #include <boost/regex.hpp>
#if defined(BOOST_REGEX_HAS_ICU) #if defined(BOOST_REGEX_HAS_ICU)
#include <boost/regex/icu.hpp> #include <boost/regex/icu.hpp>

View file

@ -33,7 +33,6 @@
#if defined(BOOST_REGEX_HAS_ICU) #if defined(BOOST_REGEX_HAS_ICU)
#include <boost/regex/icu.hpp> #include <boost/regex/icu.hpp>
#endif #endif
#include <boost/variant.hpp>
#include <boost/function.hpp> #include <boost/function.hpp>
namespace mapnik namespace mapnik

View file

@ -28,7 +28,9 @@
//#include <mapnik/attribute.hpp> //#include <mapnik/attribute.hpp>
// boost // boost
#include <boost/variant.hpp> #include <boost/variant/variant_fwd.hpp>
namespace boost { template <typename T> class recursive_wrapper; }
namespace mapnik namespace mapnik
{ {

View file

@ -26,7 +26,9 @@
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
// boost // boost
#include <boost/variant/apply_visitor.hpp>
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>

View file

@ -46,6 +46,8 @@
#include <mapnik/proj_transform.hpp> #include <mapnik/proj_transform.hpp>
// boost // boost
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>

View file

@ -26,9 +26,12 @@
//mapnik //mapnik
#include <mapnik/image_filter_types.hpp> #include <mapnik/image_filter_types.hpp>
// boost // boost
#include <boost/variant/static_visitor.hpp>
#include <boost/gil/gil_all.hpp> #include <boost/gil/gil_all.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
// agg // agg
#include "agg_basics.h" #include "agg_basics.h"
#include "agg_rendering_buffer.h" #include "agg_rendering_buffer.h"

View file

@ -24,7 +24,7 @@
#define MAPNIK_IMAGE_FILTER_TYPES_HPP #define MAPNIK_IMAGE_FILTER_TYPES_HPP
// boost // boost
#include <boost/variant.hpp> #include <boost/variant/variant_fwd.hpp>
#include <boost/config/warning_disable.hpp> #include <boost/config/warning_disable.hpp>
// stl // stl

View file

@ -29,11 +29,8 @@
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
// spirit::qi // spirit::qi
#include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/include/phoenix.hpp>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/variant.hpp>
namespace mapnik { namespace json { namespace mapnik { namespace json {

View file

@ -31,12 +31,11 @@
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
// spirit::qi // spirit::qi
#include <boost/config/warning_disable.hpp> #include <boost/variant/static_visitor.hpp>
#include <boost/cstdint.hpp> #include <boost/variant/apply_visitor.hpp>
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/include/phoenix.hpp>
#include <boost/variant/apply_visitor.hpp> #include <boost/variant/variant_fwd.hpp>
#include <boost/variant/variant.hpp>
namespace mapnik { namespace json { namespace mapnik { namespace json {

View file

@ -24,15 +24,12 @@
#define MAPNIK_GEOMETRY_GRAMMAR_HPP #define MAPNIK_GEOMETRY_GRAMMAR_HPP
// mapnik // mapnik
#include <mapnik/geometry.hpp> #include <mapnik/geometry.hpp> // for geometry_type
#include <mapnik/feature.hpp> #include <mapnik/vertex.hpp> // for CommandType
// spirit::qi // spirit::qi
#include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/include/phoenix.hpp>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/variant.hpp>
namespace mapnik { namespace json { namespace mapnik { namespace json {

View file

@ -51,6 +51,7 @@
// boost // boost
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/variant/apply_visitor.hpp>
namespace mapnik { namespace mapnik {

View file

@ -28,7 +28,7 @@
#include <mapnik/value_types.hpp> #include <mapnik/value_types.hpp>
// boost // boost
#include <boost/variant/variant.hpp> #include <boost/variant/variant_fwd.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
// stl // stl

View file

@ -25,14 +25,14 @@
// mapnik // mapnik
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/transform_expression.hpp> #include <mapnik/symbolizer.hpp> // for transform_list_ptr
namespace mapnik { namespace mapnik {
template <typename Iterator> struct transform_expression_grammar; template <typename Iterator> struct transform_expression_grammar;
typedef transform_expression_grammar<std::string::const_iterator> typedef transform_expression_grammar<std::string::const_iterator>
transform_expression_grammar__string; transform_expression_grammar_string;
MAPNIK_DECL transform_list_ptr parse_transform(std::string const& str); MAPNIK_DECL transform_list_ptr parse_transform(std::string const& str);
@ -41,7 +41,7 @@ MAPNIK_DECL transform_list_ptr parse_transform(std::string const& str,
MAPNIK_DECL bool parse_transform(transform_list& list, MAPNIK_DECL bool parse_transform(transform_list& list,
std::string const& str, std::string const& str,
transform_expression_grammar__string const& g); transform_expression_grammar_string const& g);
} // namespace mapnik } // namespace mapnik

View file

@ -24,7 +24,7 @@
#define MAPNIK_PATH_EXPRESSION_HPP #define MAPNIK_PATH_EXPRESSION_HPP
// boost // boost
#include <boost/variant.hpp> #include <boost/variant/variant_fwd.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
// stl // stl

View file

@ -41,7 +41,7 @@
#include <mapnik/config.hpp> // MAPNIK_DECL #include <mapnik/config.hpp> // MAPNIK_DECL
// boost // boost
#include <boost/variant.hpp> #include <boost/variant/variant_fwd.hpp>
// stl // stl
#include <string> #include <string>

View file

@ -38,6 +38,7 @@
#include <mapnik/pixel_position.hpp> #include <mapnik/pixel_position.hpp>
// boost // boost
#include <boost/variant/static_visitor.hpp>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>

View file

@ -27,18 +27,23 @@
#include <mapnik/config.hpp> #include <mapnik/config.hpp>
#include <mapnik/path_expression.hpp> #include <mapnik/path_expression.hpp>
#include <mapnik/image_compositing.hpp> #include <mapnik/image_compositing.hpp>
#include <mapnik/transform_expression.hpp>
#include <mapnik/simplify.hpp> #include <mapnik/simplify.hpp>
// boost // boost
#include <boost/array.hpp> #include <boost/array.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
namespace agg { struct trans_affine; }
namespace mapnik namespace mapnik
{ {
// fwd declares
// TODO - move these transform declares to own header
namespace detail { struct transform_node; }
typedef std::vector<detail::transform_node> transform_list;
typedef boost::shared_ptr<transform_list> transform_list_ptr;
typedef transform_list_ptr transform_type; typedef transform_list_ptr transform_type;
class Map; class Map;
class feature_impl; class feature_impl;

View file

@ -29,7 +29,7 @@
// boost // boost
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/variant.hpp> #include <boost/variant/variant.hpp>
// fusion // fusion
#include <boost/fusion/include/at.hpp> #include <boost/fusion/include/at.hpp>

View file

@ -28,19 +28,22 @@
#ifdef MAPNIK_LOG #ifdef MAPNIK_LOG
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#endif #endif
#include <mapnik/feature.hpp>
#include <mapnik/value.hpp> #include <mapnik/value.hpp>
#include <mapnik/transform_expression.hpp> #include <mapnik/transform_expression.hpp>
#include <mapnik/expression_evaluator.hpp> #include <mapnik/expression_evaluator.hpp>
// boost // boost
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/apply_visitor.hpp>
// agg // agg
#include <agg_trans_affine.h> #include <agg_trans_affine.h>
namespace mapnik { namespace mapnik {
class feature_impl;
template <typename Container> struct expression_attributes; template <typename Container> struct expression_attributes;
template <typename T> template <typename T>

View file

@ -30,7 +30,10 @@
#include <mapnik/util/conversions.hpp> #include <mapnik/util/conversions.hpp>
// boost // boost
#include <boost/variant.hpp> #include <boost/variant/recursive_wrapper.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/variant.hpp>
#include <boost/scoped_array.hpp> #include <boost/scoped_array.hpp>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>

View file

@ -22,6 +22,8 @@
// mapnik // mapnik
#include <mapnik/building_symbolizer.hpp> #include <mapnik/building_symbolizer.hpp>
#include <mapnik/value.hpp>
#include <mapnik/attribute.hpp>
namespace mapnik namespace mapnik
{ {

View file

@ -22,6 +22,8 @@
// mapnik // mapnik
#include <mapnik/markers_symbolizer.hpp> #include <mapnik/markers_symbolizer.hpp>
#include <mapnik/value.hpp>
#include <mapnik/attribute.hpp>
// boost // boost
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>

View file

@ -39,7 +39,7 @@ transform_list_ptr parse_transform(std::string const& str, std::string const& en
transform_list_ptr tl = boost::make_shared<transform_list>(); transform_list_ptr tl = boost::make_shared<transform_list>();
transcoder tc(encoding); transcoder tc(encoding);
expression_grammar<std::string::const_iterator> ge(tc); expression_grammar<std::string::const_iterator> ge(tc);
transform_expression_grammar__string gte(ge); transform_expression_grammar_string gte(ge);
if (!parse_transform(*tl, str, gte)) if (!parse_transform(*tl, str, gte))
{ {
@ -50,7 +50,7 @@ transform_list_ptr parse_transform(std::string const& str, std::string const& en
bool parse_transform(transform_list& transform, bool parse_transform(transform_list& transform,
std::string const& str, std::string const& str,
transform_expression_grammar__string const& g) transform_expression_grammar_string const& g)
{ {
std::string::const_iterator itr = str.begin(); std::string::const_iterator itr = str.begin();
std::string::const_iterator end = str.end(); std::string::const_iterator end = str.end();

View file

@ -22,6 +22,8 @@
// mapnik // mapnik
#include <mapnik/point_symbolizer.hpp> #include <mapnik/point_symbolizer.hpp>
#include <mapnik/value.hpp>
#include <mapnik/attribute.hpp>
#include <mapnik/enumeration.hpp> #include <mapnik/enumeration.hpp>
namespace mapnik namespace mapnik

View file

@ -22,6 +22,7 @@
// mapnik // mapnik
#include <mapnik/rule.hpp> #include <mapnik/rule.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/raster_colorizer.hpp> #include <mapnik/raster_colorizer.hpp>
#include <mapnik/expression_string.hpp> #include <mapnik/expression_string.hpp>

View file

@ -1,9 +1,12 @@
#include <boost/version.hpp> #include <boost/version.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/detail/lightweight_test.hpp>
#include <iostream> #include <iostream>
#include <mapnik/value_types.hpp>
#include <mapnik/params.hpp> #include <mapnik/params.hpp>
#include <mapnik/boolean.hpp> #include <mapnik/boolean.hpp>
#include <boost/variant.hpp>
int main( int, char*[] ) int main( int, char*[] )
{ {