c++11 style : replace (almost) all typedef with type alias's

This commit is contained in:
artemp 2014-07-07 18:23:15 +01:00
parent 0f01000570
commit fe215a684e
210 changed files with 973 additions and 991 deletions

View file

@ -1,5 +1,5 @@
#ifndef __MAPNIK_BENCH_FRAMEWORK_HPP__
#define __MAPNIK_BENCH_FRAMEWORK_HPP__
#define __MAPNIK_BENCH_FRAMEWORK_HPP__
// mapnik
#include <mapnik/params.hpp>
@ -97,8 +97,8 @@ int run(T const& test_runner, std::string const& name)
<< " i:" << test_runner.iterations();
if (test_runner.threads() > 0)
{
typedef std::vector<std::unique_ptr<std::thread> > thread_group;
typedef thread_group::value_type value_type;
using thread_group = std::vector<std::unique_ptr<std::thread> >;
using value_type = thread_group::value_type;
thread_group tg;
for (std::size_t i=0;i<test_runner.threads();++i)
{
@ -129,4 +129,4 @@ int run(T const& test_runner, std::string const& name)
}
#endif // __MAPNIK_BENCH_FRAMEWORK_HPP__
#endif // __MAPNIK_BENCH_FRAMEWORK_HPP__

View file

@ -33,9 +33,9 @@ void render(mapnik::geometry_type & geom,
mapnik::box2d<double> const& extent,
std::string const& name)
{
typedef mapnik::coord_transform<mapnik::CoordTransform,mapnik::geometry_type> path_type;
typedef agg::renderer_base<agg::pixfmt_rgba32_plain> ren_base;
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
using path_type = mapnik::coord_transform<mapnik::CoordTransform,mapnik::geometry_type>;
using ren_base = agg::renderer_base<agg::pixfmt_rgba32_plain>;
using renderer = agg::renderer_scanline_aa_solid<ren_base>;
mapnik::image_32 im(256,256);
im.set_background(mapnik::color("white"));
mapnik::box2d<double> padded_extent = extent;
@ -63,7 +63,7 @@ class test1 : public benchmark::test_case
mapnik::box2d<double> extent_;
std::string expected_;
public:
typedef agg::conv_clip_polygon<mapnik::geometry_type> conv_clip;
using conv_clip = agg::conv_clip_polygon<mapnik::geometry_type>;
test1(mapnik::parameters const& params,
std::string const& wkt_in,
mapnik::box2d<double> const& extent)
@ -138,7 +138,7 @@ class test2 : public benchmark::test_case
mapnik::box2d<double> extent_;
std::string expected_;
public:
typedef agg::conv_clipper<mapnik::geometry_type, agg::path_storage> poly_clipper;
using poly_clipper = agg::conv_clipper<mapnik::geometry_type, agg::path_storage>;
test2(mapnik::parameters const& params,
std::string const& wkt_in,
mapnik::box2d<double> const& extent)
@ -225,7 +225,7 @@ class test3 : public benchmark::test_case
mapnik::box2d<double> extent_;
std::string expected_;
public:
typedef mapnik::polygon_clipper<mapnik::geometry_type> poly_clipper;
using poly_clipper = mapnik::polygon_clipper<mapnik::geometry_type>;
test3(mapnik::parameters const& params,
std::string const& wkt_in,
mapnik::box2d<double> const& extent)
@ -317,4 +317,3 @@ int main(int argc, char** argv)
return 0;
}

View file

@ -34,8 +34,8 @@ class enumeration_ :
public boost::python::enum_<typename EnumWrapper::native_type>
{
// some short cuts
typedef boost::python::enum_<typename EnumWrapper::native_type> base_type;
typedef typename EnumWrapper::native_type native_type;
using base_type = boost::python::enum_<typename EnumWrapper::native_type>;
using native_type = typename EnumWrapper::native_type;
public:
enumeration_() :
base_type( EnumWrapper::get_name().c_str() )

View file

@ -50,7 +50,7 @@ namespace {
using mapnik::from_wkt;
using mapnik::geometry_type;
typedef boost::ptr_vector<geometry_type> path_type;
using path_type = boost::ptr_vector<geometry_type>;
geometry_type const& getitem_impl(path_type & p, int key)
{

View file

@ -115,15 +115,15 @@ void set_maximum_extent(mapnik::Map & m, boost::optional<mapnik::box2d<double> >
struct extract_style
{
typedef boost::python::tuple result_type;
using result_type = boost::python::tuple;
result_type operator() (std::map<std::string, mapnik::feature_type_style>::value_type const& val) const
{
return boost::python::make_tuple(val.first,val.second);
}
};
typedef boost::transform_iterator<extract_style, Map::const_style_iterator> style_extract_iterator;
typedef std::pair<style_extract_iterator,style_extract_iterator> style_range;
using style_extract_iterator = boost::transform_iterator<extract_style, Map::const_style_iterator>;
using style_range = std::pair<style_extract_iterator,style_extract_iterator>;
style_range _styles_ (mapnik::Map const& m)
{

View file

@ -105,7 +105,7 @@ std::shared_ptr<mapnik::symbolizer_base::value_type> numeric_wrapper(const objec
struct extract_python_object : public boost::static_visitor<boost::python::object>
{
typedef boost::python::object result_type;
using result_type = boost::python::object;
template <typename T>
auto operator() (T const& val) const -> result_type
@ -116,7 +116,7 @@ struct extract_python_object : public boost::static_visitor<boost::python::objec
boost::python::object __getitem__(mapnik::symbolizer_base const& sym, std::string const& name)
{
typedef symbolizer_base::cont_type::const_iterator const_iterator;
using const_iterator = symbolizer_base::cont_type::const_iterator;
mapnik::keys key = mapnik::get_key(name);
const_iterator itr = sym.properties.find(key);
if (itr != sym.properties.end())

View file

@ -68,7 +68,7 @@ template <typename T,
class class_with_converter : public boost::python::class_<T, X1, X2, X3>
{
public:
typedef class_with_converter<T,X1,X2,X3> self;
using self = class_with_converter<T,X1,X2,X3>;
// Construct with the class name, with or without docstring, and default __init__() function
class_with_converter(char const* name, char const* doc = 0) : boost::python::class_<T, X1, X2, X3>(name, doc) { }

View file

@ -33,7 +33,7 @@
namespace impl {
typedef boost::ptr_vector<mapnik::geometry_type> path_type;
using path_type = boost::ptr_vector<mapnik::geometry_type>;
std::shared_ptr<path_type> from_wkt(mapnik::wkt_parser & p, std::string const& wkt)
{

View file

@ -49,8 +49,8 @@ void grid2utf(T const& grid_type,
boost::python::list& l,
std::vector<typename T::lookup_type>& key_order)
{
typedef std::map< typename T::lookup_type, typename T::value_type> keys_type;
typedef typename keys_type::const_iterator keys_iterator;
using keys_type = std::map< typename T::lookup_type, typename T::value_type>;
using keys_iterator = typename keys_type::const_iterator;
typename T::data_type const& data = grid_type.data();
typename T::feature_key_type const& feature_keys = grid_type.get_feature_keys();
@ -113,8 +113,8 @@ void grid2utf(T const& grid_type,
std::vector<typename T::lookup_type>& key_order,
unsigned int resolution)
{
typedef std::map< typename T::lookup_type, typename T::value_type> keys_type;
typedef typename keys_type::const_iterator keys_iterator;
using keys_type = std::map< typename T::lookup_type, typename T::value_type>;
using keys_iterator = typename keys_type::const_iterator;
typename T::feature_key_type const& feature_keys = grid_type.get_feature_keys();
typename T::feature_key_type::const_iterator feature_pos;
@ -176,8 +176,8 @@ void grid2utf2(T const& grid_type,
std::vector<typename T::lookup_type>& key_order,
unsigned int resolution)
{
typedef std::map< typename T::lookup_type, typename T::value_type> keys_type;
typedef typename keys_type::const_iterator keys_iterator;
using keys_type = std::map< typename T::lookup_type, typename T::value_type>;
using keys_iterator = typename keys_type::const_iterator;
typename T::data_type const& data = grid_type.data();
typename T::feature_key_type const& feature_keys = grid_type.get_feature_keys();

View file

@ -325,7 +325,7 @@ StyleModel::StyleModel(std::shared_ptr<mapnik::Map> map, QObject * parent)
: QAbstractItemModel(parent),
root_(new node(map_node(map)))
{
typedef std::map<std::string,mapnik::feature_type_style> style_type;
using style_type = std::map<std::string,mapnik::feature_type_style>;
style_type const & styles = map->styles();
style_type::const_iterator itr = styles.begin();
style_type::const_iterator end = styles.end();

View file

@ -64,9 +64,9 @@ class MAPNIK_DECL agg_renderer : public feature_style_processor<agg_renderer<T0>
{
public:
typedef T0 buffer_type;
typedef agg_renderer<T0> processor_impl_type;
typedef T1 detector_type;
using buffer_type = T0;
using processor_impl_type = agg_renderer<T0>;
using detector_type = T1;
// create with default, empty placement detector
agg_renderer(Map const& m, buffer_type & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
// create with external placement detector, possibly non-empty

View file

@ -80,7 +80,7 @@ struct global_attribute
}
};
typedef std::unordered_map<std::string, value> attributes;
using attributes = std::unordered_map<std::string, value>;
}

View file

@ -51,7 +51,7 @@ template <typename T> class MAPNIK_DECL box2d
boost::multipliable2<box2d<T>, T > > > >
{
public:
typedef box2d<T> box2d_type;
using box2d_type = box2d<T>;
private:
T minx_;
T miny_;

View file

@ -57,7 +57,7 @@ namespace mapnik {
class text_path;
typedef cairo_status_t ErrorStatus;
using ErrorStatus = cairo_status_t;
/// Throws the appropriate exception, if exceptions are enabled.
inline void throw_exception(ErrorStatus status)
@ -107,7 +107,7 @@ private:
cairo_font_face_t *c_face_;
};
typedef std::shared_ptr<cairo_face> cairo_face_ptr;
using cairo_face_ptr = std::shared_ptr<cairo_face>;
class cairo_face_manager : private mapnik::noncopyable
{
@ -116,7 +116,7 @@ public:
cairo_face_ptr get_face(face_ptr face);
private:
typedef std::map<face_ptr,cairo_face_ptr> cairo_face_cache;
using cairo_face_cache = std::map<face_ptr,cairo_face_ptr>;
std::shared_ptr<freetype_engine> font_engine_;
cairo_face_cache cache_;
};
@ -271,8 +271,8 @@ struct cairo_surface_closer
}
};
typedef std::shared_ptr<cairo_t> cairo_ptr;
typedef std::shared_ptr<cairo_surface_t> cairo_surface_ptr;
using cairo_ptr = std::shared_ptr<cairo_t>;
using cairo_surface_ptr = std::shared_ptr<cairo_surface_t>;
inline cairo_ptr create_context(cairo_surface_ptr const& surface)
{

View file

@ -165,7 +165,7 @@ class MAPNIK_DECL cairo_renderer : public feature_style_processor<cairo_renderer
public cairo_renderer_base
{
public:
typedef cairo_renderer_base processor_impl_type;
using processor_impl_type = cairo_renderer_base;
cairo_renderer(Map const& m,
T const& obj,
double scale_factor=1.0,

View file

@ -57,7 +57,7 @@
namespace mapnik
{
typedef boost::unique_lock<std::mutex> scoped_lock;
using scoped_lock = boost::unique_lock<std::mutex>;
}
#endif // MAPNIK_CONFIG_HPP

View file

@ -33,7 +33,7 @@
namespace mapnik {
template <typename T,int dim>
struct coord {
typedef T type;
using type = T;
};
template <typename T>
@ -46,7 +46,7 @@ struct coord<T,2>
boost::multipliable2<coord<T,2>, T > > > > > >
{
typedef T type;
using type = T;
T x;
T y;
public:
@ -139,7 +139,7 @@ private:
template <typename T>
struct coord<T,3>
{
typedef T type;
using type = T;
T x;
T y;
T z;
@ -182,8 +182,8 @@ private:
}
};
typedef coord<double,2> coord2d;
typedef coord<int,2> coord2i;
using coord2d = coord<double,2>;
using coord2i = coord<int,2>;
template <typename charT,typename traits,typename T ,int dim>

View file

@ -34,7 +34,7 @@ namespace mapnik {
template <typename T>
class coord_array
{
typedef T coord_type;
using coord_type = T;
coord_type* pt_;
const unsigned size_;
public:

View file

@ -58,7 +58,7 @@ namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
namespace phoenix = boost::phoenix;
typedef boost::spirit::ascii::space_type ascii_space_type;
using ascii_space_type = boost::spirit::ascii::space_type;
struct named_colors_ : qi::symbols<char,color>
{
@ -79,7 +79,7 @@ struct percent_conv_impl
template <typename T>
struct result
{
typedef unsigned type;
using type = unsigned;
};
unsigned operator() (double val) const
@ -93,7 +93,7 @@ struct alpha_conv_impl
template <typename T>
struct result
{
typedef unsigned type;
using type = unsigned;
};
unsigned operator() (double val) const
@ -107,7 +107,7 @@ struct hsl_conv_impl
template<typename T>
struct result
{
typedef void type;
using type = void;
};
template <typename T0,typename T1, typename T2, typename T3>

View file

@ -41,23 +41,23 @@ struct MAPNIK_DECL coord_transform
template <typename T>
struct void_type
{
typedef void type;
using type = void;
};
template <typename T, typename D, typename _ = void>
struct select_value_type
{
typedef D type;
using type = D;
};
template <typename T, typename D>
struct select_value_type<T, D, typename void_type<typename T::value_type>::type>
{
typedef typename T::value_type type;
using type = typename T::value_type;
};
typedef std::size_t size_type;
typedef typename select_value_type<Geometry, void>::type value_type;
using size_type = std::size_t;
using value_type = typename select_value_type<Geometry, void>::type;
coord_transform(Transform const& t,
Geometry & geom,

View file

@ -48,7 +48,7 @@ struct MAPNIK_DECL Featureset : private mapnik::noncopyable
virtual ~Featureset() {}
};
typedef std::shared_ptr<Featureset> featureset_ptr;
using featureset_ptr = std::shared_ptr<Featureset>;
class MAPNIK_DECL datasource_exception : public std::exception
{
@ -132,9 +132,9 @@ protected:
parameters params_;
};
typedef const char * datasource_name();
typedef datasource* create_ds(parameters const& params);
typedef void destroy_ds(datasource *ds);
using datasource_name = const char* (*)();
using create_ds = datasource* (*) (parameters const&);
using destroy_ds = void (*) (datasource *);
class datasource_deleter
{
@ -145,7 +145,7 @@ public:
}
};
typedef std::shared_ptr<datasource> datasource_ptr;
using datasource_ptr = std::shared_ptr<datasource>;
#ifdef MAPNIK_STATIC_PLUGINS
#define DATASOURCE_PLUGIN(classname)

View file

@ -61,7 +61,7 @@ namespace mapnik {
none = 3
};
typedef boost::unordered_map<std::string, severity_type> severity_map;
using severity_map = boost::unordered_map<std::string, severity_type>;
// global security level
static severity_type get_severity()
@ -162,7 +162,7 @@ namespace mapnik {
class clog_sink
{
public:
typedef std::basic_ostringstream<Ch, Tr, A> stream_buffer;
using stream_buffer = std::basic_ostringstream<Ch, Tr, A>;
void operator()(const logger::severity_type& /*severity*/, const stream_buffer &s)
{
@ -189,7 +189,7 @@ namespace mapnik {
class base_log : public mapnik::noncopyable
{
public:
typedef OutputPolicy<Ch, Tr, A> output_policy;
using output_policy = OutputPolicy<Ch, Tr, A>;
base_log() {}
@ -259,7 +259,7 @@ namespace mapnik {
class base_log_always : public mapnik::noncopyable
{
public:
typedef OutputPolicy<Ch, Tr, A> output_policy;
using output_policy = OutputPolicy<Ch, Tr, A>;
base_log_always() {}
@ -297,9 +297,9 @@ namespace mapnik {
};
typedef base_log<clog_sink, logger::debug> base_log_debug;
typedef base_log<clog_sink, logger::warn> base_log_warn;
typedef base_log_always<clog_sink, logger::error> base_log_error;
using base_log_debug = base_log<clog_sink, logger::debug>;
using base_log_warn = base_log<clog_sink, logger::warn>;
using base_log_error = base_log_always<clog_sink, logger::error>;
} // namespace detail

View file

@ -138,7 +138,7 @@ protected:
template <typename ENUM, int THE_MAX>
class MAPNIK_DECL enumeration {
public:
typedef ENUM native_type;
using native_type = ENUM;
enumeration()
: value_() {}
@ -317,16 +317,16 @@ operator>>(std::istream & is, mapnik::enumeration<ENUM, THE_MAX> & e)
} // end of namespace
/** Helper macro. Creates a typedef.
/** Helper macro.
* @relates mapnik::enumeration
*/
#ifdef _MSC_VER
#define DEFINE_ENUM( name, e) \
template enumeration<e, e ## _MAX>; \
typedef enumeration<e, e ## _MAX> name
using name = enumeration<e, e ## _MAX>;
#else
#define DEFINE_ENUM( name, e) \
typedef enumeration<e, e ## _MAX> name
using name = enumeration<e, e ## _MAX>;
#endif
/** Helper macro. Runs the verify_mapnik_enum() method during static initialization.

View file

@ -47,7 +47,7 @@ namespace {
template <typename T, typename Attributes>
struct evaluate_expression : boost::static_visitor<T>
{
typedef T value_type;
using value_type = T;
explicit evaluate_expression(Attributes const& attributes)
: attributes_(attributes) {}
@ -139,7 +139,7 @@ struct evaluate_expression : boost::static_visitor<T>
template <typename T>
struct evaluate_expression<T, boost::none_t> : boost::static_visitor<T>
{
typedef T value_type;
using value_type = T;
evaluate_expression(boost::none_t) {}

View file

@ -38,8 +38,8 @@ namespace mapnik
{
// fwd declare to reduce compile time
typedef std::shared_ptr<expr_node> expression_ptr;
typedef std::set<expression_ptr> expression_set;
using expression_ptr = std::shared_ptr<expr_node>;
using expression_set = std::set<expression_ptr>;
MAPNIK_DECL expression_ptr parse_expression (std::string const& wkt, std::string const& encoding = "UTF8");
}

View file

@ -42,9 +42,9 @@ namespace mapnik
template <typename T0, typename T1, typename T2>
struct evaluate : boost::static_visitor<T1>
{
typedef T0 feature_type;
typedef T1 value_type;
typedef T2 variable_type;
using feature_type = T0;
using value_type = T1;
using variable_type = T2;
explicit evaluate(feature_type const& f, variable_type const& v)
: feature_(f),

View file

@ -49,7 +49,7 @@ struct unicode_impl
template <typename T>
struct result
{
typedef mapnik::value_unicode_string type;
using type = mapnik::value_unicode_string;
};
explicit unicode_impl(mapnik::transcoder const& tr)
@ -68,7 +68,7 @@ struct regex_match_impl
template <typename T>
struct result
{
typedef expr_node type;
using type = expr_node;
};
explicit regex_match_impl(mapnik::transcoder const& tr)
@ -86,7 +86,7 @@ struct regex_replace_impl
template <typename T>
struct result
{
typedef expr_node type;
using type = expr_node;
};
explicit regex_replace_impl(mapnik::transcoder const& tr)
@ -114,7 +114,7 @@ struct geometry_types : qi::symbols<char,mapnik::value_integer>
template <typename T>
struct integer_parser
{
typedef qi::int_parser<T,10,1,-1> type;
using type = qi::int_parser<T,10,1,-1>;
};
#ifdef __GNUC__
@ -125,7 +125,7 @@ template <typename Iterator>
struct expression_grammar : qi::grammar<Iterator, expr_node(), space_type>
#endif
{
typedef qi::rule<Iterator, expr_node(), space_type> rule_type;
using rule_type = qi::rule<Iterator, expr_node(), space_type>;
explicit expression_grammar(std::string const& encoding = "utf-8");

View file

@ -40,21 +40,21 @@ namespace mapnik
{
template <typename Tag> struct make_op;
template <> struct make_op<tags::negate> { typedef std::negate<value_type> type;};
template <> struct make_op<tags::plus> { typedef std::plus<value_type> type;};
template <> struct make_op<tags::minus> { typedef std::minus<value_type> type;};
template <> struct make_op<tags::mult> { typedef std::multiplies<value_type> type;};
template <> struct make_op<tags::div> { typedef std::divides<value_type> type;};
template <> struct make_op<tags::mod> { typedef std::modulus<value_type> type;};
template <> struct make_op<tags::less> { typedef std::less<value_type> type;};
template <> struct make_op<tags::less_equal> { typedef std::less_equal<value_type> type;};
template <> struct make_op<tags::greater> { typedef std::greater<value_type> type;};
template <> struct make_op<tags::greater_equal> { typedef std::greater_equal<value_type> type;};
template <> struct make_op<tags::equal_to> { typedef std::equal_to<value_type> type;};
template <> struct make_op<tags::not_equal_to> { typedef std::not_equal_to<value_type> type;};
template <> struct make_op<tags::logical_not> { typedef std::logical_not<value_type> type;};
template <> struct make_op<tags::logical_and> { typedef std::logical_and<value_type> type;};
template <> struct make_op<tags::logical_or> { typedef std::logical_or<value_type> type;};
template <> struct make_op<tags::negate> { using type = std::negate<value_type>;};
template <> struct make_op<tags::plus> { using type = std::plus<value_type>;};
template <> struct make_op<tags::minus> { using type = std::minus<value_type>;};
template <> struct make_op<tags::mult> { using type = std::multiplies<value_type>;};
template <> struct make_op<tags::div> { using type = std::divides<value_type>;};
template <> struct make_op<tags::mod> { using type = std::modulus<value_type>;};
template <> struct make_op<tags::less> { using type = std::less<value_type>;};
template <> struct make_op<tags::less_equal> { using type = std::less_equal<value_type>;};
template <> struct make_op<tags::greater> { using type = std::greater<value_type>;};
template <> struct make_op<tags::greater_equal> { using type = std::greater_equal<value_type>;};
template <> struct make_op<tags::equal_to> { using type = std::equal_to<value_type>;};
template <> struct make_op<tags::not_equal_to> { using type = std::not_equal_to<value_type>;};
template <> struct make_op<tags::logical_not> { using type = std::logical_not<value_type>;};
template <> struct make_op<tags::logical_and> { using type = std::logical_and<value_type>;};
template <> struct make_op<tags::logical_or> { using type = std::logical_or<value_type>;};
template <typename Tag>
struct unary_node

View file

@ -165,9 +165,9 @@ template <typename Tag> struct unary_node;
struct regex_match_node;
struct regex_replace_node;
typedef mapnik::value value_type;
using value_type = mapnik::value;
typedef boost::mpl::vector25<
using expr_types = boost::mpl::vector25<
value_null,
value_bool,
value_integer,
@ -193,9 +193,9 @@ boost::recursive_wrapper<binary_node<tags::logical_and> >,
boost::recursive_wrapper<binary_node<tags::logical_or> >,
boost::recursive_wrapper<regex_match_node>,
boost::recursive_wrapper<regex_replace_node>
>::type expr_types;
>::type;
typedef boost::make_recursive_variant_over<expr_types>::type expr_node;
using expr_node = boost::make_recursive_variant_over<expr_types>::type;
}

View file

@ -42,8 +42,8 @@ class factory : public singleton<factory <product_type,
Args...> >
{
private:
typedef product_type* (*product_creator)(Args...);
typedef std::map<key_type,product_creator> product_map;
using product_creator = product_type* (*) (Args...);
using product_map = std::map<key_type,product_creator>;
product_map map_;
public:

View file

@ -48,7 +48,7 @@ namespace mapnik {
class raster;
class feature_impl;
typedef std::shared_ptr<raster> raster_ptr;
using raster_ptr = std::shared_ptr<raster>;
template <typename T>
class context : private mapnik::noncopyable
@ -56,13 +56,13 @@ class context : private mapnik::noncopyable
{
friend class feature_impl;
public:
typedef T map_type;
typedef typename map_type::value_type value_type;
typedef typename map_type::key_type key_type;
typedef typename map_type::size_type size_type;
typedef typename map_type::difference_type difference_type;
typedef typename map_type::iterator iterator;
typedef typename map_type::const_iterator const_iterator;
using map_type = T;
using value_type = typename map_type::value_type;
using key_type = typename map_type::key_type;
using size_type = typename map_type::size_type;
using difference_type = typename map_type::difference_type;
using iterator = typename map_type::iterator;
using const_iterator = typename map_type::const_iterator;
context()
: mapping_() {}
@ -87,8 +87,8 @@ private:
map_type mapping_;
};
typedef context<std::map<std::string,std::size_t> > context_type;
typedef std::shared_ptr<context_type> context_ptr;
using context_type = context<std::map<std::string,std::size_t> >;
using context_ptr = std::shared_ptr<context_type>;
static const value default_feature_value;
@ -97,9 +97,9 @@ class MAPNIK_DECL feature_impl : private mapnik::noncopyable
friend class feature_kv_iterator;
public:
typedef mapnik::value value_type;
typedef std::vector<value_type> cont_type;
typedef feature_kv_iterator iterator;
using value_type = mapnik::value;
using cont_type = std::vector<value_type>;
using iterator = feature_kv_iterator;
feature_impl(context_ptr const& ctx, mapnik::value_integer id)
: id_(id),
@ -308,9 +308,9 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f)
}
// TODO - remove at Mapnik 3.x
typedef feature_impl Feature;
using Feature = feature_impl;
typedef std::shared_ptr<feature_impl> feature_ptr;
using feature_ptr = std::shared_ptr<feature_impl>;
}

View file

@ -49,7 +49,7 @@ class MAPNIK_DECL feature_kv_iterator :
boost::forward_traversal_tag>
{
public:
typedef std::tuple<std::string,value> value_type;
using value_type = std::tuple<std::string,value>;
feature_kv_iterator (feature_impl const& f, bool begin = false);
private:
@ -75,7 +75,7 @@ struct value_not_null
}
};
typedef boost::filter_iterator<value_not_null, feature_kv_iterator> feature_kv_iterator2;
using feature_kv_iterator2 = boost::filter_iterator<value_not_null, feature_kv_iterator>;
}

View file

@ -36,8 +36,8 @@ public:
virtual ~IProcessorContext() {}
};
typedef std::shared_ptr<IProcessorContext> processor_context_ptr;
typedef std::map<std::string, processor_context_ptr > feature_style_context_map;
using processor_context_ptr = std::shared_ptr<IProcessorContext>;
using feature_style_context_map = std::map<std::string, processor_context_ptr >;
}

View file

@ -107,6 +107,8 @@ struct feature_style_processor<Processor>::symbol_dispatch : public boost::stati
proj_transform const& prj_trans_;
};
//using no_tag = char (**)[1];
//using yes_tag = char (**)[2];
typedef char (&no_tag)[1];
typedef char (&yes_tag)[2];
@ -119,7 +121,7 @@ template <typename T0, typename T1> yes_tag has_process_helper(process_memfun_he
template<typename T0,typename T1>
struct has_process
{
typedef typename T0::processor_impl_type processor_impl_type;
using processor_impl_type = typename T0::processor_impl_type;
BOOST_STATIC_CONSTANT(bool
, value = sizeof(has_process_helper<processor_impl_type,T1>(0)) == sizeof(yes_tag)
);
@ -143,7 +145,7 @@ struct layer_rendering_material
proj1_(lay.srs(),true) {}
};
typedef std::shared_ptr<layer_rendering_material> layer_rendering_material_ptr;
using layer_rendering_material_ptr = std::shared_ptr<layer_rendering_material>;
template <typename Processor>

View file

@ -49,7 +49,7 @@ enum filter_mode_enum {
DEFINE_ENUM( filter_mode_e, filter_mode_enum );
typedef std::vector<rule> rules;
using rules = std::vector<rule>;
class MAPNIK_DECL feature_type_style
{

View file

@ -32,7 +32,7 @@ namespace mapnik {
template <typename T>
class filter_featureset : public Featureset
{
typedef T filter_type;
using filter_type = T;
public:
filter_featureset(featureset_ptr const& fs, filter_type && filter)

View file

@ -50,11 +50,11 @@ namespace mapnik
{
class stroker;
typedef std::shared_ptr<stroker> stroker_ptr;
using stroker_ptr = std::shared_ptr<stroker>;
class font_face_set;
typedef std::shared_ptr<font_face_set> face_set_ptr;
using face_set_ptr = std::shared_ptr<font_face_set>;
class font_face;
typedef std::shared_ptr<font_face> face_ptr;
using face_ptr = std::shared_ptr<font_face>;
class MAPNIK_DECL freetype_engine
@ -93,8 +93,8 @@ private:
template <typename T>
class MAPNIK_DECL face_manager : private mapnik::noncopyable
{
typedef T font_engine_type;
typedef std::map<std::string, face_ptr> face_ptr_cache_type;
using font_engine_type = T;
using face_ptr_cache_type = std::map<std::string, face_ptr>;
public:
face_manager(T & engine)
@ -116,7 +116,7 @@ private:
face_ptr_cache_type face_ptr_cache_;
};
typedef face_manager<freetype_engine> face_manager_freetype;
using face_manager_freetype = face_manager<freetype_engine>;
}

View file

@ -49,10 +49,10 @@ public:
PolygonExterior = Polygon,
PolygonInterior = Polygon | ( 1 << geometry_bits)
};
typedef T coord_type;
typedef Container<coord_type> container_type;
typedef typename container_type::value_type value_type;
typedef typename container_type::size_type size_type;
using coord_type = T;
using container_type = Container<coord_type>;
using value_type = typename container_type::value_type;
using size_type = typename container_type::size_type;
private:
container_type cont_;
types type_;
@ -153,9 +153,9 @@ public:
}
};
typedef geometry<double,vertex_vector> geometry_type;
typedef std::shared_ptr<geometry_type> geometry_ptr;
typedef boost::ptr_vector<geometry_type> geometry_container;
using geometry_type = geometry<double,vertex_vector>;
using geometry_ptr = std::shared_ptr<geometry_type>;
using geometry_container = boost::ptr_vector<geometry_type>;
}

View file

@ -55,7 +55,7 @@ namespace mapnik
(((std::uint64_t) ((std::uint8_t) (A)[1])) << 48) | \
(((std::uint64_t) ((std::uint8_t) (A)[0])) << 56))
typedef std::uint8_t byte;
using byte = std::uint8_t;
#define float8net(V,M) do { double def_temp; \
((byte*) &def_temp)[0]=(M)[7]; \
((byte*) &def_temp)[1]=(M)[6]; \

View file

@ -36,8 +36,8 @@
namespace mapnik
{
typedef std::pair<double, mapnik::color> stop_pair;
typedef std::vector<stop_pair > stop_array;
using stop_pair = std::pair<double, mapnik::color>;
using stop_array = std::vector<stop_pair >;
enum gradient_enum
{

View file

@ -52,12 +52,12 @@ template <typename T>
class MAPNIK_DECL hit_grid
{
public:
typedef T value_type;
typedef mapnik::ImageData<value_type> data_type;
typedef std::string lookup_type;
using value_type = T;
using data_type = mapnik::ImageData<value_type>;
using lookup_type = std::string;
// mapping between pixel id and key
typedef std::map<value_type, lookup_type> feature_key_type;
typedef std::map<lookup_type, mapnik::feature_ptr> feature_type;
using feature_key_type = std::map<value_type, lookup_type>;
using feature_type = std::map<lookup_type, mapnik::feature_ptr>;
static const value_type base_mask;
private:
@ -232,7 +232,7 @@ public:
};
typedef hit_grid<mapnik::value_integer> grid;
using grid = hit_grid<mapnik::value_integer>;
}
#endif //MAPNIK_GRID_HPP

View file

@ -44,12 +44,12 @@ namespace mapnik {
template <typename RendererBase, typename RendererType, typename Detector, typename RendererContext>
struct raster_markers_rasterizer_dispatch_grid : mapnik::noncopyable
{
typedef typename RendererBase::pixfmt_type pixfmt_type;
typedef typename RendererBase::pixfmt_type::color_type color_type;
using pixfmt_type = typename RendererBase::pixfmt_type;
using color_type = typename RendererBase::pixfmt_type::color_type;
typedef typename std::tuple_element<0,RendererContext>::type BufferType;
typedef typename std::tuple_element<1,RendererContext>::type RasterizerType;
typedef typename std::tuple_element<2,RendererContext>::type PixMapType;
using BufferType = typename std::tuple_element<0,RendererContext>::type;
using RasterizerType = typename std::tuple_element<1,RendererContext>::type;
using PixMapType = typename std::tuple_element<2,RendererContext>::type;
raster_markers_rasterizer_dispatch_grid(image_data_32 const& src,
agg::trans_affine const& marker_trans,
@ -193,14 +193,14 @@ private:
template <typename SvgRenderer, typename Detector, typename RendererContext>
struct vector_markers_rasterizer_dispatch_grid : mapnik::noncopyable
{
typedef typename SvgRenderer::renderer_base renderer_base;
typedef typename SvgRenderer::vertex_source_type vertex_source_type;
typedef typename SvgRenderer::attribute_source_type attribute_source_type;
typedef typename renderer_base::pixfmt_type pixfmt_type;
using renderer_base = typename SvgRenderer::renderer_base ;
using vertex_source_type = typename SvgRenderer::vertex_source_type ;
using attribute_source_type = typename SvgRenderer::attribute_source_type;
using pixfmt_type = typename renderer_base::pixfmt_type ;
typedef typename std::tuple_element<0,RendererContext>::type BufferType;
typedef typename std::tuple_element<1,RendererContext>::type RasterizerType;
typedef typename std::tuple_element<2,RendererContext>::type PixMapType;
using BufferType = typename std::tuple_element<0,RendererContext>::type;
using RasterizerType = typename std::tuple_element<1,RendererContext>::type;
using PixMapType = typename std::tuple_element<2,RendererContext>::type;
vector_markers_rasterizer_dispatch_grid(vertex_source_type & path,
attribute_source_type const& attrs,

View file

@ -31,16 +31,16 @@ namespace mapnik
//==================================================================gray16
struct gray16
{
typedef agg::int16u value_type;
typedef agg::int32u calc_type;
typedef agg::int64 long_type;
using value_type = agg::int16u;
using calc_type = agg::int32u;
using long_type = agg::int64 ;
enum base_scale_e
{
base_shift = 16,
base_scale = 1 << base_shift,
base_mask = base_scale - 1
};
typedef gray16 self_type;
using self_type = gray16;
value_type v;
value_type a;
@ -168,9 +168,9 @@ struct gray16
//==================================================================gray32
struct gray32
{
typedef agg::int32 value_type;
typedef agg::int64u calc_type;
typedef agg::int64 long_type;
using value_type = agg::int32;
using calc_type = agg::int64u;
using long_type = agg::int64 ;
// NOTE: don't touch this enum since enums cannot be
// 64 bit and we need to ensure that alpha = base_mask
// in grid_pixfmt.hpp#blend_hiline#l256
@ -182,7 +182,7 @@ struct gray32
base_scale = 1 << base_shift,
base_mask = base_scale - 1
};
typedef gray32 self_type;
using self_type = gray32;
value_type v;
value_type a;
@ -310,9 +310,9 @@ struct gray32
//==================================================================gray64
struct gray64
{
typedef agg::int64 value_type;
typedef agg::int64u calc_type;
typedef agg::int64 long_type;
using value_type = agg::int64;
using calc_type = agg::int64u;
using long_type = agg::int64 ;
// NOTE: don't touch this enum since enums cannot be
// 64 bit and we need to ensure that alpha = base_mask
// in grid_pixfmt.hpp#blend_hiline#l256
@ -324,7 +324,7 @@ struct gray64
base_scale = 1 << base_shift,
base_mask = base_scale - 1
};
typedef gray64 self_type;
using self_type = gray64;
value_type v;
value_type a;

View file

@ -34,9 +34,9 @@ namespace mapnik
//============================================================blender_gray
template<class ColorT> struct blender_gray
{
typedef ColorT color_type;
typedef typename color_type::value_type value_type;
typedef typename color_type::calc_type calc_type;
using color_type = ColorT;
using value_type = typename color_type::value_type;
using calc_type = typename color_type::calc_type;
enum base_scale_e { base_shift = color_type::base_shift };
static AGG_INLINE void blend_pix(value_type* p, unsigned cv,
@ -52,7 +52,7 @@ template<class ColorT> struct blender_gray
template<class ColorT, class GammaLut> class apply_gamma_dir_gray
{
public:
typedef typename ColorT::value_type value_type;
using value_type = typename ColorT::value_type;
apply_gamma_dir_gray(const GammaLut& gamma) : m_gamma(gamma) {}
@ -71,7 +71,7 @@ private:
template<class ColorT, class GammaLut> class apply_gamma_inv_gray
{
public:
typedef typename ColorT::value_type value_type;
using value_type = typename ColorT::value_type;
apply_gamma_inv_gray(const GammaLut& gamma) : m_gamma(gamma) {}
@ -91,13 +91,13 @@ template<class Blender, class RenBuf, unsigned Step=1, unsigned Offset=0>
class pixfmt_alpha_blend_gray
{
public:
typedef RenBuf rbuf_type;
typedef typename rbuf_type::row_data row_data;
typedef Blender blender_type;
typedef typename blender_type::color_type color_type;
typedef int order_type; // A fake one
typedef typename color_type::value_type value_type;
typedef typename color_type::calc_type calc_type;
using rbuf_type = RenBuf ;
using row_data = typename rbuf_type::row_data;
using blender_type = Blender ;
using color_type = typename blender_type::color_type;
using order_type = int ; // A fake one
using value_type = typename color_type::value_type ;
using calc_type = typename color_type::calc_type ;
enum base_scale_e
{
base_shift = color_type::base_shift,
@ -592,7 +592,7 @@ public:
unsigned len,
agg::int8u cover)
{
typedef typename SrcPixelFormatRenderer::value_type src_value_type;
using src_value_type = typename SrcPixelFormatRenderer::value_type;
const src_value_type* psrc = (src_value_type*)from.row_ptr(ysrc);
if(psrc)
{
@ -619,7 +619,7 @@ public:
unsigned len,
agg::int8u cover)
{
typedef typename SrcPixelFormatRenderer::value_type src_value_type;
using src_value_type = typename SrcPixelFormatRenderer::value_type;
const src_value_type* psrc = (src_value_type*)from.row_ptr(ysrc);
if(psrc)
{
@ -639,22 +639,21 @@ private:
rbuf_type* m_rbuf;
};
typedef blender_gray<gray16> blender_gray16;
using blender_gray16 = blender_gray<gray16>;
typedef pixfmt_alpha_blend_gray<blender_gray16,
mapnik::grid_rendering_buffer> pixfmt_gray16; //----pixfmt_gray16
using pixfmt_gray16 = pixfmt_alpha_blend_gray<blender_gray16,
mapnik::grid_rendering_buffer>; //----pixfmt_gray16
typedef blender_gray<gray32> blender_gray32;
using blender_gray32 = blender_gray<gray32>;
typedef pixfmt_alpha_blend_gray<blender_gray32,
mapnik::grid_rendering_buffer> pixfmt_gray32; //----pixfmt_gray32
using pixfmt_gray32 = pixfmt_alpha_blend_gray<blender_gray32,
mapnik::grid_rendering_buffer>; //----pixfmt_gray32
typedef blender_gray<gray64> blender_gray64;
using blender_gray64 = blender_gray<gray64>;
typedef pixfmt_alpha_blend_gray<blender_gray64,
mapnik::grid_rendering_buffer> pixfmt_gray64; //----pixfmt_gray64
using pixfmt_gray64 = pixfmt_alpha_blend_gray<blender_gray64,
mapnik::grid_rendering_buffer>; //----pixfmt_gray64
}
#endif

View file

@ -65,8 +65,8 @@ class MAPNIK_DECL grid_renderer : public feature_style_processor<grid_renderer<T
{
public:
typedef T buffer_type;
typedef grid_renderer<T> processor_impl_type;
using buffer_type = T;
using processor_impl_type = grid_renderer<T>;
grid_renderer(Map const& m, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
grid_renderer(Map const& m, request const& req, attributes const& vars, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
~grid_renderer();

View file

@ -30,9 +30,9 @@
namespace mapnik {
#ifdef BIGINT
typedef agg::renderer_base<mapnik::pixfmt_gray64> grid_renderer_base_type;
using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray64>;
#else
typedef agg::renderer_base<mapnik::pixfmt_gray32> grid_renderer_base_type;
using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray32>;
#endif
}

View file

@ -28,7 +28,7 @@
namespace mapnik {
typedef agg::row_ptr_cache<mapnik::grid::value_type> grid_rendering_buffer;
using grid_rendering_buffer = agg::row_ptr_cache<mapnik::grid::value_type>;
}

View file

@ -48,12 +48,12 @@ template <typename T>
class hit_grid_view
{
public:
typedef T data_type;
typedef typename T::pixel_type value_type;
typedef typename T::pixel_type pixel_type;
typedef std::string lookup_type;
typedef std::map<value_type, lookup_type> feature_key_type;
typedef std::map<std::string, mapnik::feature_ptr> feature_type;
using data_type = T;
using value_type = typename T::pixel_type;
using pixel_type = typename T::pixel_type;
using lookup_type = std::string;
using feature_key_type = std::map<value_type, lookup_type>;
using feature_type = std::map<std::string, mapnik::feature_ptr>;
hit_grid_view(unsigned x, unsigned y,
unsigned width, unsigned height,
@ -201,7 +201,7 @@ private:
feature_type const& features_;
};
typedef hit_grid_view<mapnik::ImageData<mapnik::value_integer> > grid_view;
using grid_view = hit_grid_view<mapnik::ImageData<mapnik::value_integer> >;
}

View file

@ -64,7 +64,7 @@ public:
{
return item_margin_;
}
void set_item_margin(double item_margin)
{
item_margin_ = item_margin;
@ -85,10 +85,8 @@ private:
double max_difference_;
};
typedef boost::variant<simple_row_layout,
pair_layout> group_layout;
typedef std::shared_ptr<group_layout> group_layout_ptr;
using group_layout = boost::variant<simple_row_layout,pair_layout>;
using group_layout_ptr = std::shared_ptr<group_layout>;
}
#endif // MAPNIK_GROUP_LAYOUT_HPP

View file

@ -36,10 +36,10 @@ using std::vector;
namespace mapnik
{
typedef box2d<double> bound_box;
using bound_box = box2d<double>;
struct group_layout_manager
{
{
group_layout_manager(const group_layout &layout)
: layout_(layout),
input_origin_(0, 0),
@ -57,7 +57,7 @@ struct group_layout_manager
update_layout_(true)
{
}
group_layout_manager(const group_layout &layout, const pixel_position &input_origin,
const vector<bound_box> &item_boxes)
: layout_(layout),
@ -67,27 +67,27 @@ struct group_layout_manager
update_layout_(true)
{
}
inline void set_layout(const group_layout &layout)
{
layout_ = layout;
update_layout_ = true;
}
inline void add_member_bound_box(const bound_box &member_box)
{
member_boxes_.push_back(member_box);
update_layout_ = true;
}
inline const pixel_position &offset_at(size_t i)
{
handle_update();
return member_offsets_.at(i);
}
bound_box offset_box_at(size_t i);
private:
void handle_update();

View file

@ -38,7 +38,7 @@ namespace mapnik
*/
struct group_rule
{
typedef std::vector<symbolizer> symbolizers;
using symbolizers = std::vector<symbolizer>;
group_rule(const expression_ptr& filter = std::make_shared<mapnik::expr_node>(true),
const expression_ptr& repeat_key = expression_ptr());
@ -67,7 +67,7 @@ struct group_rule
{
filter_ = filter;
}
inline expression_ptr const& get_filter() const
{
return filter_;
@ -77,18 +77,18 @@ struct group_rule
{
repeat_key_ = repeat_key;
}
inline expression_ptr const& get_repeat_key() const
{
return repeat_key_;
}
private:
// expression filter - when data matches this then
// the symbolizers should be drawn.
expression_ptr filter_;
// expression repeat key - repeat key to be used with minimum distance
expression_ptr repeat_key_;

View file

@ -35,9 +35,9 @@
namespace mapnik {
class label_collision_detector4;
typedef label_collision_detector4 DetectorType;
using DetectorType = label_collision_detector4;
typedef std::list<pixel_position> pixel_position_list;
using pixel_position_list = std::list<pixel_position>;
/** Helper object that does some of the GroupSymbolizer placement finding work. */
class group_symbolizer_helper : public base_symbolizer_helper

View file

@ -32,8 +32,8 @@
namespace mapnik
{
struct group_rule;
typedef std::shared_ptr<group_rule> group_rule_ptr;
typedef std::vector<group_rule_ptr> group_rules;
using group_rule_ptr = std::shared_ptr<group_rule>;
using group_rules = std::vector<group_rule_ptr>;
/** Contains all group symbolizer properties related to building a group layout. */
struct group_symbolizer_properties
@ -55,7 +55,7 @@ private:
group_rules rules_;
};
typedef std::shared_ptr<group_symbolizer_properties> group_symbolizer_properties_ptr;
using group_symbolizer_properties_ptr = std::shared_ptr<group_symbolizer_properties>;
} //ns mapnik

View file

@ -37,7 +37,7 @@ template <typename T>
class ImageData
{
public:
typedef T pixel_type;
using pixel_type = T;
ImageData(int width, int height)
: width_(static_cast<unsigned>(width)),
@ -192,8 +192,8 @@ private:
ImageData& operator=(ImageData const&);
};
typedef ImageData<unsigned> image_data_32;
typedef ImageData<byte> image_data_8;
using image_data_32 = ImageData<unsigned>;
using image_data_8 = ImageData<byte> ;
}
#endif // MAPNIK_IMAGE_DATA_HPP

View file

@ -112,7 +112,7 @@
// kernel_1d_fixed<float,9> kernel(conv,4);
// color_converted_view<rgb8_pixel_t>(src_view);
//typedef kth_channel_view_type< 0, const rgba8_view_t>::type view_t;
//using view_t = kth_channel_view_type< 0, const rgba8_view_t>::type;
//view_t red = kth_channel_view<0>(const_view(src_view));

View file

@ -47,7 +47,7 @@ struct percent_offset_impl
template <typename T>
struct result
{
typedef double type;
using type = double;
};
double operator() (double val) const

View file

@ -158,19 +158,19 @@ struct colorize_alpha : std::vector<color_stop>
colorize_alpha() {}
};
typedef boost::variant<filter::blur,
filter::gray,
filter::agg_stack_blur,
filter::emboss,
filter::sharpen,
filter::edge_detect,
filter::sobel,
filter::x_gradient,
filter::y_gradient,
filter::invert,
filter::scale_hsla,
filter::colorize_alpha,
filter::color_to_alpha> filter_type;
using filter_type = boost::variant<filter::blur,
filter::gray,
filter::agg_stack_blur,
filter::emboss,
filter::sharpen,
filter::edge_detect,
filter::sobel,
filter::x_gradient,
filter::y_gradient,
filter::invert,
filter::scale_hsla,
filter::colorize_alpha,
filter::color_to_alpha>;
inline std::ostream& operator<< (std::ostream& os, blur)
{

View file

@ -173,7 +173,7 @@ inline bool is_webp (std::string const& filename)
inline boost::optional<std::string> type_from_filename(std::string const& filename)
{
typedef boost::optional<std::string> result_type;
using result_type = boost::optional<std::string>;
if (is_png(filename)) return result_type("png");
if (is_jpeg(filename)) return result_type("jpeg");
if (is_tiff(filename)) return result_type("tiff");

View file

@ -29,7 +29,7 @@ template <typename T>
class image_view
{
public:
typedef typename T::pixel_type pixel_type;
using pixel_type = typename T::pixel_type;
image_view(unsigned x, unsigned y, unsigned width, unsigned height, T const& data)
: x_(x),

View file

@ -42,7 +42,7 @@ using standard_wide::space_type;
struct generate_id
{
typedef int result_type;
using result_type = int;
generate_id(int start)
: id_(start) {}

View file

@ -40,8 +40,8 @@ template <typename Iterator> struct generic_json;
template <typename Iterator>
class MAPNIK_DECL feature_collection_parser : private mapnik::noncopyable
{
typedef Iterator iterator_type;
typedef mapnik::feature_impl feature_type;
using iterator_type = Iterator;
using feature_type = mapnik::feature_impl;
public:
feature_collection_parser(generic_json<Iterator> & json, mapnik::context_ptr const& ctx, mapnik::transcoder const& tr);
~feature_collection_parser();

View file

@ -50,7 +50,7 @@ struct is_container<mapnik::feature_impl const> : mpl::false_ {} ;
template <>
struct container_iterator<mapnik::feature_impl const>
{
typedef mapnik::feature_kv_iterator2 type;
using type = mapnik::feature_kv_iterator2;
};
template <>
@ -77,7 +77,7 @@ template <>
struct transform_attribute<const boost::fusion::cons<mapnik::feature_impl const&, boost::fusion::nil>,
mapnik::geometry_container const& ,karma::domain>
{
typedef mapnik::geometry_container const& type;
using type = mapnik::geometry_container const&;
static type pre(const boost::fusion::cons<mapnik::feature_impl const&, boost::fusion::nil>& f)
{
return boost::fusion::at<mpl::int_<0> >(f).paths();
@ -94,7 +94,7 @@ namespace phoenix = boost::phoenix;
struct get_id
{
template <typename T>
struct result { typedef int type; };
struct result { using type = int; };
int operator() (mapnik::feature_impl const& f) const
{
@ -104,10 +104,10 @@ struct get_id
struct make_properties_range
{
typedef boost::iterator_range<mapnik::feature_kv_iterator> properties_range_type;
using properties_range_type = boost::iterator_range<mapnik::feature_kv_iterator>;
template <typename T>
struct result { typedef properties_range_type type; };
struct result { using type = properties_range_type; };
properties_range_type operator() (mapnik::feature_impl const& f) const
{
@ -119,7 +119,7 @@ struct make_properties_range
struct utf8
{
template <typename T>
struct result { typedef std::string type; };
struct result { using type = std::string; };
std::string operator() (mapnik::value_unicode_string const& ustr) const
{
@ -132,7 +132,7 @@ struct utf8
struct value_base
{
template <typename T>
struct result { typedef mapnik::value_base const& type; };
struct result { using type = mapnik::value_base const&; };
mapnik::value_base const& operator() (mapnik::value const& val) const
{
@ -180,8 +180,8 @@ template <typename OutputIterator>
struct feature_generator_grammar:
karma::grammar<OutputIterator, mapnik::feature_impl const&()>
{
typedef std::tuple<std::string, mapnik::value> pair_type;
typedef make_properties_range::properties_range_type range_type;
using pair_type = std::tuple<std::string, mapnik::value>;
using range_type = make_properties_range::properties_range_type;
feature_generator_grammar()
: feature_generator_grammar::base_type(feature)

View file

@ -69,7 +69,7 @@ public:
struct put_property
{
typedef void result_type;
using result_type = void;
explicit put_property(mapnik::transcoder const& tr)
: tr_(tr) {}
template <typename T0,typename T1, typename T2>
@ -82,7 +82,7 @@ struct put_property
struct extract_geometry
{
typedef boost::ptr_vector<mapnik::geometry_type>& result_type;
using result_type = boost::ptr_vector<mapnik::geometry_type>&;
template <typename T>
result_type operator() (T & feature) const
{

View file

@ -43,8 +43,8 @@ template <typename Iterator> struct generic_json;
template <typename Iterator>
class MAPNIK_DECL feature_parser : private mapnik::noncopyable
{
typedef Iterator iterator_type;
typedef mapnik::feature_impl feature_type;
using iterator_type = Iterator;
using feature_type = mapnik::feature_impl;
public:
feature_parser(generic_json<Iterator> & json, mapnik::transcoder const& tr);
~feature_parser();

View file

@ -38,7 +38,7 @@ template <typename OutputIterator> struct multi_geometry_generator_grammar;
class MAPNIK_DECL feature_generator : private mapnik::noncopyable
{
typedef std::back_insert_iterator<std::string> sink_type;
using sink_type = std::back_insert_iterator<std::string>;
public:
feature_generator();
~feature_generator();
@ -49,7 +49,7 @@ private:
class MAPNIK_DECL geometry_generator : private mapnik::noncopyable
{
typedef std::back_insert_iterator<std::string> sink_type;
using sink_type = std::back_insert_iterator<std::string>;
public:
geometry_generator();
~geometry_generator();

View file

@ -60,7 +60,7 @@ namespace {
struct get_type
{
typedef int result_type;
using result_type = int;
result_type operator() (geometry_type const& geom) const
{
return static_cast<int>(geom.type());
@ -69,7 +69,7 @@ struct get_type
struct get_first
{
typedef geometry_type::value_type const result_type;
using result_type = geometry_type::value_type const;
result_type operator() (geometry_type const& geom) const
{
geometry_type::value_type coord;
@ -80,7 +80,7 @@ struct get_first
struct multi_geometry_type
{
typedef std::tuple<unsigned,bool> result_type;
using result_type = std::tuple<unsigned,bool> ;
result_type operator() (geometry_container const& geom) const
{
unsigned type = 0u;
@ -105,7 +105,7 @@ struct multi_geometry_type
struct not_empty
{
typedef bool result_type;
using result_type = bool;
result_type operator() (geometry_container const& cont) const
{
for (auto const& geom : cont)
@ -119,7 +119,7 @@ struct not_empty
template <typename T>
struct json_coordinate_policy : karma::real_policies<T>
{
typedef boost::spirit::karma::real_policies<T> base_type;
using base_type = boost::spirit::karma::real_policies<T>;
static int floatfield(T n) { return base_type::fmtflags::fixed; }
static unsigned precision(T n)

View file

@ -39,7 +39,7 @@ using standard_wide::space_type;
struct push_vertex
{
typedef void result_type;
using result_type = void;
template <typename T0,typename T1, typename T2, typename T3>
result_type operator() (T0 c, T1 path, T2 x, T3 y) const
@ -51,7 +51,7 @@ struct push_vertex
struct close_path
{
typedef void result_type;
using result_type = void;
template <typename T>
result_type operator() (T path) const
@ -66,7 +66,7 @@ struct close_path
struct cleanup
{
typedef void result_type;
using result_type = void;
template <typename T0>
void operator() (T0 & path) const
{
@ -76,7 +76,7 @@ struct cleanup
struct where_message
{
typedef std::string result_type;
using result_type = std::string;
template <typename Iterator>
std::string operator() (Iterator first, Iterator last, std::size_t size) const
@ -114,7 +114,7 @@ struct geometry_grammar :
qi::rule<Iterator,void(boost::ptr_vector<mapnik::geometry_type>& ),space_type> geometry_collection;
// Nabialek trick //////////////////////////////////////
//typedef typename qi::rule<Iterator,void(FeatureType &), space_type> dispatch_rule;
//using dispatch_rule = typename qi::rule<Iterator,void(FeatureType &), space_type>;
//qi::rule<Iterator,qi::locals<dispatch_rule*>, void(FeatureType&),space_type> geometry;
//qi::symbols<char, dispatch_rule*> geometry_dispatch;
////////////////////////////////////////////////////////

View file

@ -43,7 +43,7 @@ MAPNIK_DECL bool from_geojson(std::string const& json, boost::ptr_vector<geometr
template <typename Iterator>
class MAPNIK_DECL geometry_parser : private mapnik::noncopyable
{
typedef Iterator iterator_type;
using iterator_type = Iterator;
public:
geometry_parser();
~geometry_parser();

View file

@ -80,7 +80,7 @@ struct json_value_visitor : boost::static_visitor<>
template <typename T>
struct put_property_visitor : boost::static_visitor<>
{
typedef T value_type;
using value_type = T;
put_property_visitor(mapnik::keys key, value_type const& val)
: key_(key), val_(val) {}
@ -97,7 +97,7 @@ struct put_property_visitor : boost::static_visitor<>
struct put_property
{
typedef void result_type;
using result_type = void;
template <typename T0,typename T1, typename T2>
result_type operator() (T0 & sym, T1 const& name, T2 const& val) const
{
@ -115,7 +115,7 @@ struct put_property
template <typename Iterator>
struct symbolizer_grammar : qi::grammar<Iterator, space_type, symbolizer()>
{
typedef boost::variant<value_null,value_bool,value_integer,value_double, std::string> json_value_type;
using json_value_type = boost::variant<value_null,value_bool,value_integer,value_double, std::string>;
symbolizer_grammar(generic_json<Iterator> & json)
: symbolizer_grammar::base_type(sym, "symbolizer"),
json_(json)

View file

@ -44,7 +44,7 @@ using standard_wide::space_type;
struct where_message
{
typedef std::string result_type;
using result_type = std::string;
template <typename Iterator>
std::string operator() (Iterator first, Iterator last, std::size_t size) const

View file

@ -33,7 +33,7 @@
namespace mapnik { namespace topojson {
typedef int index_type;
using index_type = int;
struct coordinate
{
@ -41,9 +41,9 @@ struct coordinate
double y;
};
typedef boost::variant<value_null,bool,value_integer,value_double,std::string> value;
typedef std::tuple<std::string, value > property;
typedef std::vector<property> properties;
using value = boost::variant<value_null,bool,value_integer,value_double,std::string>;
using property = std::tuple<std::string, value >;
using properties = std::vector<property>;
struct point
{
@ -83,15 +83,15 @@ struct multi_polygon
struct invalid {};
typedef boost::variant<invalid,
point,
linestring,
polygon,
multi_point,
multi_linestring,
multi_polygon> geometry;
using geometry = boost::variant<invalid,
point,
linestring,
polygon,
multi_point,
multi_linestring,
multi_polygon>;
typedef std::tuple<double,double> pair_type;
using pair_type = std::tuple<double,double>;
struct arc
{

View file

@ -38,7 +38,7 @@ namespace mapnik
struct label_collision_detector
{
typedef std::vector<box2d<double> > label_placements;
using label_placements = std::vector<box2d<double> >;
bool has_placement(box2d<double> const& box)
{
@ -66,7 +66,7 @@ private:
// quad_tree based label collision detector
class label_collision_detector2 : mapnik::noncopyable
{
typedef quad_tree<box2d<double> > tree_t;
using tree_t = quad_tree<box2d<double> >;
tree_t tree_;
public:
@ -100,7 +100,7 @@ public:
// quad_tree based label collision detector with seperate check/insert
class label_collision_detector3 : mapnik::noncopyable
{
typedef quad_tree< box2d<double> > tree_t;
using tree_t = quad_tree< box2d<double> >;
tree_t tree_;
public:
@ -149,11 +149,11 @@ public:
};
private:
typedef quad_tree< label > tree_t;
using tree_t = quad_tree< label >;
tree_t tree_;
public:
typedef tree_t::query_iterator query_iterator;
using query_iterator = tree_t::query_iterator;
explicit label_collision_detector4(box2d<double> const& extent)
: tree_(extent) {}

View file

@ -91,10 +91,10 @@ private:
public:
typedef std::map<std::string,feature_type_style>::const_iterator const_style_iterator;
typedef std::map<std::string,feature_type_style>::iterator style_iterator;
typedef std::map<std::string,font_set>::const_iterator const_fontset_iterator;
typedef std::map<std::string,font_set>::iterator fontset_iterator;
using const_style_iterator = std::map<std::string,feature_type_style>::const_iterator;
using style_iterator = std::map<std::string,feature_type_style>::iterator;
using const_fontset_iterator = std::map<std::string,font_set>::const_iterator;
using fontset_iterator = std::map<std::string,font_set>::iterator;
/*! \brief Default constructor.
*

View file

@ -37,7 +37,7 @@
namespace mapnik
{
typedef std::shared_ptr<boost::interprocess::mapped_region> mapped_region_ptr;
using mapped_region_ptr = std::shared_ptr<boost::interprocess::mapped_region>;
class MAPNIK_DECL mapped_memory_cache :
public singleton<mapped_memory_cache, CreateStatic>,

View file

@ -46,10 +46,10 @@
namespace mapnik
{
typedef agg::pod_bvector<mapnik::svg::path_attributes> attr_storage;
typedef mapnik::svg::svg_storage<mapnik::svg::svg_path_storage,attr_storage> svg_storage_type;
typedef std::shared_ptr<svg_storage_type> svg_path_ptr;
typedef std::shared_ptr<image_data_32> image_ptr;
using attr_storage = agg::pod_bvector<mapnik::svg::path_attributes>;
using svg_storage_type = mapnik::svg::svg_storage<mapnik::svg::svg_path_storage,attr_storage>;
using svg_path_ptr = std::shared_ptr<svg_storage_type>;
using image_ptr = std::shared_ptr<image_data_32>;
/**
* A class to hold either vector or bitmap marker data. This allows these to be treated equally
* in the image caches and most of the render paths.

View file

@ -38,7 +38,7 @@ namespace mapnik
class marker;
typedef std::shared_ptr<marker> marker_ptr;
using marker_ptr = std::shared_ptr<marker>;
class MAPNIK_DECL marker_cache :

View file

@ -61,13 +61,13 @@ namespace mapnik {
template <typename SvgRenderer, typename Detector, typename RendererContext>
struct vector_markers_rasterizer_dispatch : mapnik::noncopyable
{
typedef typename SvgRenderer::renderer_base renderer_base;
typedef typename SvgRenderer::vertex_source_type vertex_source_type;
typedef typename SvgRenderer::attribute_source_type attribute_source_type;
typedef typename renderer_base::pixfmt_type pixfmt_type;
using renderer_base = typename SvgRenderer::renderer_base ;
using vertex_source_type = typename SvgRenderer::vertex_source_type ;
using attribute_source_type = typename SvgRenderer::attribute_source_type;
using pixfmt_type = typename renderer_base::pixfmt_type ;
typedef typename std::tuple_element<0,RendererContext>::type BufferType;
typedef typename std::tuple_element<1,RendererContext>::type RasterizerType;
using BufferType = typename std::tuple_element<0,RendererContext>::type;
using RasterizerType = typename std::tuple_element<1,RendererContext>::type;
vector_markers_rasterizer_dispatch(vertex_source_type & path,
attribute_source_type const& attrs,
@ -187,15 +187,15 @@ private:
template <typename Detector,typename RendererContext>
struct raster_markers_rasterizer_dispatch : mapnik::noncopyable
{
typedef typename std::remove_reference<typename std::tuple_element<0,RendererContext>::type>::type BufferType;
typedef typename std::tuple_element<1,RendererContext>::type RasterizerType;
using BufferType = typename std::remove_reference<typename std::tuple_element<0,RendererContext>::type>::type;
using RasterizerType = typename std::tuple_element<1,RendererContext>::type;
typedef agg::rgba8 color_type;
typedef agg::order_rgba order_type;
typedef agg::pixel32_type pixel_type;
typedef agg::comp_op_adaptor_rgba_pre<color_type, order_type> blender_type; // comp blender
typedef agg::pixfmt_custom_blend_rgba<blender_type, BufferType> pixfmt_comp_type;
typedef agg::renderer_base<pixfmt_comp_type> renderer_base;
using color_type = agg::rgba8;
using order_type = agg::order_rgba;
using pixel_type = agg::pixel32_type;
using blender_type = agg::comp_op_adaptor_rgba_pre<color_type, order_type>; // comp blender
using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, BufferType>;
using renderer_base = agg::renderer_base<pixfmt_comp_type>;
raster_markers_rasterizer_dispatch(image_data_32 const& src,
agg::trans_affine const& marker_trans,
@ -284,7 +284,7 @@ struct raster_markers_rasterizer_dispatch : mapnik::noncopyable
void render_raster_marker(agg::trans_affine const& marker_tr,
double opacity)
{
typedef agg::pixfmt_rgba32_pre pixfmt_pre;
using pixfmt_pre = agg::pixfmt_rgba32_pre;
agg::scanline_u8 sl_;
double width = src_.width();
double height = src_.height();
@ -304,13 +304,13 @@ struct raster_markers_rasterizer_dispatch : mapnik::noncopyable
}
else
{
typedef agg::image_accessor_clone<pixfmt_pre> img_accessor_type;
typedef agg::span_interpolator_linear<> interpolator_type;
//typedef agg::span_image_filter_rgba_2x2<img_accessor_type,interpolator_type> span_gen_type;
typedef agg::span_image_resample_rgba_affine<img_accessor_type> span_gen_type;
typedef agg::renderer_scanline_aa_alpha<renderer_base,
agg::span_allocator<color_type>,
span_gen_type> renderer_type;
using img_accessor_type = agg::image_accessor_clone<pixfmt_pre>;
using interpolator_type = agg::span_interpolator_linear<>;
//using span_gen_type = agg::span_image_filter_rgba_2x2<img_accessor_type,interpolator_type>;
using span_gen_type = agg::span_image_resample_rgba_affine<img_accessor_type>;
using renderer_type = agg::renderer_scanline_aa_alpha<renderer_base,
agg::span_allocator<color_type>,
span_gen_type>;
double p[8];
p[0] = 0; p[1] = 0;

View file

@ -38,7 +38,7 @@ protected:
};
}
typedef non_copyable_::noncopyable noncopyable;
using noncopyable = non_copyable_::noncopyable;
} // namespace mapnik

View file

@ -45,7 +45,7 @@ const double pi = boost::math::constants::pi<double>();
template <typename Geometry>
struct MAPNIK_DECL offset_converter
{
typedef std::size_t size_type;
using size_type = std::size_t;
offset_converter(Geometry & geom)
: geom_(geom)

View file

@ -32,10 +32,10 @@
#ifdef USE_DENSE_HASH_MAP
#include <mapnik/sparsehash/dense_hash_map>
typedef google::dense_hash_map<unsigned int, unsigned char> rgba_hash_table;
using rgba_hash_table = google::dense_hash_map<unsigned int, unsigned char>;
#else
#include <boost/unordered_map.hpp>
typedef boost::unordered_map<unsigned int, unsigned char> rgba_hash_table;
using rgba_hash_table = boost::unordered_map<unsigned int, unsigned char>;
#endif
// stl

View file

@ -40,9 +40,9 @@ namespace mapnik
// fwd declare
class boolean;
typedef boost::variant<value_null,value_integer,value_double,std::string> value_holder;
typedef std::pair<std::string, value_holder> parameter;
typedef std::map<std::string, value_holder> param_map;
using value_holder = boost::variant<value_null,value_integer,value_double,std::string>;
using parameter = std::pair<std::string, value_holder>;
using param_map = std::map<std::string, value_holder>;
class MAPNIK_DECL parameters : public param_map
{

View file

@ -156,8 +156,8 @@ namespace params_detail {
template <typename T>
struct converter
{
typedef T value_type;
typedef boost::optional<value_type> return_type;
using value_type = T;
using return_type = boost::optional<value_type>;
static return_type extract(parameters const& params,
std::string const& name,
boost::optional<T> const& default_opt_value)

View file

@ -45,7 +45,7 @@ struct MAPNIK_DECL path_processor
static void collect_attributes(path_expression const& path, std::set<std::string>& names);
};
typedef mapnik::path_processor path_processor_type;
using path_processor_type = mapnik::path_processor;
}

View file

@ -36,9 +36,9 @@ namespace mapnik
struct attribute;
typedef boost::variant<std::string, attribute> path_component;
typedef std::vector<path_component> path_expression;
typedef std::shared_ptr<path_expression> path_expression_ptr;
using path_component = boost::variant<std::string, attribute>;
using path_expression = std::vector<path_component>;
using path_expression_ptr = std::shared_ptr<path_expression>;
}

View file

@ -33,12 +33,12 @@ namespace mapnik
{
// Opaque structure for handle
typedef struct _mapnik_lib_t mapnik_lib_t;
using mapnik_lib_t = struct _mapnik_lib_t;
class PluginInfo : mapnik::noncopyable
{
public:
typedef const char * name_func();
using name_func = const char* (*) ();
PluginInfo (std::string const& filename,
std::string const& library_name);
~PluginInfo();

View file

@ -46,14 +46,14 @@ BOOST_GEOMETRY_REGISTER_POINT_2D(mapnik::coord2d, double, cs::cartesian, x, y)
namespace boost { namespace geometry { namespace traits
{
template<> struct tag<mapnik::box2d<double> > { typedef box_tag type; };
template<> struct tag<mapnik::box2d<double> > { using type = box_tag; };
template<> struct point_type<mapnik::box2d<double> > { typedef mapnik::coord2d type; };
template<> struct point_type<mapnik::box2d<double> > { using type = mapnik::coord2d; };
template <>
struct indexed_access<mapnik::box2d<double>, min_corner, 0>
{
typedef coordinate_type<mapnik::coord2d>::type ct;
using ct = coordinate_type<mapnik::coord2d>::type;
static inline ct get(mapnik::box2d<double> const& b) { return b.minx();}
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_minx(value); }
};
@ -61,7 +61,7 @@ struct indexed_access<mapnik::box2d<double>, min_corner, 0>
template <>
struct indexed_access<mapnik::box2d<double>, min_corner, 1>
{
typedef coordinate_type<mapnik::coord2d>::type ct;
using ct = coordinate_type<mapnik::coord2d>::type;
static inline ct get(mapnik::box2d<double> const& b) { return b.miny();}
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_miny(value); }
};
@ -69,7 +69,7 @@ struct indexed_access<mapnik::box2d<double>, min_corner, 1>
template <>
struct indexed_access<mapnik::box2d<double>, max_corner, 0>
{
typedef coordinate_type<mapnik::coord2d>::type ct;
using ct = coordinate_type<mapnik::coord2d>::type;
static inline ct get(mapnik::box2d<double> const& b) { return b.maxx();}
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_maxx(value); }
};
@ -77,7 +77,7 @@ struct indexed_access<mapnik::box2d<double>, max_corner, 0>
template <>
struct indexed_access<mapnik::box2d<double>, max_corner, 1>
{
typedef coordinate_type<mapnik::coord2d>::type ct;
using ct = coordinate_type<mapnik::coord2d>::type;
static inline ct get(mapnik::box2d<double> const& b) { return b.maxy();}
static inline void set(mapnik::box2d<double> &b , ct const& value) { b.set_maxy(value); }
};
@ -91,9 +91,9 @@ using namespace boost::geometry;
template <typename Geometry>
struct polygon_clipper
{
typedef mapnik::coord2d point_2d;
typedef model::polygon<mapnik::coord2d> polygon_2d;
typedef std::deque<polygon_2d> polygon_list;
using point_2d = mapnik::coord2d;
using polygon_2d = model::polygon<mapnik::coord2d>;
using polygon_list = std::deque<polygon_2d>;
enum
{

View file

@ -45,8 +45,8 @@ namespace mapnik
template <typename T,template <typename> class Creator>
class Pool : private mapnik::noncopyable
{
typedef std::shared_ptr<T> HolderType;
typedef std::deque<HolderType> ContType;
using HolderType = std::shared_ptr<T>;
using ContType = std::deque<HolderType>;
Creator<T> creator_;
unsigned initialSize_;

View file

@ -41,10 +41,10 @@ class quad_tree : mapnik::noncopyable
{
struct node
{
typedef T value_t;
typedef std::vector<T> cont_t;
typedef typename cont_t::iterator iterator;
typedef typename cont_t::const_iterator const_iterator;
using value_t = T;
using cont_t = std::vector<T>;
using iterator = typename cont_t::iterator;
using const_iterator = typename cont_t::const_iterator;
box2d<double> extent_;
cont_t cont_;
node * children_[4];
@ -82,15 +82,15 @@ class quad_tree : mapnik::noncopyable
~node () {}
};
typedef boost::ptr_vector<node> nodes_t;
typedef typename node::cont_t cont_t;
typedef typename cont_t::iterator node_data_iterator;
using nodes_t = boost::ptr_vector<node>;
using cont_t = typename node::cont_t;
using node_data_iterator = typename cont_t::iterator;
public:
typedef typename nodes_t::iterator iterator;
typedef typename nodes_t::const_iterator const_iterator;
typedef typename boost::ptr_vector<T,boost::view_clone_allocator> result_t;
typedef typename result_t::iterator query_iterator;
using iterator = typename nodes_t::iterator;
using const_iterator = typename nodes_t::const_iterator;
using result_t = typename boost::ptr_vector<T,boost::view_clone_allocator>;
using query_iterator = typename result_t::iterator;
explicit quad_tree(box2d<double> const& ext,

View file

@ -39,7 +39,7 @@ namespace mapnik {
class query
{
public:
typedef std::tuple<double,double> resolution_type;
using resolution_type = std::tuple<double,double>;
query(box2d<double> const& bbox,
resolution_type const& resolution,

View file

@ -141,7 +141,7 @@ private:
};
typedef std::vector<colorizer_stop> colorizer_stops;
using colorizer_stops = std::vector<colorizer_stop>;
//! \brief Class representing the raster colorizer
@ -226,7 +226,7 @@ private:
};
typedef std::shared_ptr<raster_colorizer> raster_colorizer_ptr;
using raster_colorizer_ptr = std::shared_ptr<raster_colorizer>;
} // mapnik namespace

View file

@ -99,10 +99,10 @@ struct text_render_thunk
* Variant type for render thunks to allow us to re-render them
* via a static visitor later.
*/
typedef boost::variant<point_render_thunk,
text_render_thunk> render_thunk;
typedef std::shared_ptr<render_thunk> render_thunk_ptr;
typedef std::list<render_thunk_ptr> render_thunk_list;
using render_thunk = boost::variant<point_render_thunk,
text_render_thunk>;
using render_thunk_ptr = std::shared_ptr<render_thunk>;
using render_thunk_list = std::list<render_thunk_ptr>;
/**
* Base class for extracting the bounding boxes associated with placing

View file

@ -38,12 +38,12 @@ void render_markers_symbolizer(markers_symbolizer const& sym,
T2 const& renderer_context)
{
using namespace mapnik::svg;
typedef T0 vector_dispatch_type;
typedef T1 raster_dispatch_type;
typedef T2 renderer_context_type;
using vector_dispatch_type = T0;
using raster_dispatch_type = T1;
using renderer_context_type = T2;
typedef boost::mpl::vector<clip_poly_tag,transform_tag,smooth_tag> conv_types;
typedef agg::pod_bvector<path_attributes> svg_attribute_type;
using conv_types = boost::mpl::vector<clip_poly_tag,transform_tag,smooth_tag>;
using svg_attribute_type = agg::pod_bvector<path_attributes>;
std::string filename = get<std::string>(sym, keys::file, feature, common.vars_, "shape://ellipse");
bool clip = get<value_bool>(sym, keys::clip, feature, common.vars_, false);

View file

@ -40,7 +40,7 @@ namespace mapnik
class MAPNIK_DECL rule
{
public:
typedef std::vector<symbolizer> symbolizers;
using symbolizers = std::vector<symbolizer>;
private:
std::string name_;

View file

@ -40,7 +40,7 @@ private:
//rule_cache(rule_cache const& other) = delete; // no copy ctor
//rule_cache& operator=(rule_cache const& other) = delete; // no assignment op
public:
typedef std::vector<rule const*> rule_ptrs;
using rule_ptrs = std::vector<rule const*>;
rule_cache()
: if_rules_(),
else_rules_(),

View file

@ -28,7 +28,7 @@
namespace mapnik
{
typedef std::tuple<double,double,double,double> segment_t;
using segment_t = std::tuple<double,double,double,double>;
static bool y_order(segment_t const& first,segment_t const& second)
{

View file

@ -374,8 +374,8 @@ private:
status init_vertices_visvalingam_whyatt()
{
typedef std::set<weighted_vertex *, weighted_vertex::ascending_sort> VertexSet;
typedef std::vector<weighted_vertex *> VertexList;
using VertexSet = std::set<weighted_vertex *, weighted_vertex::ascending_sort>;
using VertexList = std::vector<weighted_vertex *>;
std::vector<weighted_vertex *> v_list;
vertex2d vtx(vertex2d::no_init);

View file

@ -32,13 +32,13 @@ class span_image_resample_rgba_affine :
public span_image_resample_affine<Source>
{
public:
typedef Source source_type;
typedef typename source_type::color_type color_type;
typedef typename source_type::order_type order_type;
typedef span_image_resample_affine<source_type> base_type;
typedef typename base_type::interpolator_type interpolator_type;
typedef typename color_type::value_type value_type;
typedef typename color_type::long_type long_type;
using source_type = Source;
using color_type = typename source_type::color_type;
using order_type = typename source_type::order_type;
using base_type = span_image_resample_affine<source_type>;
using interpolator_type = typename base_type::interpolator_type;
using value_type = typename color_type::value_type;
using long_type = typename color_type::long_type;
enum base_scale_e
{
base_shift = color_type::base_shift,

View file

@ -53,10 +53,10 @@ namespace mapnik { namespace svg {
template <typename OutputIterator>
class svg_generator : private mapnik::noncopyable
{
typedef svg::svg_root_attributes_grammar<OutputIterator> root_attributes_grammar;
typedef svg::svg_rect_attributes_grammar<OutputIterator> rect_attributes_grammar;
typedef svg::svg_path_attributes_grammar<OutputIterator> path_attributes_grammar;
typedef svg::svg_path_dash_array_grammar<OutputIterator> path_dash_array_grammar;
using root_attributes_grammar = svg::svg_root_attributes_grammar<OutputIterator>;
using rect_attributes_grammar = svg::svg_rect_attributes_grammar<OutputIterator>;
using path_attributes_grammar = svg::svg_path_attributes_grammar<OutputIterator>;
using path_dash_array_grammar = svg::svg_path_dash_array_grammar<OutputIterator>;
public:
explicit svg_generator(OutputIterator& output_iterator);

View file

@ -59,9 +59,9 @@ class path_iterator
boost::forward_traversal_tag>
{
public:
typedef Value value_type;
typedef Container container_type;
//typedef typename Container::value_type value_component_type;
using value_type = Value;
using container_type = Container;
//using value_component_type = typename Container::value_type;
/*!
* @brief Constructor that initializes the reference to the current element to null.
@ -167,13 +167,12 @@ private:
std::shared_ptr<Value> first_value_;
};
/*!
* @brief Specialization of geometry_iterator, as needed by mapnik::svg::svg_path_data_grammar.
* The Value type is a std::tuple that holds 5 elements, the command and the x and y coordinate.
* Each coordinate is stored twice to match the needs of the grammar.
*/
//typedef path_iterator<std::tuple<unsigned, geometry_type::coord_type, geometry_type::value_type>,
// coord_transform<CoordTransform, geometry_type> > path_iterator_type;
// Specialization of geometry_iterator, as needed by mapnik::svg::svg_path_data_grammar.
// The Value type is a std::tuple that holds 5 elements, the command and the x and y coordinate.
// Each coordinate is stored twice to match the needs of the grammar.
//using path_iterator_type = path_iterator<std::tuple<unsigned, geometry_type::coord_type, geometry_type::value_type>,
// coord_transform<CoordTransform, geometry_type> >;
}}

View file

@ -72,7 +72,7 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
private mapnik::noncopyable
{
public:
typedef svg_renderer<OutputIterator> processor_impl_type;
using processor_impl_type = svg_renderer<OutputIterator>;
svg_renderer(Map const& m, OutputIterator& output_iterator, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
svg_renderer(Map const& m, request const& req, attributes const& vars, OutputIterator& output_iterator, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
~svg_renderer();

Some files were not shown because too many files have changed in this diff Show more