Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move symbolizers typedef out of rule and be explicit about including …

…config.hpp for MAPNIK_DECL - refs #1527
  • Loading branch information...
commit bf5ffd04f442b1b14d4366b5bda9a626d4626e37 1 parent 989b9f0
@springmeyer springmeyer authored
View
1  include/mapnik/building_symbolizer.hpp
@@ -27,6 +27,7 @@
#include <mapnik/color.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/expression.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
2  include/mapnik/debug_symbolizer.hpp
@@ -23,7 +23,7 @@
#ifndef MAPNIK_DEBUG_SYMBOLIZER_HPP
#define MAPNIK_DEBUG_SYMBOLIZER_HPP
-#include <mapnik/config.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
#include <mapnik/symbolizer.hpp>
namespace mapnik
View
2  include/mapnik/line_pattern_symbolizer.hpp
@@ -25,7 +25,7 @@
// mapnik
#include <mapnik/symbolizer.hpp>
-//#include <boost/shared_ptr.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
1  include/mapnik/line_symbolizer.hpp
@@ -27,6 +27,7 @@
#include <mapnik/stroke.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
1  include/mapnik/markers_symbolizer.hpp
@@ -30,6 +30,7 @@
#include <mapnik/stroke.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/expression.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/optional.hpp>
View
1  include/mapnik/point_symbolizer.hpp
@@ -26,6 +26,7 @@
// mapnik
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
1  include/mapnik/polygon_pattern_symbolizer.hpp
@@ -27,6 +27,7 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/gamma_method.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
1  include/mapnik/polygon_symbolizer.hpp
@@ -28,6 +28,7 @@
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/gamma_method.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
namespace mapnik
{
View
1  include/mapnik/raster_symbolizer.hpp
@@ -27,6 +27,7 @@
#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
22 include/mapnik/rule.hpp
@@ -38,6 +38,7 @@
#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>
@@ -127,12 +128,11 @@ typedef boost::variant<point_symbolizer,
markers_symbolizer,
debug_symbolizer> symbolizer;
-class rule
+typedef MAPNIK_DECL std::vector<symbolizer> symbolizers;
+
+class MAPNIK_DECL rule
{
-public:
- typedef std::vector<symbolizer> symbolizers;
private:
-
std::string name_;
double min_scale_;
double max_scale_;
@@ -158,7 +158,7 @@ class rule
std::string const& get_name() const;
void append(symbolizer const& sym);
void remove_at(size_t index);
- const symbolizers& get_symbolizers() const;
+ symbolizers const& get_symbolizers() const;
symbolizers::const_iterator begin() const;
symbolizers::const_iterator end() const;
symbolizers::iterator begin();
@@ -172,17 +172,7 @@ class rule
bool active(double scale) const;
private:
-
- 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_;
- }
+ void swap(rule& rhs) throw();
};
}
View
1  include/mapnik/shield_symbolizer.hpp
@@ -26,6 +26,7 @@
// mapnik
#include <mapnik/symbolizer.hpp>
#include <mapnik/text_symbolizer.hpp>
+#include <mapnik/config.hpp> // for MAPNIK_DECL
// boost
#include <boost/shared_ptr.hpp>
View
1  include/mapnik/symbolizer.hpp
@@ -29,6 +29,7 @@
#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>
View
1  include/mapnik/text_symbolizer.hpp
@@ -29,6 +29,7 @@
#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
24 src/rule.cpp
@@ -98,7 +98,7 @@ rule::rule(std::string const& name,
else_filter_(false),
also_filter_(false) {}
-rule::rule(const rule& rhs, bool deep_copy)
+rule::rule(rule const& 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)
}
}
-rule::symbolizers const& rule::get_symbolizers() const
+symbolizers const& rule::get_symbolizers() const
{
return syms_;
}
-rule::symbolizers::const_iterator rule::begin() const
+symbolizers::const_iterator rule::begin() const
{
return syms_.begin();
}
-rule::symbolizers::const_iterator rule::end() const
+symbolizers::const_iterator rule::end() const
{
return syms_.end();
}
-rule::symbolizers::iterator rule::begin()
+symbolizers::iterator rule::begin()
{
return syms_.begin();
}
-rule::symbolizers::iterator rule::end()
+symbolizers::iterator rule::end()
{
return syms_.end();
}
@@ -236,4 +236,16 @@ 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_;
+}
+
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.