Permalink
Browse files

Revert "move symbolizers typedef out of rule and be explicit about in…

…cluding config.hpp for MAPNIK_DECL - refs #1527"

This reverts commit bf5ffd0.
  • Loading branch information...
Dane Springmeyer
Dane Springmeyer committed Oct 10, 2012
1 parent 8582523 commit 1f11aeb95a1c7f799e3421ac3bf06c524ca8626e
@@ -27,7 +27,6 @@
#include <mapnik/color.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/expression.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
@@ -23,7 +23,7 @@
#ifndef MAPNIK_DEBUG_SYMBOLIZER_HPP
#define MAPNIK_DEBUG_SYMBOLIZER_HPP
-#include <mapnik/config.hpp> // for MAPNIK_DECL
+#include <mapnik/config.hpp>
#include <mapnik/symbolizer.hpp>
namespace mapnik
@@ -25,7 +25,7 @@
// mapnik
#include <mapnik/symbolizer.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
+//#include <boost/shared_ptr.hpp>
namespace mapnik
{
@@ -27,7 +27,6 @@
#include <mapnik/stroke.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
@@ -30,7 +30,6 @@
#include <mapnik/stroke.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/expression.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/optional.hpp>
@@ -26,7 +26,6 @@
// mapnik
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
@@ -27,7 +27,6 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/gamma_method.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
@@ -28,7 +28,6 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/gamma_method.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
@@ -27,7 +27,6 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/raster_colorizer.hpp>
#include <mapnik/image_scaling.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/shared_ptr.hpp>
View
@@ -38,7 +38,6 @@
#include <mapnik/feature.hpp>
#include <mapnik/expression.hpp>
#include <mapnik/expression_string.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/concept_check.hpp>
@@ -128,11 +127,12 @@ typedef boost::variant<point_symbolizer,
markers_symbolizer,
debug_symbolizer> symbolizer;
-typedef MAPNIK_DECL std::vector<symbolizer> symbolizers;
-
-class MAPNIK_DECL rule
+class rule
{
+public:
+ typedef std::vector<symbolizer> symbolizers;
private:
+
std::string name_;
double min_scale_;
double max_scale_;
@@ -158,7 +158,7 @@ class MAPNIK_DECL rule
std::string const& get_name() const;
void append(symbolizer const& sym);
void remove_at(size_t index);
- symbolizers const& get_symbolizers() const;
+ const symbolizers& get_symbolizers() const;
symbolizers::const_iterator begin() const;
symbolizers::const_iterator end() const;
symbolizers::iterator begin();
@@ -172,7 +172,17 @@ class MAPNIK_DECL rule
bool active(double scale) const;
private:
- void swap(rule& rhs) throw();
+
+ void swap(rule& rhs) throw()
+ {
+ name_=rhs.name_;
+ min_scale_=rhs.min_scale_;
+ max_scale_=rhs.max_scale_;
+ syms_=rhs.syms_;
+ filter_=rhs.filter_;
+ else_filter_=rhs.else_filter_;
+ also_filter_=rhs.also_filter_;
+ }
};
}
@@ -26,7 +26,6 @@
// mapnik
#include <mapnik/symbolizer.hpp>
#include <mapnik/text_symbolizer.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/shared_ptr.hpp>
@@ -29,7 +29,6 @@
#include <mapnik/image_compositing.hpp>
#include <mapnik/transform_expression.hpp>
#include <mapnik/simplify.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/array.hpp>
@@ -29,7 +29,6 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/text_placements/base.hpp>
#include <mapnik/text_placements/dummy.hpp>
-#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/shared_ptr.hpp>
View
@@ -98,7 +98,7 @@ rule::rule(std::string const& name,
else_filter_(false),
also_filter_(false) {}
-rule::rule(rule const& rhs, bool deep_copy)
+rule::rule(const rule& rhs, bool deep_copy)
: name_(rhs.name_),
min_scale_(rhs.min_scale_),
max_scale_(rhs.max_scale_),
@@ -176,27 +176,27 @@ void rule::remove_at(size_t index)
}
}
-symbolizers const& rule::get_symbolizers() const
+rule::symbolizers const& rule::get_symbolizers() const
{
return syms_;
}
-symbolizers::const_iterator rule::begin() const
+rule::symbolizers::const_iterator rule::begin() const
{
return syms_.begin();
}
-symbolizers::const_iterator rule::end() const
+rule::symbolizers::const_iterator rule::end() const
{
return syms_.end();
}
-symbolizers::iterator rule::begin()
+rule::symbolizers::iterator rule::begin()
{
return syms_.begin();
}
-symbolizers::iterator rule::end()
+rule::symbolizers::iterator rule::end()
{
return syms_.end();
}
@@ -236,16 +236,4 @@ bool rule::active(double scale) const
return ( scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6);
}
-void rule::swap(rule& rhs) throw()
-{
- name_=rhs.name_;
- min_scale_=rhs.min_scale_;
- max_scale_=rhs.max_scale_;
- syms_=rhs.syms_;
- filter_=rhs.filter_;
- else_filter_=rhs.else_filter_;
- also_filter_=rhs.also_filter_;
-}
-
-
}

0 comments on commit 1f11aeb

Please sign in to comment.