From a181d7840379fa659c3a5efaa22bb6e16f394998 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 7 Feb 2006 20:51:08 +0000 Subject: [PATCH] Of course,we can use one templated member functions to handle all symbolizers. --- include/feature_style_processor.hpp | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/include/feature_style_processor.hpp b/include/feature_style_processor.hpp index 0b6b507ed..2be6cb1ad 100644 --- a/include/feature_style_processor.hpp +++ b/include/feature_style_processor.hpp @@ -43,36 +43,12 @@ namespace mapnik symbol_dispatch (Processor & output,Feature const& f) : output_(output),f_(f) {} - void operator () (polygon_symbolizer const& sym) const + template + void operator () (T const& sym) const { output_.process(sym,f_); } - void operator () (polygon_pattern_symbolizer const& sym) const - { - output_.process(sym,f_); - } - - void operator () (line_symbolizer const& sym) const - { - output_.process(sym,f_); - } - - void operator () (line_pattern_symbolizer const& sym) const - { - output_.process(sym,f_); - } - - void operator () (point_symbolizer const& sym) const - { - output_.process(sym,f_); - } - - void operator () (raster_symbolizer const& sym) const - { - output_.process(sym,f_); - } - Processor & output_; Feature const& f_; };