Permalink
Browse files

finish moving symbolizers out of rule

  • Loading branch information...
1 parent bf5ffd0 commit 20a317860d06b9148345ceed78785ca4f9808381 Dane Springmeyer committed Oct 10, 2012
@@ -32,6 +32,7 @@
#include <mapnik/expression_string.hpp>
using mapnik::rule;
+using mapnik::symbolizers;
using mapnik::expr_node;
using mapnik::expression_ptr;
using mapnik::Feature;
@@ -62,8 +63,8 @@ void export_rule()
implicitly_convertible<text_symbolizer,symbolizer>();
implicitly_convertible<markers_symbolizer,symbolizer>();
- class_<rule::symbolizers>("Symbolizers",init<>("TODO"))
- .def(vector_indexing_suite<rule::symbolizers>())
+ class_<symbolizers>("Symbolizers",init<>("TODO"))
+ .def(vector_indexing_suite<symbolizers>())
;
class_<rule>("Rule",init<>("default constructor"))
@@ -323,7 +323,7 @@ StyleModel::StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent)
for ( ; itr2 != rules.end();++itr2)
{
node* rule_n = style_n->add_child(new node(rule_node(QString("Rule"),*itr2),style_n));
- mapnik::rule::symbolizers::const_iterator itr3 = (*itr2).begin();
+ mapnik::symbolizers::const_iterator itr3 = (*itr2).begin();
for ( ; itr3 !=itr2->end();++itr3)
{
rule_n->add_child(new node(symbolizer_node(*itr3),rule_n));
@@ -110,7 +110,7 @@ class MAPNIK_DECL agg_renderer : public feature_style_processor<agg_renderer<T>
feature_impl & feature,
proj_transform const& prj_trans);
- inline bool process(rule::symbolizers const& /*syms*/,
+ inline bool process(symbolizers const& /*syms*/,
mapnik::feature_impl & /*feature*/,
proj_transform const& /*prj_trans*/)
{
@@ -220,8 +220,8 @@ class attribute_collector : public boost::noncopyable
template <typename RuleType>
void operator() (RuleType const& r)
{
- typename RuleType::symbolizers const& symbols = r.get_symbolizers();
- typename RuleType::symbolizers::const_iterator symIter=symbols.begin();
+ symbolizers const& symbols = r.get_symbolizers();
+ symbolizers::const_iterator symIter=symbols.begin();
symbolizer_attributes s_attr(names_);
while (symIter != symbols.end())
{
@@ -111,7 +111,7 @@ class MAPNIK_DECL cairo_renderer_base : private boost::noncopyable
void process(markers_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
- inline bool process(rule::symbolizers const& /*syms*/,
+ inline bool process(symbolizers const& /*syms*/,
mapnik::feature_impl & /*feature*/,
proj_transform const& /*prj_trans*/)
{
@@ -398,9 +398,9 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
ds->type() == datasource::Raster &&
ds->params().get<double>("filter_factor",0.0) == 0.0)
{
- rule::symbolizers const& symbols = r.get_symbolizers();
- rule::symbolizers::const_iterator symIter = symbols.begin();
- rule::symbolizers::const_iterator symEnd = symbols.end();
+ symbolizers const& symbols = r.get_symbolizers();
+ symbolizers::const_iterator symIter = symbols.begin();
+ symbolizers::const_iterator symEnd = symbols.end();
while (symIter != symEnd)
{
// if multiple raster symbolizers, last will be respected
@@ -548,7 +548,7 @@ void feature_style_processor<Processor>::render_style(
do_else=false;
do_also=true;
- rule::symbolizers const& symbols = r->get_symbolizers();
+ symbolizers const& symbols = r->get_symbolizers();
// if the underlying renderer is not able to process the complete set of symbolizers,
// process one by one.
@@ -577,7 +577,7 @@ void feature_style_processor<Processor>::render_style(
p.painted(true);
- rule::symbolizers const& symbols = r->get_symbolizers();
+ symbolizers const& symbols = r->get_symbolizers();
// if the underlying renderer is not able to process the complete set of symbolizers,
// process one by one.
if(!p.process(symbols,*feature,prj_trans))
@@ -599,7 +599,7 @@ void feature_style_processor<Processor>::render_style(
p.painted(true);
- rule::symbolizers const& symbols = r->get_symbolizers();
+ symbolizers const& symbols = r->get_symbolizers();
// if the underlying renderer is not able to process the complete set of symbolizers,
// process one by one.
if(!p.process(symbols,*feature,prj_trans))
@@ -98,7 +98,7 @@ class MAPNIK_DECL grid_renderer : public feature_style_processor<grid_renderer<T
void process(markers_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
- inline bool process(rule::symbolizers const& /*syms*/,
+ inline bool process(symbolizers const& /*syms*/,
mapnik::feature_impl & /*feature*/,
proj_transform const& /*prj_trans*/)
{
@@ -88,7 +88,7 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
* @brief Overload that process the whole set of symbolizers of a rule.
* @return true, meaning that this renderer can process multiple symbolizers.
*/
- bool process(rule::symbolizers const& syms,
+ bool process(symbolizers const& syms,
Feature const& feature,
proj_transform const& prj_trans);
View
@@ -543,8 +543,8 @@ void serialize_rule( ptree & style_node, const rule & r, bool explicit_defaults)
max_scale.put_value( r.get_max_scale() );
}
- rule::symbolizers::const_iterator begin = r.get_symbolizers().begin();
- rule::symbolizers::const_iterator end = r.get_symbolizers().end();
+ symbolizers::const_iterator begin = r.get_symbolizers().begin();
+ symbolizers::const_iterator end = r.get_symbolizers().end();
serialize_symbolizer serializer( rule_node, explicit_defaults);
std::for_each( begin, end , boost::apply_visitor( serializer ));
}
@@ -26,7 +26,7 @@
namespace mapnik {
template <typename OutputIterator>
-bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
+bool svg_renderer<OutputIterator>::process(symbolizers const& syms,
Feature const& feature,
proj_transform const& prj_trans)
{
@@ -60,7 +60,7 @@ bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
return true;
};
-template bool svg_renderer<std::ostream_iterator<char> >::process(rule::symbolizers const& syms,
+template bool svg_renderer<std::ostream_iterator<char> >::process(symbolizers const& syms,
Feature const& feature,
proj_transform const& prj_trans);

0 comments on commit 20a3178

Please sign in to comment.