+ use std::shared_ptr and std::make_shared
This commit is contained in:
parent
6e6cff4613
commit
b315eb2167
120 changed files with 322 additions and 334 deletions
|
@ -98,7 +98,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn)
|
|||
{
|
||||
throw mapnik::image_reader_exception("Failed to load: " + dest_fn);
|
||||
}
|
||||
boost::shared_ptr<image_32> image_ptr1 = boost::make_shared<image_32>(reader1->width(),reader1->height());
|
||||
std::shared_ptr<image_32> image_ptr1 = std::make_shared<image_32>(reader1->width(),reader1->height());
|
||||
reader1->read(0,0,image_ptr1->data());
|
||||
|
||||
std::unique_ptr<mapnik::image_reader> reader2(mapnik::get_image_reader(src_fn,"png"));
|
||||
|
@ -106,7 +106,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn)
|
|||
{
|
||||
throw mapnik::image_reader_exception("Failed to load: " + src_fn);
|
||||
}
|
||||
boost::shared_ptr<image_32> image_ptr2 = boost::make_shared<image_32>(reader2->width(),reader2->height());
|
||||
std::shared_ptr<image_32> image_ptr2 = std::make_shared<image_32>(reader2->width(),reader2->height());
|
||||
reader2->read(0,0,image_ptr2->data());
|
||||
|
||||
image_data_32 const& dest = image_ptr1->data();
|
||||
|
@ -156,7 +156,7 @@ struct test2
|
|||
{
|
||||
unsigned iter_;
|
||||
unsigned threads_;
|
||||
boost::shared_ptr<image_32> im_;
|
||||
std::shared_ptr<image_32> im_;
|
||||
explicit test2(unsigned iterations, unsigned threads=0) :
|
||||
iter_(iterations),
|
||||
threads_(threads),
|
||||
|
@ -168,7 +168,7 @@ struct test2
|
|||
{
|
||||
throw mapnik::image_reader_exception("Failed to load: " + filename);
|
||||
}
|
||||
im_ = boost::make_shared<image_32>(reader->width(),reader->height());
|
||||
im_ = std::make_shared<image_32>(reader->width(),reader->height());
|
||||
reader->read(0,0,im_->data());
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace
|
|||
{
|
||||
//user-friendly wrapper that uses Python dictionary
|
||||
using namespace boost::python;
|
||||
boost::shared_ptr<mapnik::datasource> create_datasource(dict const& d)
|
||||
std::shared_ptr<mapnik::datasource> create_datasource(dict const& d)
|
||||
{
|
||||
mapnik::parameters params;
|
||||
boost::python::list keys=d.keys();
|
||||
|
@ -92,7 +92,7 @@ boost::shared_ptr<mapnik::datasource> create_datasource(dict const& d)
|
|||
return mapnik::datasource_cache::instance().create(params);
|
||||
}
|
||||
|
||||
boost::python::dict describe(boost::shared_ptr<mapnik::datasource> const& ds)
|
||||
boost::python::dict describe(std::shared_ptr<mapnik::datasource> const& ds)
|
||||
{
|
||||
boost::python::dict description;
|
||||
mapnik::layer_descriptor ld = ds->get_descriptor();
|
||||
|
@ -103,7 +103,7 @@ boost::python::dict describe(boost::shared_ptr<mapnik::datasource> const& ds)
|
|||
return description;
|
||||
}
|
||||
|
||||
boost::python::list fields(boost::shared_ptr<mapnik::datasource> const& ds)
|
||||
boost::python::list fields(std::shared_ptr<mapnik::datasource> const& ds)
|
||||
{
|
||||
boost::python::list flds;
|
||||
if (ds)
|
||||
|
@ -119,7 +119,7 @@ boost::python::list fields(boost::shared_ptr<mapnik::datasource> const& ds)
|
|||
}
|
||||
return flds;
|
||||
}
|
||||
boost::python::list field_types(boost::shared_ptr<mapnik::datasource> const& ds)
|
||||
boost::python::list field_types(std::shared_ptr<mapnik::datasource> const& ds)
|
||||
{
|
||||
boost::python::list fld_types;
|
||||
if (ds)
|
||||
|
@ -173,7 +173,7 @@ void export_datasource()
|
|||
.value("Collection",mapnik::datasource::Collection)
|
||||
;
|
||||
|
||||
class_<datasource,boost::shared_ptr<datasource>,
|
||||
class_<datasource,std::shared_ptr<datasource>,
|
||||
boost::noncopyable>("Datasource",no_init)
|
||||
.def("type",&datasource::type)
|
||||
.def("geometry_type",&datasource::get_geometry_type)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace {
|
|||
|
||||
using namespace boost::python;
|
||||
|
||||
boost::shared_ptr<mapnik::datasource> create_datasource(const dict& d)
|
||||
std::shared_ptr<mapnik::datasource> create_datasource(const dict& d)
|
||||
{
|
||||
mapnik::parameters params;
|
||||
boost::python::list keys=d.keys();
|
||||
|
|
|
@ -228,7 +228,7 @@ void export_feature()
|
|||
.def("push", &context_type::push)
|
||||
;
|
||||
|
||||
class_<mapnik::feature_impl,boost::shared_ptr<mapnik::feature_impl>,
|
||||
class_<mapnik::feature_impl,std::shared_ptr<mapnik::feature_impl>,
|
||||
boost::noncopyable>("Feature",init<context_ptr,mapnik::value_integer>("Default ctor."))
|
||||
.def("id",&mapnik::feature_impl::id)
|
||||
.def("__str__",&mapnik::feature_impl::to_string)
|
||||
|
|
|
@ -65,7 +65,7 @@ inline mapnik::feature_ptr next(mapnik::featureset_ptr const& itr)
|
|||
void export_featureset()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<mapnik::Featureset,boost::shared_ptr<mapnik::Featureset>,
|
||||
class_<mapnik::Featureset,std::shared_ptr<mapnik::Featureset>,
|
||||
boost::noncopyable>("Featureset",no_init)
|
||||
.def("__iter__",pass_through)
|
||||
.def("next",next)
|
||||
|
|
|
@ -79,25 +79,25 @@ void add_geojson_impl(path_type& p, std::string const& json)
|
|||
throw std::runtime_error("Failed to parse geojson geometry");
|
||||
}
|
||||
|
||||
boost::shared_ptr<path_type> from_wkt_impl(std::string const& wkt)
|
||||
std::shared_ptr<path_type> from_wkt_impl(std::string const& wkt)
|
||||
{
|
||||
boost::shared_ptr<path_type> paths = boost::make_shared<path_type>();
|
||||
std::shared_ptr<path_type> paths = std::make_shared<path_type>();
|
||||
if (!mapnik::from_wkt(wkt, *paths))
|
||||
throw std::runtime_error("Failed to parse WKT");
|
||||
return paths;
|
||||
}
|
||||
|
||||
boost::shared_ptr<path_type> from_wkb_impl(std::string const& wkb)
|
||||
std::shared_ptr<path_type> from_wkb_impl(std::string const& wkb)
|
||||
{
|
||||
boost::shared_ptr<path_type> paths = boost::make_shared<path_type>();
|
||||
std::shared_ptr<path_type> paths = std::make_shared<path_type>();
|
||||
if (!mapnik::geometry_utils::from_wkb(*paths, wkb.c_str(), wkb.size()))
|
||||
throw std::runtime_error("Failed to parse WKB");
|
||||
return paths;
|
||||
}
|
||||
|
||||
boost::shared_ptr<path_type> from_geojson_impl(std::string const& json)
|
||||
std::shared_ptr<path_type> from_geojson_impl(std::string const& json)
|
||||
{
|
||||
boost::shared_ptr<path_type> paths = boost::make_shared<path_type>();
|
||||
std::shared_ptr<path_type> paths = std::make_shared<path_type>();
|
||||
if (! mapnik::json::from_geojson(json, *paths))
|
||||
throw std::runtime_error("Failed to parse geojson geometry");
|
||||
return paths;
|
||||
|
@ -294,7 +294,7 @@ void export_geometry()
|
|||
// TODO add other geometry_type methods
|
||||
;
|
||||
|
||||
class_<path_type, boost::shared_ptr<path_type>, boost::noncopyable>("Path")
|
||||
class_<path_type, std::shared_ptr<path_type>, boost::noncopyable>("Path")
|
||||
.def("__getitem__", getitem_impl,return_value_policy<reference_existing_object>())
|
||||
.def("__len__", &path_type::size)
|
||||
.def("envelope",envelope_impl)
|
||||
|
|
|
@ -55,7 +55,7 @@ mapnik::grid::value_type get_pixel(mapnik::grid const& grid, int x, int y)
|
|||
|
||||
void export_grid()
|
||||
{
|
||||
class_<mapnik::grid,boost::shared_ptr<mapnik::grid> >(
|
||||
class_<mapnik::grid,std::shared_ptr<mapnik::grid> >(
|
||||
"Grid",
|
||||
"This class represents a feature hitgrid.",
|
||||
init<int,int,std::string,unsigned>(
|
||||
|
|
|
@ -41,7 +41,7 @@ static dict (*encode)( mapnik::grid_view const&, std::string const& , bool, unsi
|
|||
void export_grid_view()
|
||||
{
|
||||
class_<mapnik::grid_view,
|
||||
boost::shared_ptr<mapnik::grid_view> >("GridView",
|
||||
std::shared_ptr<mapnik::grid_view> >("GridView",
|
||||
"This class represents a feature hitgrid subset.",no_init)
|
||||
.def("width",&mapnik::grid_view::width)
|
||||
.def("height",&mapnik::grid_view::height)
|
||||
|
|
|
@ -146,7 +146,7 @@ void set_pixel(mapnik::image_32 & im, unsigned x, unsigned y, mapnik::color cons
|
|||
im.setPixel(x, y, c.rgba());
|
||||
}
|
||||
|
||||
boost::shared_ptr<image_32> open_from_file(std::string const& filename)
|
||||
std::shared_ptr<image_32> open_from_file(std::string const& filename)
|
||||
{
|
||||
boost::optional<std::string> type = type_from_filename(filename);
|
||||
if (type)
|
||||
|
@ -155,7 +155,7 @@ boost::shared_ptr<image_32> open_from_file(std::string const& filename)
|
|||
if (reader.get())
|
||||
{
|
||||
|
||||
boost::shared_ptr<image_32> image_ptr = boost::make_shared<image_32>(reader->width(),reader->height());
|
||||
std::shared_ptr<image_32> image_ptr = std::make_shared<image_32>(reader->width(),reader->height());
|
||||
reader->read(0,0,image_ptr->data());
|
||||
return image_ptr;
|
||||
}
|
||||
|
@ -164,19 +164,19 @@ boost::shared_ptr<image_32> open_from_file(std::string const& filename)
|
|||
throw mapnik::image_reader_exception("Unsupported image format:" + filename);
|
||||
}
|
||||
|
||||
boost::shared_ptr<image_32> fromstring(std::string const& str)
|
||||
std::shared_ptr<image_32> fromstring(std::string const& str)
|
||||
{
|
||||
std::unique_ptr<image_reader> reader(get_image_reader(str.c_str(),str.size()));
|
||||
if (reader.get())
|
||||
{
|
||||
boost::shared_ptr<image_32> image_ptr = boost::make_shared<image_32>(reader->width(),reader->height());
|
||||
std::shared_ptr<image_32> image_ptr = std::make_shared<image_32>(reader->width(),reader->height());
|
||||
reader->read(0,0,image_ptr->data());
|
||||
return image_ptr;
|
||||
}
|
||||
throw mapnik::image_reader_exception("Failed to load image from buffer" );
|
||||
}
|
||||
|
||||
boost::shared_ptr<image_32> frombuffer(PyObject * obj)
|
||||
std::shared_ptr<image_32> frombuffer(PyObject * obj)
|
||||
{
|
||||
void const* buffer=0;
|
||||
Py_ssize_t buffer_len;
|
||||
|
@ -185,7 +185,7 @@ boost::shared_ptr<image_32> frombuffer(PyObject * obj)
|
|||
std::unique_ptr<image_reader> reader(get_image_reader(reinterpret_cast<char const*>(buffer),buffer_len));
|
||||
if (reader.get())
|
||||
{
|
||||
boost::shared_ptr<image_32> image_ptr = boost::make_shared<image_32>(reader->width(),reader->height());
|
||||
std::shared_ptr<image_32> image_ptr = std::make_shared<image_32>(reader->width(),reader->height());
|
||||
reader->read(0,0,image_ptr->data());
|
||||
return image_ptr;
|
||||
}
|
||||
|
@ -205,10 +205,10 @@ void composite(image_32 & dst, image_32 & src, mapnik::composite_mode_e mode, fl
|
|||
}
|
||||
|
||||
#if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO)
|
||||
boost::shared_ptr<image_32> from_cairo(PycairoSurface* py_surface)
|
||||
std::shared_ptr<image_32> from_cairo(PycairoSurface* py_surface)
|
||||
{
|
||||
mapnik::cairo_surface_ptr surface(py_surface->surface, mapnik::cairo_surface_closer());
|
||||
boost::shared_ptr<image_32> image_ptr = boost::make_shared<image_32>(surface);
|
||||
std::shared_ptr<image_32> image_ptr = std::make_shared<image_32>(surface);
|
||||
return image_ptr;
|
||||
}
|
||||
#endif
|
||||
|
@ -253,7 +253,7 @@ void export_image()
|
|||
.value("value", mapnik::_value)
|
||||
;
|
||||
|
||||
class_<image_32,boost::shared_ptr<image_32> >("Image","This class represents a 32 bit RGBA image.",init<int,int>())
|
||||
class_<image_32,std::shared_ptr<image_32> >("Image","This class represents a 32 bit RGBA image.",init<int,int>())
|
||||
.def("width",&image_32::width)
|
||||
.def("height",&image_32::height)
|
||||
.def("view",&image_32::get_view)
|
||||
|
|
|
@ -35,27 +35,26 @@
|
|||
using mapnik::label_collision_detector4;
|
||||
using mapnik::box2d;
|
||||
using mapnik::Map;
|
||||
using boost::make_shared;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
boost::shared_ptr<label_collision_detector4>
|
||||
std::shared_ptr<label_collision_detector4>
|
||||
create_label_collision_detector_from_extent(box2d<double> const &extent)
|
||||
{
|
||||
return make_shared<label_collision_detector4>(extent);
|
||||
return std::make_shared<label_collision_detector4>(extent);
|
||||
}
|
||||
|
||||
boost::shared_ptr<label_collision_detector4>
|
||||
std::shared_ptr<label_collision_detector4>
|
||||
create_label_collision_detector_from_map(Map const &m)
|
||||
{
|
||||
double buffer = m.buffer_size();
|
||||
box2d<double> extent(-buffer, -buffer, m.width() + buffer, m.height() + buffer);
|
||||
return make_shared<label_collision_detector4>(extent);
|
||||
return std::make_shared<label_collision_detector4>(extent);
|
||||
}
|
||||
|
||||
boost::python::list
|
||||
make_label_boxes(boost::shared_ptr<label_collision_detector4> det)
|
||||
make_label_boxes(std::shared_ptr<label_collision_detector4> det)
|
||||
{
|
||||
boost::python::list boxes;
|
||||
|
||||
|
@ -77,7 +76,7 @@ void export_label_collision_detector()
|
|||
// for overload resolution
|
||||
void (label_collision_detector4::*insert_box)(box2d<double> const &) = &label_collision_detector4::insert;
|
||||
|
||||
class_<label_collision_detector4, boost::shared_ptr<label_collision_detector4>, boost::noncopyable>
|
||||
class_<label_collision_detector4, std::shared_ptr<label_collision_detector4>, boost::noncopyable>
|
||||
("LabelCollisionDetector",
|
||||
"Object to detect collisions between labels, used in the rendering process.",
|
||||
no_init)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// stl
|
||||
#include <stdexcept>
|
||||
|
||||
static boost::shared_ptr<mapnik::rgba_palette> make_palette( std::string const& palette, std::string const& format )
|
||||
static std::shared_ptr<mapnik::rgba_palette> make_palette( std::string const& palette, std::string const& format )
|
||||
{
|
||||
mapnik::rgba_palette::palette_type type = mapnik::rgba_palette::PALETTE_RGBA;
|
||||
if (format == "rgb")
|
||||
|
@ -40,7 +40,7 @@ static boost::shared_ptr<mapnik::rgba_palette> make_palette( std::string const&
|
|||
type = mapnik::rgba_palette::PALETTE_ACT;
|
||||
else
|
||||
throw std::runtime_error("invalid type passed for mapnik.Palette: must be either rgba, rgb, or act");
|
||||
return boost::make_shared<mapnik::rgba_palette>(palette, type);
|
||||
return std::make_shared<mapnik::rgba_palette>(palette, type);
|
||||
}
|
||||
|
||||
void export_palette ()
|
||||
|
@ -48,7 +48,7 @@ void export_palette ()
|
|||
using namespace boost::python;
|
||||
|
||||
class_<mapnik::rgba_palette,
|
||||
boost::shared_ptr<mapnik::rgba_palette>,
|
||||
std::shared_ptr<mapnik::rgba_palette>,
|
||||
boost::noncopyable >("Palette",no_init)
|
||||
//, init<std::string,std::string>(
|
||||
// ( arg("palette"), arg("type")),
|
||||
|
|
|
@ -176,22 +176,22 @@ mapnik::value_holder get_param(mapnik::parameter const& p, int index)
|
|||
}
|
||||
}
|
||||
|
||||
boost::shared_ptr<mapnik::parameter> create_parameter(mapnik::value_unicode_string const& key, mapnik::value_holder const& value)
|
||||
std::shared_ptr<mapnik::parameter> create_parameter(mapnik::value_unicode_string const& key, mapnik::value_holder const& value)
|
||||
{
|
||||
std::string key_utf8;
|
||||
mapnik::to_utf8(key, key_utf8);
|
||||
return boost::make_shared<mapnik::parameter>(key_utf8,value);
|
||||
return std::make_shared<mapnik::parameter>(key_utf8,value);
|
||||
}
|
||||
|
||||
// needed for Python_Unicode to std::string (utf8) conversion
|
||||
|
||||
boost::shared_ptr<mapnik::parameter> create_parameter_from_string(mapnik::value_unicode_string const& key, mapnik::value_unicode_string const& ustr)
|
||||
std::shared_ptr<mapnik::parameter> create_parameter_from_string(mapnik::value_unicode_string const& key, mapnik::value_unicode_string const& ustr)
|
||||
{
|
||||
std::string key_utf8;
|
||||
std::string ustr_utf8;
|
||||
mapnik::to_utf8(key, key_utf8);
|
||||
mapnik::to_utf8(ustr,ustr_utf8);
|
||||
return boost::make_shared<mapnik::parameter>(key_utf8, ustr_utf8);
|
||||
return std::make_shared<mapnik::parameter>(key_utf8, ustr_utf8);
|
||||
}
|
||||
|
||||
void export_parameters()
|
||||
|
@ -202,7 +202,7 @@ void export_parameters()
|
|||
implicitly_convertible<mapnik::value_integer,mapnik::value_holder>();
|
||||
implicitly_convertible<mapnik::value_double,mapnik::value_holder>();
|
||||
|
||||
class_<parameter,boost::shared_ptr<parameter> >("Parameter",no_init)
|
||||
class_<parameter,std::shared_ptr<parameter> >("Parameter",no_init)
|
||||
.def("__init__", make_constructor(create_parameter),
|
||||
"Create a mapnik.Parameter from a pair of values, the first being a string\n"
|
||||
"and the second being either a string, and integer, or a float")
|
||||
|
|
|
@ -138,7 +138,7 @@ void render(const mapnik::Map& map,
|
|||
void render_with_detector(
|
||||
const mapnik::Map &map,
|
||||
mapnik::image_32 &image,
|
||||
boost::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
std::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
double scale_factor = 1.0,
|
||||
unsigned offset_x = 0u,
|
||||
unsigned offset_y = 0u)
|
||||
|
@ -213,7 +213,7 @@ void render6(const mapnik::Map& map, PycairoContext* py_context)
|
|||
void render_with_detector2(
|
||||
const mapnik::Map& map,
|
||||
PycairoContext* py_context,
|
||||
boost::shared_ptr<mapnik::label_collision_detector4> detector)
|
||||
std::shared_ptr<mapnik::label_collision_detector4> detector)
|
||||
{
|
||||
python_unblock_auto_block b;
|
||||
mapnik::cairo_ptr context(py_context->ctx, mapnik::cairo_closer());
|
||||
|
@ -224,7 +224,7 @@ void render_with_detector2(
|
|||
void render_with_detector3(
|
||||
const mapnik::Map& map,
|
||||
PycairoContext* py_context,
|
||||
boost::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
std::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
double scale_factor = 1.0,
|
||||
unsigned offset_x = 0u,
|
||||
unsigned offset_y = 0u)
|
||||
|
@ -238,7 +238,7 @@ void render_with_detector3(
|
|||
void render_with_detector4(
|
||||
const mapnik::Map& map,
|
||||
PycairoSurface* py_surface,
|
||||
boost::shared_ptr<mapnik::label_collision_detector4> detector)
|
||||
std::shared_ptr<mapnik::label_collision_detector4> detector)
|
||||
{
|
||||
python_unblock_auto_block b;
|
||||
mapnik::cairo_surface_ptr surface(cairo_surface_reference(py_surface->surface), mapnik::cairo_surface_closer());
|
||||
|
@ -249,7 +249,7 @@ void render_with_detector4(
|
|||
void render_with_detector5(
|
||||
const mapnik::Map& map,
|
||||
PycairoSurface* py_surface,
|
||||
boost::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
std::shared_ptr<mapnik::label_collision_detector4> detector,
|
||||
double scale_factor = 1.0,
|
||||
unsigned offset_x = 0u,
|
||||
unsigned offset_y = 0u)
|
||||
|
|
|
@ -432,17 +432,17 @@ void export_text_placement()
|
|||
;
|
||||
|
||||
class_<TextPlacementsWrap,
|
||||
boost::shared_ptr<TextPlacementsWrap>,
|
||||
std::shared_ptr<TextPlacementsWrap>,
|
||||
boost::noncopyable>
|
||||
("TextPlacements")
|
||||
.def_readwrite("defaults", &text_placements::defaults)
|
||||
.def("get_placement_info", pure_virtual(&text_placements::get_placement_info))
|
||||
/* TODO: add_expressions() */
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<text_placements> >();
|
||||
register_ptr_to_python<std::shared_ptr<text_placements> >();
|
||||
|
||||
class_<TextPlacementInfoWrap,
|
||||
boost::shared_ptr<TextPlacementInfoWrap>,
|
||||
std::shared_ptr<TextPlacementInfoWrap>,
|
||||
boost::noncopyable>
|
||||
("TextPlacementInfo",
|
||||
init<text_placements const*, double>())
|
||||
|
@ -453,11 +453,11 @@ void export_text_placement()
|
|||
.def_readwrite("properties", &text_placement_info::properties)
|
||||
.def_readwrite("scale_factor", &text_placement_info::scale_factor)
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<text_placement_info> >();
|
||||
register_ptr_to_python<std::shared_ptr<text_placement_info> >();
|
||||
|
||||
|
||||
class_<processed_text,
|
||||
boost::shared_ptr<processed_text>,
|
||||
std::shared_ptr<processed_text>,
|
||||
boost::noncopyable>
|
||||
("ProcessedText", no_init)
|
||||
.def("push_back", &processed_text::push_back)
|
||||
|
@ -466,7 +466,7 @@ void export_text_placement()
|
|||
|
||||
|
||||
class_<expression_set,
|
||||
boost::shared_ptr<expression_set>,
|
||||
std::shared_ptr<expression_set>,
|
||||
boost::noncopyable>
|
||||
("ExpressionSet")
|
||||
.def("insert", &insert_expression);
|
||||
|
@ -475,7 +475,7 @@ void export_text_placement()
|
|||
|
||||
//TODO: Python namespace
|
||||
class_<NodeWrap,
|
||||
boost::shared_ptr<NodeWrap>,
|
||||
std::shared_ptr<NodeWrap>,
|
||||
boost::noncopyable>
|
||||
("FormattingNode")
|
||||
.def("apply", pure_virtual(&formatting::node::apply))
|
||||
|
@ -483,11 +483,11 @@ void export_text_placement()
|
|||
&formatting::node::add_expressions,
|
||||
&NodeWrap::default_add_expressions)
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<formatting::node> >();
|
||||
register_ptr_to_python<std::shared_ptr<formatting::node> >();
|
||||
|
||||
|
||||
class_<TextNodeWrap,
|
||||
boost::shared_ptr<TextNodeWrap>,
|
||||
std::shared_ptr<TextNodeWrap>,
|
||||
bases<formatting::node>,
|
||||
boost::noncopyable>
|
||||
("FormattingText", init<expression_ptr>())
|
||||
|
@ -497,11 +497,11 @@ void export_text_placement()
|
|||
&formatting::text_node::get_text,
|
||||
&formatting::text_node::set_text)
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<formatting::text_node> >();
|
||||
register_ptr_to_python<std::shared_ptr<formatting::text_node> >();
|
||||
|
||||
|
||||
class_with_converter<FormatNodeWrap,
|
||||
boost::shared_ptr<FormatNodeWrap>,
|
||||
std::shared_ptr<FormatNodeWrap>,
|
||||
bases<formatting::node>,
|
||||
boost::noncopyable>
|
||||
("FormattingFormat")
|
||||
|
@ -522,10 +522,10 @@ void export_text_placement()
|
|||
&formatting::format_node::get_child,
|
||||
&formatting::format_node::set_child)
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<formatting::format_node> >();
|
||||
register_ptr_to_python<std::shared_ptr<formatting::format_node> >();
|
||||
|
||||
class_<ListNodeWrap,
|
||||
boost::shared_ptr<ListNodeWrap>,
|
||||
std::shared_ptr<ListNodeWrap>,
|
||||
bases<formatting::node>,
|
||||
boost::noncopyable>
|
||||
("FormattingList", init<>())
|
||||
|
@ -538,10 +538,10 @@ void export_text_placement()
|
|||
.def("append", &ListNodeWrap::append)
|
||||
;
|
||||
|
||||
register_ptr_to_python<boost::shared_ptr<formatting::list_node> >();
|
||||
register_ptr_to_python<std::shared_ptr<formatting::list_node> >();
|
||||
|
||||
class_<ExprFormatWrap,
|
||||
boost::shared_ptr<ExprFormatWrap>,
|
||||
std::shared_ptr<ExprFormatWrap>,
|
||||
bases<formatting::node>,
|
||||
boost::noncopyable>
|
||||
("FormattingExpressionFormat")
|
||||
|
@ -561,7 +561,7 @@ void export_text_placement()
|
|||
&formatting::expression_format::get_child,
|
||||
&formatting::expression_format::set_child)
|
||||
;
|
||||
register_ptr_to_python<boost::shared_ptr<formatting::expression_format> >();
|
||||
register_ptr_to_python<std::shared_ptr<formatting::expression_format> >();
|
||||
|
||||
//TODO: registry
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ namespace impl {
|
|||
|
||||
typedef boost::ptr_vector<mapnik::geometry_type> path_type;
|
||||
|
||||
boost::shared_ptr<path_type> from_wkt(mapnik::wkt_parser & p, std::string const& wkt)
|
||||
std::shared_ptr<path_type> from_wkt(mapnik::wkt_parser & p, std::string const& wkt)
|
||||
{
|
||||
boost::shared_ptr<path_type> paths = boost::make_shared<path_type>();
|
||||
std::shared_ptr<path_type> paths = std::make_shared<path_type>();
|
||||
if (!p.parse(wkt, *paths))
|
||||
throw std::runtime_error("Failed to parse WKT");
|
||||
return paths;
|
||||
|
|
|
@ -32,8 +32,8 @@ class rtree
|
|||
{
|
||||
public:
|
||||
|
||||
typedef boost::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef boost::shared_ptr<rtree_leaf<Box, Value> > leaf_pointer;
|
||||
typedef std::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef std::shared_ptr<rtree_leaf<Box, Value> > leaf_pointer;
|
||||
|
||||
/**
|
||||
* \brief Creates a rtree with 'maximum' elements per node and 'minimum'.
|
||||
|
@ -771,4 +771,3 @@ private:
|
|||
}}} // namespace boost::geometry::index
|
||||
|
||||
#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_HPP
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class rtree_leaf : public rtree_node<Box, Value>
|
|||
public:
|
||||
|
||||
/// container type for the leaves
|
||||
typedef boost::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef std::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef std::vector<std::pair<Box, Value> > leaf_map;
|
||||
|
||||
/**
|
||||
|
@ -250,4 +250,3 @@ private:
|
|||
}}} // namespace boost::geometry::index
|
||||
|
||||
#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_LEAF_HPP
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ class rtree_node
|
|||
{
|
||||
public:
|
||||
|
||||
typedef boost::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef boost::shared_ptr<rtree_leaf<Box, Value> > leaf_pointer;
|
||||
typedef std::shared_ptr<rtree_node<Box, Value> > node_pointer;
|
||||
typedef std::shared_ptr<rtree_leaf<Box, Value> > leaf_pointer;
|
||||
|
||||
/// type for the node map
|
||||
typedef std::vector<std::pair<Box, node_pointer > > node_map;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
using mapnik::Map;
|
||||
|
||||
LayerListModel::LayerListModel(boost::shared_ptr<Map> map,QObject *parent)
|
||||
LayerListModel::LayerListModel(std::shared_ptr<Map> map,QObject *parent)
|
||||
: QAbstractListModel(parent),
|
||||
map_(map) {}
|
||||
|
||||
|
@ -117,8 +117,3 @@ boost::optional<mapnik::layer&> LayerListModel::map_layer(int i)
|
|||
}
|
||||
return boost::optional<mapnik::layer&>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class LayerListModel : public QAbstractListModel
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LayerListModel(boost::shared_ptr<mapnik::Map> map, QObject * parent = 0);
|
||||
LayerListModel(std::shared_ptr<mapnik::Map> map, QObject * parent = 0);
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
|
@ -45,7 +45,7 @@ class LayerListModel : public QAbstractListModel
|
|||
boost::optional<mapnik::layer&> map_layer(int i);
|
||||
|
||||
private:
|
||||
boost::shared_ptr<mapnik::Map> map_;
|
||||
std::shared_ptr<mapnik::Map> map_;
|
||||
};
|
||||
|
||||
#endif //LAYER_LIST_MODEL_HPP
|
||||
|
|
|
@ -185,7 +185,7 @@ void MainWindow::load_map_file(QString const& filename)
|
|||
std::cout<<"loading "<< filename.toStdString() << std::endl;
|
||||
unsigned width = mapWidget_->width();
|
||||
unsigned height = mapWidget_->height();
|
||||
boost::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height));
|
||||
std::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height));
|
||||
mapWidget_->setMap(map);
|
||||
try
|
||||
{
|
||||
|
@ -412,7 +412,7 @@ void MainWindow::set_default_extent(double x0,double y0, double x1, double y1)
|
|||
{
|
||||
try
|
||||
{
|
||||
boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
|
||||
std::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
|
||||
if (map_ptr)
|
||||
{
|
||||
mapnik::projection prj(map_ptr->srs());
|
||||
|
@ -433,7 +433,7 @@ void MainWindow::set_scaling_factor(double scaling_factor)
|
|||
|
||||
void MainWindow::zoom_all()
|
||||
{
|
||||
boost::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
|
||||
std::shared_ptr<mapnik::Map> map_ptr = mapWidget_->getMap();
|
||||
if (map_ptr)
|
||||
{
|
||||
map_ptr->zoom_all();
|
||||
|
|
|
@ -606,12 +606,12 @@ void MapWidget::updateMap()
|
|||
}
|
||||
}
|
||||
|
||||
boost::shared_ptr<Map> MapWidget::getMap()
|
||||
std::shared_ptr<Map> MapWidget::getMap()
|
||||
{
|
||||
return map_;
|
||||
}
|
||||
|
||||
void MapWidget::setMap(boost::shared_ptr<Map> map)
|
||||
void MapWidget::setMap(std::shared_ptr<Map> map)
|
||||
{
|
||||
map_ = map;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
boost::shared_ptr<mapnik::Map> map_;
|
||||
std::shared_ptr<mapnik::Map> map_;
|
||||
int selected_;
|
||||
QPixmap pix_;
|
||||
mapnik::box2d<double> extent_;
|
||||
|
@ -73,9 +73,9 @@ private:
|
|||
public:
|
||||
MapWidget(QWidget *parent=0);
|
||||
void setTool(eTool tool);
|
||||
boost::shared_ptr<mapnik::Map> getMap();
|
||||
std::shared_ptr<mapnik::Map> getMap();
|
||||
inline QPixmap const& pixmap() const { return pix_;}
|
||||
void setMap(boost::shared_ptr<mapnik::Map> map);
|
||||
void setMap(std::shared_ptr<mapnik::Map> map);
|
||||
void defaultView();
|
||||
void zoomToBox(mapnik::box2d<double> const& box);
|
||||
void zoomIn();
|
||||
|
|
|
@ -199,7 +199,7 @@ struct symbolizer_icon : public boost::static_visitor<QIcon>
|
|||
{
|
||||
// FIXME!
|
||||
/*
|
||||
boost::shared_ptr<mapnik::image_data_32> symbol = sym.get_image();
|
||||
std::shared_ptr<mapnik::image_data_32> symbol = sym.get_image();
|
||||
if (symbol)
|
||||
{
|
||||
QImage image(symbol->getBytes(),
|
||||
|
@ -303,7 +303,7 @@ private:
|
|||
class map_node
|
||||
{
|
||||
public:
|
||||
explicit map_node(boost::shared_ptr<mapnik::Map> map)
|
||||
explicit map_node(std::shared_ptr<mapnik::Map> map)
|
||||
: map_(map) {}
|
||||
~map_node() {}
|
||||
|
||||
|
@ -318,10 +318,10 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
boost::shared_ptr<mapnik::Map> map_;
|
||||
std::shared_ptr<mapnik::Map> map_;
|
||||
};
|
||||
|
||||
StyleModel::StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent)
|
||||
StyleModel::StyleModel(std::shared_ptr<mapnik::Map> map, QObject * parent)
|
||||
: QAbstractItemModel(parent),
|
||||
root_(new node(map_node(map)))
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ class StyleModel : public QAbstractItemModel
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StyleModel(boost::shared_ptr<mapnik::Map> map, QObject * parent=0);
|
||||
StyleModel(std::shared_ptr<mapnik::Map> map, QObject * parent=0);
|
||||
~StyleModel();
|
||||
// interface
|
||||
QModelIndex index (int row, int col, QModelIndex const& parent = QModelIndex()) const;
|
||||
|
@ -43,7 +43,7 @@ class StyleModel : public QAbstractItemModel
|
|||
int columnCount( QModelIndex const& parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
|
||||
private:
|
||||
//boost::shared_ptr<mapnik::Map> map_;
|
||||
//std::shared_ptr<mapnik::Map> map_;
|
||||
boost::scoped_ptr<node> root_;
|
||||
};
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
// create with default, empty placement detector
|
||||
agg_renderer(Map const& m, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
|
||||
// create with external placement detector, possibly non-empty
|
||||
agg_renderer(Map const &m, T & pixmap, boost::shared_ptr<label_collision_detector4> detector,
|
||||
agg_renderer(Map const &m, T & pixmap, std::shared_ptr<label_collision_detector4> detector,
|
||||
double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
|
||||
// pass in mapnik::request object to provide the mutable things per render
|
||||
agg_renderer(Map const& m, request const& req, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0);
|
||||
|
@ -147,7 +147,7 @@ protected:
|
|||
|
||||
private:
|
||||
buffer_type & pixmap_;
|
||||
boost::shared_ptr<buffer_type> internal_buffer_;
|
||||
std::shared_ptr<buffer_type> internal_buffer_;
|
||||
mutable buffer_type * current_buffer_;
|
||||
mutable bool style_level_compositing_;
|
||||
unsigned width_;
|
||||
|
@ -156,7 +156,7 @@ private:
|
|||
CoordTransform t_;
|
||||
freetype_engine font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
boost::shared_ptr<label_collision_detector4> detector_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
boost::scoped_ptr<rasterizer> ras_ptr;
|
||||
box2d<double> query_extent_;
|
||||
gamma_method_e gamma_method_;
|
||||
|
|
|
@ -78,18 +78,18 @@ void check_object_status_and_throw_exception(T const& object)
|
|||
class cairo_face : private mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
cairo_face(boost::shared_ptr<freetype_engine> const& engine, face_ptr const& face);
|
||||
cairo_face(std::shared_ptr<freetype_engine> const& engine, face_ptr const& face);
|
||||
~cairo_face();
|
||||
cairo_font_face_t * face() const;
|
||||
private:
|
||||
class handle
|
||||
{
|
||||
public:
|
||||
handle(boost::shared_ptr<freetype_engine> const& engine, face_ptr const& face)
|
||||
handle(std::shared_ptr<freetype_engine> const& engine, face_ptr const& face)
|
||||
: engine_(engine), face_(face) {}
|
||||
|
||||
private:
|
||||
boost::shared_ptr<freetype_engine> engine_;
|
||||
std::shared_ptr<freetype_engine> engine_;
|
||||
face_ptr face_;
|
||||
};
|
||||
|
||||
|
@ -104,17 +104,17 @@ private:
|
|||
cairo_font_face_t *c_face_;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<cairo_face> cairo_face_ptr;
|
||||
typedef std::shared_ptr<cairo_face> cairo_face_ptr;
|
||||
|
||||
class cairo_face_manager : private mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
cairo_face_manager(boost::shared_ptr<freetype_engine> engine);
|
||||
cairo_face_manager(std::shared_ptr<freetype_engine> engine);
|
||||
cairo_face_ptr get_face(face_ptr face);
|
||||
|
||||
private:
|
||||
typedef std::map<face_ptr,cairo_face_ptr> cairo_face_cache;
|
||||
boost::shared_ptr<freetype_engine> font_engine_;
|
||||
std::shared_ptr<freetype_engine> font_engine_;
|
||||
cairo_face_cache cache_;
|
||||
};
|
||||
|
||||
|
@ -268,8 +268,8 @@ struct cairo_surface_closer
|
|||
}
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<cairo_t> cairo_ptr;
|
||||
typedef boost::shared_ptr<cairo_surface_t> cairo_surface_ptr;
|
||||
typedef std::shared_ptr<cairo_t> cairo_ptr;
|
||||
typedef std::shared_ptr<cairo_surface_t> cairo_surface_ptr;
|
||||
|
||||
inline cairo_ptr create_context(cairo_surface_ptr const& surface)
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ protected:
|
|||
unsigned offset_y=0);
|
||||
cairo_renderer_base(Map const& m,
|
||||
cairo_ptr const& cairo,
|
||||
boost::shared_ptr<label_collision_detector4> detector,
|
||||
std::shared_ptr<label_collision_detector4> detector,
|
||||
double scale_factor=1.0,
|
||||
unsigned offset_x=0,
|
||||
unsigned offset_y=0);
|
||||
|
@ -143,10 +143,10 @@ protected:
|
|||
unsigned height_;
|
||||
double scale_factor_;
|
||||
CoordTransform t_;
|
||||
boost::shared_ptr<freetype_engine> font_engine_;
|
||||
std::shared_ptr<freetype_engine> font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
cairo_face_manager face_manager_;
|
||||
boost::shared_ptr<label_collision_detector4> detector_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
box2d<double> query_extent_;
|
||||
void setup(Map const& m);
|
||||
};
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
unsigned offset_y=0);
|
||||
cairo_renderer(Map const& m,
|
||||
T const& obj,
|
||||
boost::shared_ptr<label_collision_detector4> detector,
|
||||
std::shared_ptr<label_collision_detector4> detector,
|
||||
double scale_factor=1.0,
|
||||
unsigned offset_x=0,
|
||||
unsigned offset_y=0);
|
||||
|
|
|
@ -47,7 +47,7 @@ struct MAPNIK_DECL Featureset : private mapnik::noncopyable
|
|||
virtual ~Featureset() {}
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Featureset> featureset_ptr;
|
||||
typedef std::shared_ptr<Featureset> featureset_ptr;
|
||||
|
||||
class MAPNIK_DECL datasource_exception : public std::exception
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<datasource> datasource_ptr;
|
||||
typedef std::shared_ptr<datasource> datasource_ptr;
|
||||
|
||||
#ifdef MAPNIK_STATIC_PLUGINS
|
||||
#define DATASOURCE_PLUGIN(classname)
|
||||
|
|
|
@ -49,11 +49,11 @@ public:
|
|||
std::string plugin_directories();
|
||||
void register_datasources(std::string const& path);
|
||||
bool register_datasource(std::string const& path);
|
||||
boost::shared_ptr<datasource> create(parameters const& params);
|
||||
std::shared_ptr<datasource> create(parameters const& params);
|
||||
private:
|
||||
datasource_cache();
|
||||
~datasource_cache();
|
||||
std::map<std::string,boost::shared_ptr<PluginInfo> > plugins_;
|
||||
std::map<std::string,std::shared_ptr<PluginInfo> > plugins_;
|
||||
bool registered_;
|
||||
std::vector<std::string> plugin_directories_;
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace mapnik
|
|||
|
||||
// fwd declare to reduce compile time
|
||||
template <typename Iterator> struct expression_grammar;
|
||||
typedef boost::shared_ptr<expr_node> expression_ptr;
|
||||
typedef std::shared_ptr<expr_node> expression_ptr;
|
||||
typedef std::set<expression_ptr> expression_set;
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ std::string to_expression_string(T const* expr_node_ptr)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
std::string to_expression_string(boost::shared_ptr<T> const& expr_node_ptr)
|
||||
std::string to_expression_string(std::shared_ptr<T> const& expr_node_ptr)
|
||||
{
|
||||
throw std::logic_error("to_expression_string() called with pointer argument");
|
||||
// compile error intended here; comment on the next line shows in clang output
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace mapnik {
|
|||
class raster;
|
||||
class feature_impl;
|
||||
|
||||
typedef boost::shared_ptr<raster> raster_ptr;
|
||||
typedef std::shared_ptr<raster> raster_ptr;
|
||||
|
||||
template <typename T>
|
||||
class context : private mapnik::noncopyable
|
||||
|
@ -88,7 +88,7 @@ private:
|
|||
};
|
||||
|
||||
typedef context<std::map<std::string,std::size_t> > context_type;
|
||||
typedef boost::shared_ptr<context_type> context_ptr;
|
||||
typedef std::shared_ptr<context_type> context_ptr;
|
||||
|
||||
static const value default_value;
|
||||
|
||||
|
@ -310,7 +310,7 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f)
|
|||
// TODO - remove at Mapnik 3.x
|
||||
typedef feature_impl Feature;
|
||||
|
||||
typedef boost::shared_ptr<feature_impl> feature_ptr;
|
||||
typedef std::shared_ptr<feature_impl> feature_ptr;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ namespace mapnik
|
|||
{
|
||||
struct feature_factory
|
||||
{
|
||||
static boost::shared_ptr<feature_impl> create (context_ptr const& ctx, mapnik::value_integer fid)
|
||||
static std::shared_ptr<feature_impl> create (context_ptr const& ctx, mapnik::value_integer fid)
|
||||
{
|
||||
//return boost::allocate_shared<feature_impl>(boost::pool_allocator<feature_impl>(),fid);
|
||||
//return boost::allocate_shared<feature_impl>(boost::fast_pool_allocator<feature_impl>(),fid);
|
||||
return boost::make_shared<feature_impl>(ctx,fid);
|
||||
return std::make_shared<feature_impl>(ctx,fid);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
featureset_ptr features = ds->features(q);
|
||||
if (features)
|
||||
{
|
||||
boost::shared_ptr<featureset_buffer> cache = boost::make_shared<featureset_buffer>();
|
||||
std::shared_ptr<featureset_buffer> cache = std::make_shared<featureset_buffer>();
|
||||
feature_ptr feature, prev;
|
||||
while ((feature = features->next()))
|
||||
{
|
||||
|
@ -447,7 +447,7 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
else if (cache_features)
|
||||
{
|
||||
featureset_ptr features = ds->features(q);
|
||||
boost::shared_ptr<featureset_buffer> cache = boost::make_shared<featureset_buffer>();
|
||||
std::shared_ptr<featureset_buffer> cache = std::make_shared<featureset_buffer>();
|
||||
if (features)
|
||||
{
|
||||
feature_ptr feature;
|
||||
|
|
|
@ -63,7 +63,7 @@ struct char_properties;
|
|||
class stroker;
|
||||
struct glyph_t;
|
||||
|
||||
typedef boost::shared_ptr<font_face> face_ptr;
|
||||
typedef std::shared_ptr<font_face> face_ptr;
|
||||
|
||||
class MAPNIK_DECL font_glyph : private mapnik::noncopyable
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ private:
|
|||
unsigned index_;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<font_glyph> glyph_ptr;
|
||||
typedef std::shared_ptr<font_glyph> glyph_ptr;
|
||||
|
||||
|
||||
|
||||
|
@ -111,8 +111,8 @@ private:
|
|||
std::map<unsigned, char_info> dimension_cache_;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<font_face_set> face_set_ptr;
|
||||
typedef boost::shared_ptr<stroker> stroker_ptr;
|
||||
typedef std::shared_ptr<font_face_set> face_set_ptr;
|
||||
typedef std::shared_ptr<stroker> stroker_ptr;
|
||||
|
||||
class MAPNIK_DECL freetype_engine
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ public:
|
|||
|
||||
face_set_ptr get_face_set(std::string const& name)
|
||||
{
|
||||
face_set_ptr face_set = boost::make_shared<font_face_set>();
|
||||
face_set_ptr face_set = std::make_shared<font_face_set>();
|
||||
if (face_ptr face = get_face(name))
|
||||
{
|
||||
face_set->add(face);
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
face_set_ptr get_face_set(font_set const& fset)
|
||||
{
|
||||
std::vector<std::string> const& names = fset.get_face_names();
|
||||
face_set_ptr face_set = boost::make_shared<font_face_set>();
|
||||
face_set_ptr face_set = std::make_shared<font_face_set>();
|
||||
for ( std::string const& name : names)
|
||||
{
|
||||
face_ptr face = get_face(name);
|
||||
|
|
|
@ -38,7 +38,7 @@ struct char_properties;
|
|||
namespace formatting {
|
||||
|
||||
class node;
|
||||
typedef boost::shared_ptr<node> node_ptr;
|
||||
typedef std::shared_ptr<node> node_ptr;
|
||||
|
||||
class MAPNIK_DECL node
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
};
|
||||
|
||||
typedef geometry<double,vertex_vector> geometry_type;
|
||||
typedef boost::shared_ptr<geometry_type> geometry_ptr;
|
||||
typedef std::shared_ptr<geometry_type> geometry_ptr;
|
||||
typedef boost::ptr_vector<geometry_type> geometry_container;
|
||||
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ private:
|
|||
CoordTransform t_;
|
||||
freetype_engine font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
boost::shared_ptr<label_collision_detector4> detector_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
boost::scoped_ptr<grid_rasterizer> ras_ptr;
|
||||
box2d<double> query_extent_;
|
||||
void setup(Map const& m);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
namespace mapnik
|
||||
{
|
||||
|
||||
typedef boost::shared_ptr<boost::interprocess::mapped_region> mapped_region_ptr;
|
||||
typedef std::shared_ptr<boost::interprocess::mapped_region> mapped_region_ptr;
|
||||
|
||||
class MAPNIK_DECL mapped_memory_cache :
|
||||
public singleton<mapped_memory_cache, CreateStatic>,
|
||||
|
|
|
@ -49,8 +49,8 @@ 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 boost::shared_ptr<svg_storage_type> svg_path_ptr;
|
||||
typedef boost::shared_ptr<image_data_32> image_ptr;
|
||||
typedef std::shared_ptr<svg_storage_type> svg_path_ptr;
|
||||
typedef std::shared_ptr<image_data_32> image_ptr;
|
||||
/**
|
||||
* 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.
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
marker()
|
||||
{
|
||||
// create default OGC 4x4 black pixel
|
||||
bitmap_data_ = boost::optional<mapnik::image_ptr>(boost::make_shared<image_data_32>(4,4));
|
||||
bitmap_data_ = boost::optional<mapnik::image_ptr>(std::make_shared<image_data_32>(4,4));
|
||||
(*bitmap_data_)->set(0xff000000);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace mapnik
|
|||
|
||||
class marker;
|
||||
|
||||
typedef boost::shared_ptr<marker> marker_ptr;
|
||||
typedef std::shared_ptr<marker> marker_ptr;
|
||||
|
||||
|
||||
class MAPNIK_DECL marker_cache :
|
||||
|
|
|
@ -38,7 +38,7 @@ struct attribute;
|
|||
|
||||
typedef boost::variant<std::string, attribute> path_component;
|
||||
typedef std::vector<path_component> path_expression;
|
||||
typedef boost::shared_ptr<path_expression> path_expression_ptr;
|
||||
typedef std::shared_ptr<path_expression> path_expression_ptr;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace mapnik
|
|||
template <typename T,template <typename> class Creator>
|
||||
class Pool : private mapnik::noncopyable
|
||||
{
|
||||
typedef boost::shared_ptr<T> HolderType;
|
||||
typedef std::shared_ptr<T> HolderType;
|
||||
typedef std::deque<HolderType> ContType;
|
||||
|
||||
Creator<T> creator_;
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
//!
|
||||
//! \param[in, out] raster A raster stored in float32 single channel format, which gets colorized in place.
|
||||
//! \param[in] f The feature used to find 'NODATA' information if available
|
||||
void colorize(boost::shared_ptr<raster> const& raster, feature_impl const& f) const;
|
||||
void colorize(std::shared_ptr<raster> const& raster, feature_impl const& f) const;
|
||||
|
||||
|
||||
//! \brief Perform the translation of input to output
|
||||
|
@ -227,7 +227,7 @@ private:
|
|||
};
|
||||
|
||||
|
||||
typedef boost::shared_ptr<raster_colorizer> raster_colorizer_ptr;
|
||||
typedef std::shared_ptr<raster_colorizer> raster_colorizer_ptr;
|
||||
|
||||
|
||||
} // mapnik namespace
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace mapnik
|
|||
struct MAPNIK_DECL shield_symbolizer : public text_symbolizer,
|
||||
public symbolizer_with_image
|
||||
{
|
||||
// Note - we do not use boost::make_shared below as VC2008 and VC2010 are
|
||||
// Note - we do not use std::make_shared below as VC2008 and VC2010 are
|
||||
// not able to compile make_shared used within a constructor
|
||||
shield_symbolizer(text_placements_ptr placements = text_placements_ptr(new text_placements_dummy));
|
||||
shield_symbolizer(expression_ptr name,
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
path_iterator(Container const& path)
|
||||
: path_iterator::iterator_adaptor_(0),
|
||||
path_(path),
|
||||
first_value_(boost::make_shared<Value>(0,0,0))
|
||||
first_value_(std::make_shared<Value>(0,0,0))
|
||||
{}
|
||||
|
||||
/*!
|
||||
|
@ -91,7 +91,7 @@ public:
|
|||
explicit path_iterator(Value* first_element, Container const& path)
|
||||
: path_iterator::iterator_adaptor_(first_element),
|
||||
path_(path),
|
||||
first_value_(boost::make_shared<Value>(0,0,0))
|
||||
first_value_(std::make_shared<Value>(0,0,0))
|
||||
{
|
||||
this->increment();
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ private:
|
|||
}
|
||||
|
||||
Container const& path_;
|
||||
boost::shared_ptr<Value> first_value_;
|
||||
std::shared_ptr<Value> first_value_;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
@ -161,7 +161,7 @@ private:
|
|||
svg::path_output_attributes path_attributes_;
|
||||
freetype_engine font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
boost::shared_ptr<label_collision_detector4> detector_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
svg::svg_generator<OutputIterator> generator_;
|
||||
box2d<double> query_extent_;
|
||||
bool painted_;
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace mapnik
|
|||
// TODO - move these transform declares to own header
|
||||
namespace detail { struct transform_node; }
|
||||
typedef std::vector<detail::transform_node> transform_list;
|
||||
typedef boost::shared_ptr<transform_list> transform_list_ptr;
|
||||
typedef std::shared_ptr<transform_list> transform_list_ptr;
|
||||
typedef transform_list_ptr transform_type;
|
||||
class feature_impl;
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<text_path> text_path_ptr;
|
||||
typedef std::shared_ptr<text_path> text_path_ptr;
|
||||
}
|
||||
|
||||
#endif // MAPNIK_TEXT_PATH_HPP
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
double get_actual_minimum_padding() const { return scale_factor * properties.minimum_padding; }
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<text_placement_info> text_placement_info_ptr;
|
||||
typedef std::shared_ptr<text_placement_info> text_placement_info_ptr;
|
||||
|
||||
/** This object handles the management of all TextSymbolizer properties. It can
|
||||
* be used as a base class for own objects which implement new processing
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
};
|
||||
|
||||
/** Pointer to object of class text_placements */
|
||||
typedef boost::shared_ptr<text_placements> text_placements_ptr;
|
||||
typedef std::shared_ptr<text_placements> text_placements_ptr;
|
||||
|
||||
} //ns mapnik
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ DEFINE_ENUM(halo_rasterizer_e, halo_rasterizer_enum);
|
|||
|
||||
struct MAPNIK_DECL text_symbolizer : public symbolizer_base
|
||||
{
|
||||
// Note - we do not use boost::make_shared below as VC2008 and VC2010 are
|
||||
// Note - we do not use std::make_shared below as VC2008 and VC2010 are
|
||||
// not able to compile make_shared used within a constructor
|
||||
text_symbolizer(text_placements_ptr placements = text_placements_ptr(new text_placements_dummy));
|
||||
text_symbolizer(expression_ptr name, std::string const& face_name,
|
||||
|
|
|
@ -193,7 +193,7 @@ inline void clear(transform_node& val)
|
|||
|
||||
typedef detail::transform_node transform_node;
|
||||
typedef std::vector<transform_node> transform_list;
|
||||
typedef boost::shared_ptr<transform_list> transform_list_ptr;
|
||||
typedef std::shared_ptr<transform_list> transform_list_ptr;
|
||||
|
||||
MAPNIK_DECL std::string to_expression_string(transform_node const& node);
|
||||
MAPNIK_DECL std::string to_expression_string(transform_list const& list);
|
||||
|
|
|
@ -73,7 +73,7 @@ csv_datasource::csv_datasource(parameters const& params)
|
|||
manual_headers_(mapnik::util::trim_copy(*params.get<std::string>("headers", ""))),
|
||||
strict_(*params.get<mapnik::boolean>("strict", false)),
|
||||
filesize_max_(*params.get<double>("filesize_max", 20.0)), // MB
|
||||
ctx_(boost::make_shared<mapnik::context_type>())
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
/* TODO:
|
||||
general:
|
||||
|
@ -938,7 +938,7 @@ mapnik::featureset_ptr csv_datasource::features(mapnik::query const& q) const
|
|||
}
|
||||
++pos;
|
||||
}
|
||||
return boost::make_shared<mapnik::memory_featureset>(q.get_bbox(),features_);
|
||||
return std::make_shared<mapnik::memory_featureset>(q.get_bbox(),features_);
|
||||
}
|
||||
|
||||
mapnik::featureset_ptr csv_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const
|
||||
|
|
|
@ -217,7 +217,7 @@ featureset_ptr gdal_datasource::features(query const& q) const
|
|||
|
||||
gdal_query gq = q;
|
||||
|
||||
// TODO - move to boost::make_shared, but must reduce # of args to <= 9
|
||||
// TODO - move to std::make_shared, but must reduce # of args to <= 9
|
||||
return featureset_ptr(new gdal_featureset(*open_dataset(),
|
||||
band_,
|
||||
gq,
|
||||
|
@ -238,7 +238,7 @@ featureset_ptr gdal_datasource::features_at_point(coord2d const& pt, double tol)
|
|||
|
||||
gdal_query gq = pt;
|
||||
|
||||
// TODO - move to boost::make_shared, but must reduce # of args to <= 9
|
||||
// TODO - move to std::make_shared, but must reduce # of args to <= 9
|
||||
return featureset_ptr(new gdal_featureset(*open_dataset(),
|
||||
band_,
|
||||
gq,
|
||||
|
|
|
@ -63,7 +63,7 @@ gdal_featureset::gdal_featureset(GDALDataset& dataset,
|
|||
double dy,
|
||||
boost::optional<double> const& nodata)
|
||||
: dataset_(dataset),
|
||||
ctx_(boost::make_shared<mapnik::context_type>()),
|
||||
ctx_(std::make_shared<mapnik::context_type>()),
|
||||
band_(band),
|
||||
gquery_(q),
|
||||
raster_extent_(extent),
|
||||
|
@ -215,7 +215,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
|
||||
if (im_width > 0 && im_height > 0)
|
||||
{
|
||||
mapnik::raster_ptr raster = boost::make_shared<mapnik::raster>(intersect, im_width, im_height);
|
||||
mapnik::raster_ptr raster = std::make_shared<mapnik::raster>(intersect, im_width, im_height);
|
||||
feature->set_raster(raster);
|
||||
mapnik::image_data_32 & image = raster->data_;
|
||||
image.set(0xffffffff);
|
||||
|
|
|
@ -130,7 +130,7 @@ geojson_datasource::geojson_datasource(parameters const& params)
|
|||
boost::spirit::multi_pass<base_iterator_type> end =
|
||||
boost::spirit::make_default_multi_pass(base_iterator_type());
|
||||
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
mapnik::json::feature_collection_parser<boost::spirit::multi_pass<base_iterator_type> > p(ctx,*tr_);
|
||||
bool result = p.parse(begin,end, features_);
|
||||
if (!result)
|
||||
|
@ -215,7 +215,7 @@ mapnik::featureset_ptr geojson_datasource::features(mapnik::query const& q) cons
|
|||
{
|
||||
box_type box(point_type(b.minx(),b.miny()),point_type(b.maxx(),b.maxy()));
|
||||
index_array_ = tree_.find(box);
|
||||
return boost::make_shared<geojson_featureset>(features_, index_array_.begin(), index_array_.end());
|
||||
return std::make_shared<geojson_featureset>(features_, index_array_.begin(), index_array_.end());
|
||||
}
|
||||
// otherwise return an empty featureset pointer
|
||||
return mapnik::featureset_ptr();
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
typedef boost::geometry::model::d2::point_xy<double> point_type;
|
||||
typedef boost::geometry::model::box<point_type> box_type;
|
||||
typedef boost::geometry::index::rtree<box_type,std::size_t> spatial_index_type;
|
||||
|
||||
|
||||
// constructor
|
||||
geojson_datasource(mapnik::parameters const& params);
|
||||
virtual ~geojson_datasource ();
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
mapnik::layer_descriptor desc_;
|
||||
std::string file_;
|
||||
mapnik::box2d<double> extent_;
|
||||
boost::shared_ptr<mapnik::transcoder> tr_;
|
||||
std::shared_ptr<mapnik::transcoder> tr_;
|
||||
std::vector<mapnik::feature_ptr> features_;
|
||||
spatial_index_type tree_;
|
||||
mutable std::deque<std::size_t> index_array_;
|
||||
|
|
|
@ -523,7 +523,7 @@ featureset_ptr occi_datasource::features(query const& q) const
|
|||
std::set<std::string> const& props = q.property_names();
|
||||
std::set<std::string>::const_iterator pos = props.begin();
|
||||
std::set<std::string>::const_iterator end = props.end();
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
for (; pos != end; ++pos)
|
||||
{
|
||||
s << ", " << *pos;
|
||||
|
@ -562,7 +562,7 @@ featureset_ptr occi_datasource::features(query const& q) const
|
|||
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
|
||||
return boost::make_shared<occi_featureset>(pool_,
|
||||
return std::make_shared<occi_featureset>(pool_,
|
||||
conn_,
|
||||
ctx,
|
||||
s.str(),
|
||||
|
@ -590,7 +590,7 @@ featureset_ptr occi_datasource::features_at_point(coord2d const& pt, double tol)
|
|||
}
|
||||
std::vector<attribute_descriptor>::const_iterator itr = desc_.get_descriptors().begin();
|
||||
std::vector<attribute_descriptor>::const_iterator end = desc_.get_descriptors().end();
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
while (itr != end)
|
||||
{
|
||||
s << ", " << itr->get_name();
|
||||
|
@ -631,7 +631,7 @@ featureset_ptr occi_datasource::features_at_point(coord2d const& pt, double tol)
|
|||
|
||||
MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str();
|
||||
|
||||
return boost::make_shared<occi_featureset>(pool_,
|
||||
return std::make_shared<occi_featureset>(pool_,
|
||||
conn_,
|
||||
ctx,
|
||||
s.str(),
|
||||
|
|
|
@ -478,7 +478,7 @@ featureset_ptr ogr_datasource::features(query const& q) const
|
|||
|
||||
std::vector<attribute_descriptor> const& desc_ar = desc_.get_descriptors();
|
||||
// feature context (schema)
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
|
||||
std::vector<attribute_descriptor>::const_iterator itr = desc_ar.begin();
|
||||
std::vector<attribute_descriptor>::const_iterator end = desc_ar.end();
|
||||
|
@ -521,7 +521,7 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol)
|
|||
{
|
||||
std::vector<attribute_descriptor> const& desc_ar = desc_.get_descriptors();
|
||||
// feature context (schema)
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
|
||||
std::vector<attribute_descriptor>::const_iterator itr = desc_ar.begin();
|
||||
std::vector<attribute_descriptor>::const_iterator end = desc_ar.end();
|
||||
|
|
|
@ -134,7 +134,7 @@ featureset_ptr osm_datasource::features(const query& q) const
|
|||
filter_in_box filter(q.get_bbox());
|
||||
// so we need to filter osm features by bbox here...
|
||||
|
||||
return boost::make_shared<osm_featureset<filter_in_box> >(filter,
|
||||
return std::make_shared<osm_featureset<filter_in_box> >(filter,
|
||||
osm_data_,
|
||||
q.property_names(),
|
||||
desc_.get_encoding());
|
||||
|
@ -155,7 +155,7 @@ featureset_ptr osm_datasource::features_at_point(coord2d const& pt, double tol)
|
|||
++itr;
|
||||
}
|
||||
|
||||
return boost::make_shared<osm_featureset<filter_at_point> >(filter,
|
||||
return std::make_shared<osm_featureset<filter_at_point> >(filter,
|
||||
osm_data_,
|
||||
names,
|
||||
desc_.get_encoding());
|
||||
|
|
|
@ -48,7 +48,7 @@ osm_featureset<filterT>::osm_featureset(const filterT& filter,
|
|||
tr_(new transcoder(encoding)),
|
||||
dataset_ (dataset),
|
||||
attribute_names_ (attribute_names),
|
||||
ctx_(boost::make_shared<mapnik::context_type>())
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
dataset_->rewind();
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
return ok;
|
||||
}
|
||||
|
||||
boost::shared_ptr<ResultSet> executeQuery(std::string const& sql, int type = 0) const
|
||||
std::shared_ptr<ResultSet> executeQuery(std::string const& sql, int type = 0) const
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("postgis_connection::execute_query ") + sql);
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
throw mapnik::datasource_exception(err_msg);
|
||||
}
|
||||
|
||||
return boost::make_shared<ResultSet>(result);
|
||||
return std::make_shared<ResultSet>(result);
|
||||
}
|
||||
|
||||
std::string status() const
|
||||
|
|
|
@ -103,8 +103,8 @@ class ConnectionManager : public singleton <ConnectionManager,CreateStatic>
|
|||
|
||||
friend class CreateStatic<ConnectionManager>;
|
||||
typedef Pool<Connection,ConnectionCreator> PoolType;
|
||||
typedef std::map<std::string,boost::shared_ptr<PoolType> > ContType;
|
||||
typedef boost::shared_ptr<Connection> HolderType;
|
||||
typedef std::map<std::string,std::shared_ptr<PoolType> > ContType;
|
||||
typedef std::shared_ptr<Connection> HolderType;
|
||||
ContType pools_;
|
||||
|
||||
public:
|
||||
|
@ -122,20 +122,20 @@ public:
|
|||
{
|
||||
return pools_.insert(
|
||||
std::make_pair(creator.id(),
|
||||
boost::make_shared<PoolType>(creator,initialSize,maxSize))).second;
|
||||
std::make_shared<PoolType>(creator,initialSize,maxSize))).second;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
boost::shared_ptr<PoolType> getPool(std::string const& key)
|
||||
std::shared_ptr<PoolType> getPool(std::string const& key)
|
||||
{
|
||||
ContType::const_iterator itr=pools_.find(key);
|
||||
if (itr!=pools_.end())
|
||||
{
|
||||
return itr->second;
|
||||
}
|
||||
static const boost::shared_ptr<PoolType> emptyPool;
|
||||
static const std::shared_ptr<PoolType> emptyPool;
|
||||
return emptyPool;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
class CursorResultSet : public IResultSet
|
||||
{
|
||||
public:
|
||||
CursorResultSet(boost::shared_ptr<Connection> const &conn, std::string cursorName, int fetch_count)
|
||||
CursorResultSet(std::shared_ptr<Connection> const &conn, std::string cursorName, int fetch_count)
|
||||
: conn_(conn),
|
||||
cursorName_(cursorName),
|
||||
fetch_size_(fetch_count),
|
||||
|
@ -166,9 +166,9 @@ private:
|
|||
MAPNIK_LOG_DEBUG(postgis) << "postgis_cursor_resultset: FETCH result (" << cursorName_ << "): " << rs_->size() << " rows";
|
||||
}
|
||||
|
||||
boost::shared_ptr<Connection> conn_;
|
||||
std::shared_ptr<Connection> conn_;
|
||||
std::string cursorName_;
|
||||
boost::shared_ptr<ResultSet> rs_;
|
||||
std::shared_ptr<ResultSet> rs_;
|
||||
int fetch_size_;
|
||||
bool is_closed_;
|
||||
int *refCount_;
|
||||
|
|
|
@ -51,7 +51,7 @@ const double postgis_datasource::FMAX = std::numeric_limits<double>::max();
|
|||
const std::string postgis_datasource::GEOMETRY_COLUMNS = "geometry_columns";
|
||||
const std::string postgis_datasource::SPATIAL_REF_SYS = "spatial_ref_system";
|
||||
|
||||
using boost::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
using mapnik::attribute_descriptor;
|
||||
|
||||
postgis_datasource::postgis_datasource(parameters const& params)
|
||||
|
@ -557,7 +557,7 @@ std::string postgis_datasource::populate_tokens(std::string const& sql, double s
|
|||
}
|
||||
|
||||
|
||||
boost::shared_ptr<IResultSet> postgis_datasource::get_resultset(boost::shared_ptr<Connection> const &conn, std::string const& sql) const
|
||||
std::shared_ptr<IResultSet> postgis_datasource::get_resultset(std::shared_ptr<Connection> const &conn, std::string const& sql) const
|
||||
{
|
||||
if (cursor_fetch_size_ > 0)
|
||||
{
|
||||
|
@ -573,7 +573,7 @@ boost::shared_ptr<IResultSet> postgis_datasource::get_resultset(boost::shared_pt
|
|||
throw mapnik::datasource_exception("Postgis Plugin: error creating cursor for data select." );
|
||||
}
|
||||
|
||||
return boost::make_shared<CursorResultSet>(conn, cursor_name, cursor_fetch_size_);
|
||||
return std::make_shared<CursorResultSet>(conn, cursor_name, cursor_fetch_size_);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -643,7 +643,7 @@ featureset_ptr postgis_datasource::features(const query& q) const
|
|||
|
||||
s << ") AS geom";
|
||||
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
std::set<std::string> const& props = q.property_names();
|
||||
std::set<std::string>::const_iterator pos = props.begin();
|
||||
std::set<std::string>::const_iterator end = props.end();
|
||||
|
@ -680,8 +680,8 @@ featureset_ptr postgis_datasource::features(const query& q) const
|
|||
s << " LIMIT " << row_limit_;
|
||||
}
|
||||
|
||||
boost::shared_ptr<IResultSet> rs = get_resultset(conn, s.str());
|
||||
return boost::make_shared<postgis_featureset>(rs, ctx, desc_.get_encoding(), !key_field_.empty());
|
||||
std::shared_ptr<IResultSet> rs = get_resultset(conn, s.str());
|
||||
return std::make_shared<postgis_featureset>(rs, ctx, desc_.get_encoding(), !key_field_.empty());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -739,7 +739,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
|
|||
std::ostringstream s;
|
||||
s << "SELECT ST_AsBinary(\"" << geometryColumn_ << "\") AS geom";
|
||||
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
std::vector<attribute_descriptor>::const_iterator itr = desc_.get_descriptors().begin();
|
||||
std::vector<attribute_descriptor>::const_iterator end = desc_.get_descriptors().end();
|
||||
|
||||
|
@ -775,8 +775,8 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
|
|||
s << " LIMIT " << row_limit_;
|
||||
}
|
||||
|
||||
boost::shared_ptr<IResultSet> rs = get_resultset(conn, s.str());
|
||||
return boost::make_shared<postgis_featureset>(rs, ctx, desc_.get_encoding(), !key_field_.empty());
|
||||
std::shared_ptr<IResultSet> rs = get_resultset(conn, s.str());
|
||||
return std::make_shared<postgis_featureset>(rs, ctx, desc_.get_encoding(), !key_field_.empty());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ private:
|
|||
std::string sql_bbox(box2d<double> const& env) const;
|
||||
std::string populate_tokens(std::string const& sql, double scale_denom, box2d<double> const& env, double pixel_width, double pixel_height) const;
|
||||
std::string populate_tokens(std::string const& sql) const;
|
||||
boost::shared_ptr<IResultSet> get_resultset(boost::shared_ptr<Connection> const &conn, std::string const& sql) const;
|
||||
std::shared_ptr<IResultSet> get_resultset(std::shared_ptr<Connection> const &conn, std::string const& sql) const;
|
||||
|
||||
static const std::string GEOMETRY_COLUMNS;
|
||||
static const std::string SPATIAL_REF_SYS;
|
||||
|
|
|
@ -50,7 +50,7 @@ using mapnik::geometry_utils;
|
|||
using mapnik::feature_factory;
|
||||
using mapnik::context_ptr;
|
||||
|
||||
postgis_featureset::postgis_featureset(boost::shared_ptr<IResultSet> const& rs,
|
||||
postgis_featureset::postgis_featureset(std::shared_ptr<IResultSet> const& rs,
|
||||
context_ptr const& ctx,
|
||||
std::string const& encoding,
|
||||
bool key_field)
|
||||
|
|
|
@ -43,7 +43,7 @@ class IResultSet;
|
|||
class postgis_featureset : public mapnik::Featureset
|
||||
{
|
||||
public:
|
||||
postgis_featureset(boost::shared_ptr<IResultSet> const& rs,
|
||||
postgis_featureset(std::shared_ptr<IResultSet> const& rs,
|
||||
context_ptr const& ctx,
|
||||
std::string const& encoding,
|
||||
bool key_field = false);
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
~postgis_featureset();
|
||||
|
||||
private:
|
||||
boost::shared_ptr<IResultSet> rs_;
|
||||
std::shared_ptr<IResultSet> rs_;
|
||||
context_ptr ctx_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
unsigned totalGeomSize_;
|
||||
|
|
|
@ -202,7 +202,7 @@ mapnik::featureset_ptr python_datasource::features(mapnik::query const& q) const
|
|||
{
|
||||
return mapnik::featureset_ptr();
|
||||
}
|
||||
return boost::make_shared<python_featureset>(features);
|
||||
return std::make_shared<python_featureset>(features);
|
||||
}
|
||||
// otherwise return an empty featureset pointer
|
||||
return mapnik::featureset_ptr();
|
||||
|
@ -226,7 +226,7 @@ mapnik::featureset_ptr python_datasource::features_at_point(mapnik::coord2d cons
|
|||
return mapnik::featureset_ptr();
|
||||
}
|
||||
// otherwise, return a feature set which can iterate over the iterator
|
||||
return boost::make_shared<python_featureset>(features);
|
||||
return std::make_shared<python_featureset>(features);
|
||||
}
|
||||
catch ( boost::python::error_already_set )
|
||||
{
|
||||
|
|
|
@ -189,7 +189,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
|
||||
tiled_multi_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_, tile_stride_);
|
||||
|
||||
return boost::make_shared<raster_featureset<tiled_multi_file_policy> >(policy, extent_, q);
|
||||
return std::make_shared<raster_featureset<tiled_multi_file_policy> >(policy, extent_, q);
|
||||
}
|
||||
else if (width * height > static_cast<int>(tile_size_ * tile_size_ << 2))
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
|
||||
tiled_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_);
|
||||
|
||||
return boost::make_shared<raster_featureset<tiled_file_policy> >(policy, extent_, q);
|
||||
return std::make_shared<raster_featureset<tiled_file_policy> >(policy, extent_, q);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ featureset_ptr raster_datasource::features(query const& q) const
|
|||
raster_info info(filename_, format_, extent_, width_, height_);
|
||||
single_file_policy policy(info);
|
||||
|
||||
return boost::make_shared<raster_featureset<single_file_policy> >(policy, extent_, q);
|
||||
return std::make_shared<raster_featureset<single_file_policy> >(policy, extent_, q);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ raster_featureset<LookupPolicy>::raster_featureset(LookupPolicy const& policy,
|
|||
query const& q)
|
||||
: policy_(policy),
|
||||
feature_id_(1),
|
||||
ctx_(boost::make_shared<mapnik::context_type>()),
|
||||
ctx_(std::make_shared<mapnik::context_type>()),
|
||||
extent_(extent),
|
||||
bbox_(q.get_bbox()),
|
||||
curIter_(policy_.begin()),
|
||||
|
@ -114,7 +114,7 @@ feature_ptr raster_featureset<LookupPolicy>::next()
|
|||
rem.maxy() + y_off + height);
|
||||
intersect = t.backward(feature_raster_extent);
|
||||
|
||||
mapnik::raster_ptr raster = boost::make_shared<mapnik::raster>(intersect, width, height);
|
||||
mapnik::raster_ptr raster = std::make_shared<mapnik::raster>(intersect, width, height);
|
||||
reader->read(x_off, y_off, raster->data_);
|
||||
raster->premultiplied_alpha_ = reader->premultiplied_alpha();
|
||||
feature->set_raster(raster);
|
||||
|
|
|
@ -182,12 +182,11 @@ layer_descriptor rasterlite_datasource::get_descriptor() const
|
|||
featureset_ptr rasterlite_datasource::features(query const& q) const
|
||||
{
|
||||
rasterlite_query gq = q;
|
||||
return boost::make_shared<rasterlite_featureset>(open_dataset(), gq);
|
||||
return std::make_shared<rasterlite_featureset>(open_dataset(), gq);
|
||||
}
|
||||
|
||||
featureset_ptr rasterlite_datasource::features_at_point(coord2d const& pt, double tol) const
|
||||
{
|
||||
rasterlite_query gq = pt;
|
||||
return boost::make_shared<rasterlite_featureset>(open_dataset(), gq);
|
||||
return std::make_shared<rasterlite_featureset>(open_dataset(), gq);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ rasterlite_featureset::rasterlite_featureset(void* dataset,
|
|||
: dataset_(dataset),
|
||||
gquery_(q),
|
||||
first_(true),
|
||||
ctx_(boost::make_shared<mapnik::context_type>())
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
rasterliteSetBackgroundColor(dataset_, 255, 0, 255);
|
||||
rasterliteSetTransparentColor(dataset_, 255, 0, 255);
|
||||
|
@ -129,7 +129,7 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q)
|
|||
{
|
||||
if (size > 0)
|
||||
{
|
||||
mapnik::raster_ptr rasterp = boost::make_shared<mapnik::raster>(intersect, width, height);
|
||||
mapnik::raster_ptr rasterp = std::make_shared<mapnik::raster>(intersect, width, height);
|
||||
mapnik::image_data_32 & image = rasterp->data_;
|
||||
image.set(0xffffffff);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ shape_datasource::shape_datasource(const parameters ¶ms)
|
|||
mapnik::progress_timer __stats2__(std::clog, "shape_datasource::init(get_column_description)");
|
||||
#endif
|
||||
|
||||
boost::shared_ptr<shape_io> shape_ref = boost::make_shared<shape_io>(shape_name_);
|
||||
std::shared_ptr<shape_io> shape_ref = std::make_shared<shape_io>(shape_name_);
|
||||
init(*shape_ref);
|
||||
for (int i=0;i<shape_ref->dbf().num_fields();++i)
|
||||
{
|
||||
|
@ -237,7 +237,7 @@ featureset_ptr shape_datasource::features(const query& q) const
|
|||
if (indexed_)
|
||||
{
|
||||
shape_->shp().seek(0);
|
||||
// TODO - use boost::make_shared - #760
|
||||
// TODO - use std::make_shared - #760
|
||||
return featureset_ptr
|
||||
(new shape_index_featureset<filter_in_box>(filter,
|
||||
*shape_,
|
||||
|
@ -248,7 +248,7 @@ featureset_ptr shape_datasource::features(const query& q) const
|
|||
}
|
||||
else
|
||||
{
|
||||
return boost::make_shared<shape_featureset<filter_in_box> >(filter,
|
||||
return std::make_shared<shape_featureset<filter_in_box> >(filter,
|
||||
shape_name_,
|
||||
q.property_names(),
|
||||
desc_.get_encoding(),
|
||||
|
@ -279,7 +279,7 @@ featureset_ptr shape_datasource::features_at_point(coord2d const& pt, double tol
|
|||
if (indexed_)
|
||||
{
|
||||
shape_->shp().seek(0);
|
||||
// TODO - use boost::make_shared - #760
|
||||
// TODO - use std::make_shared - #760
|
||||
return featureset_ptr
|
||||
(new shape_index_featureset<filter_at_point>(filter,
|
||||
*shape_,
|
||||
|
@ -290,7 +290,7 @@ featureset_ptr shape_datasource::features_at_point(coord2d const& pt, double tol
|
|||
}
|
||||
else
|
||||
{
|
||||
return boost::make_shared<shape_featureset<filter_at_point> >(filter,
|
||||
return std::make_shared<shape_featureset<filter_at_point> >(filter,
|
||||
shape_name_,
|
||||
names,
|
||||
desc_.get_encoding(),
|
||||
|
|
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
datasource::datasource_t type_;
|
||||
std::string shape_name_;
|
||||
boost::shared_ptr<shape_io> shape_;
|
||||
std::shared_ptr<shape_io> shape_;
|
||||
shape_io::shapeType shape_type_;
|
||||
long file_length_;
|
||||
box2d<double> extent_;
|
||||
|
|
|
@ -53,7 +53,7 @@ shape_featureset<filterT>::shape_featureset(filterT const& filter,
|
|||
file_length_(file_length),
|
||||
row_limit_(row_limit),
|
||||
count_(0),
|
||||
ctx_(boost::make_shared<mapnik::context_type>())
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
shape_.shp().skip(100);
|
||||
setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_);
|
||||
|
|
|
@ -49,7 +49,7 @@ shape_index_featureset<filterT>::shape_index_featureset(filterT const& filter,
|
|||
std::string const& shape_name,
|
||||
int row_limit)
|
||||
: filter_(filter),
|
||||
ctx_(boost::make_shared<mapnik::context_type>()),
|
||||
ctx_(std::make_shared<mapnik::context_type>()),
|
||||
shape_(shape),
|
||||
tr_(new mapnik::transcoder(encoding)),
|
||||
row_limit_(row_limit),
|
||||
|
@ -59,7 +59,7 @@ shape_index_featureset<filterT>::shape_index_featureset(filterT const& filter,
|
|||
shape_.shp().skip(100);
|
||||
setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_);
|
||||
|
||||
boost::shared_ptr<shape_file> index = shape_.index();
|
||||
std::shared_ptr<shape_file> index = shape_.index();
|
||||
if (index)
|
||||
{
|
||||
#ifdef SHAPE_MEMORY_MAPPED_FILE
|
||||
|
|
|
@ -53,7 +53,7 @@ shape_io::shape_io(std::string const& shape_name, bool open_index)
|
|||
{
|
||||
try
|
||||
{
|
||||
index_= boost::make_shared<shape_file>(shape_name + INDEX);
|
||||
index_= std::make_shared<shape_file>(shape_name + INDEX);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
shape_file& shp();
|
||||
dbf_file& dbf();
|
||||
|
||||
inline boost::shared_ptr<shape_file>& index()
|
||||
inline std::shared_ptr<shape_file>& index()
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
shapeType type_;
|
||||
shape_file shp_;
|
||||
dbf_file dbf_;
|
||||
boost::shared_ptr<shape_file> index_;
|
||||
std::shared_ptr<shape_file> index_;
|
||||
unsigned reclength_;
|
||||
unsigned id_;
|
||||
box2d<double> cur_extent_;
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
throw mapnik::datasource_exception (s.str());
|
||||
}
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> execute_query(std::string const& sql)
|
||||
std::shared_ptr<sqlite_resultset> execute_query(std::string const& sql)
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("sqlite_resultset::execute_query ") + sql);
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
throw_sqlite_error(sql);
|
||||
}
|
||||
|
||||
return boost::make_shared<sqlite_resultset>(stmt);
|
||||
return std::make_shared<sqlite_resultset>(stmt);
|
||||
}
|
||||
|
||||
void execute(std::string const& sql)
|
||||
|
|
|
@ -139,7 +139,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params)
|
|||
}
|
||||
|
||||
// now actually create the connection and start executing setup sql
|
||||
dataset_ = boost::make_shared<sqlite_connection>(dataset_name_);
|
||||
dataset_ = std::make_shared<sqlite_connection>(dataset_name_);
|
||||
|
||||
boost::optional<int> table_by_index = params.get<int>("table_by_index");
|
||||
|
||||
|
@ -300,7 +300,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params)
|
|||
mapnik::progress_timer __stats2__(std::clog, "sqlite_datasource::init(create_spatial_index)");
|
||||
#endif
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(query.str());
|
||||
std::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(query.str());
|
||||
if (sqlite_utils::create_spatial_index(index_db,index_table_,rs))
|
||||
{
|
||||
//extent_initialized_ = true;
|
||||
|
@ -437,7 +437,7 @@ boost::optional<mapnik::datasource::geometry_t> sqlite_datasource::get_geometry_
|
|||
{
|
||||
s << " LIMIT 5";
|
||||
}
|
||||
boost::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(s.str());
|
||||
std::shared_ptr<sqlite_resultset> rs = dataset_->execute_query(s.str());
|
||||
int multi_type = 0;
|
||||
while (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
|
@ -483,7 +483,7 @@ featureset_ptr sqlite_datasource::features(query const& q) const
|
|||
mapnik::box2d<double> const& e = q.get_bbox();
|
||||
|
||||
std::ostringstream s;
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
|
||||
s << "SELECT " << geometry_field_;
|
||||
if (!key_field_.empty())
|
||||
|
@ -536,9 +536,9 @@ featureset_ptr sqlite_datasource::features(query const& q) const
|
|||
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str();
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
|
||||
return boost::make_shared<sqlite_featureset>(rs,
|
||||
return std::make_shared<sqlite_featureset>(rs,
|
||||
ctx,
|
||||
desc_.get_encoding(),
|
||||
e,
|
||||
|
@ -561,7 +561,7 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to
|
|||
mapnik::box2d<double> e(pt.x, pt.y, pt.x, pt.y);
|
||||
e.pad(tol);
|
||||
std::ostringstream s;
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
mapnik::context_ptr ctx = std::make_shared<mapnik::context_type>();
|
||||
|
||||
s << "SELECT " << geometry_field_;
|
||||
if (!key_field_.empty())
|
||||
|
@ -617,9 +617,9 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to
|
|||
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str();
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(dataset_->execute_query(s.str()));
|
||||
|
||||
return boost::make_shared<sqlite_featureset>(rs,
|
||||
return std::make_shared<sqlite_featureset>(rs,
|
||||
ctx,
|
||||
desc_.get_encoding(),
|
||||
e,
|
||||
|
|
|
@ -68,7 +68,7 @@ private:
|
|||
bool extent_initialized_;
|
||||
mapnik::datasource::datasource_t type_;
|
||||
std::string dataset_name_;
|
||||
boost::shared_ptr<sqlite_connection> dataset_;
|
||||
std::shared_ptr<sqlite_connection> dataset_;
|
||||
std::string table_;
|
||||
std::string fields_;
|
||||
std::string metadata_;
|
||||
|
|
|
@ -43,7 +43,7 @@ using mapnik::geometry_utils;
|
|||
using mapnik::transcoder;
|
||||
using mapnik::feature_factory;
|
||||
|
||||
sqlite_featureset::sqlite_featureset(boost::shared_ptr<sqlite_resultset> rs,
|
||||
sqlite_featureset::sqlite_featureset(std::shared_ptr<sqlite_resultset> rs,
|
||||
mapnik::context_ptr const& ctx,
|
||||
std::string const& encoding,
|
||||
mapnik::box2d<double> const& bbox,
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
class sqlite_featureset : public mapnik::Featureset
|
||||
{
|
||||
public:
|
||||
sqlite_featureset(boost::shared_ptr<sqlite_resultset> rs,
|
||||
sqlite_featureset(std::shared_ptr<sqlite_resultset> rs,
|
||||
mapnik::context_ptr const& ctx,
|
||||
std::string const& encoding,
|
||||
mapnik::box2d<double> const& bbox,
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
mapnik::feature_ptr next();
|
||||
|
||||
private:
|
||||
boost::shared_ptr<sqlite_resultset> rs_;
|
||||
std::shared_ptr<sqlite_resultset> rs_;
|
||||
mapnik::context_ptr ctx_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
mapnik::box2d<double> bbox_;
|
||||
|
|
|
@ -47,7 +47,7 @@ class prepared_index_statement : mapnik::noncopyable
|
|||
{
|
||||
|
||||
public:
|
||||
prepared_index_statement(boost::shared_ptr<sqlite_connection> ds, std::string const& sql)
|
||||
prepared_index_statement(std::shared_ptr<sqlite_connection> ds, std::string const& sql)
|
||||
: ds_(ds),
|
||||
stmt_(0)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
boost::shared_ptr<sqlite_connection> ds_;
|
||||
std::shared_ptr<sqlite_connection> ds_;
|
||||
sqlite3_stmt * stmt_;
|
||||
};
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
static void get_tables(boost::shared_ptr<sqlite_connection> ds,
|
||||
static void get_tables(std::shared_ptr<sqlite_connection> ds,
|
||||
std::vector<std::string> & tables)
|
||||
{
|
||||
std::ostringstream sql;
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
const int rc = sqlite3_prepare_v2 (*(*ds), sql.str().c_str(), -1, &stmt, 0);
|
||||
if (rc == SQLITE_OK)
|
||||
{
|
||||
boost::shared_ptr<sqlite_resultset> rs = boost::make_shared<sqlite_resultset>(stmt);
|
||||
std::shared_ptr<sqlite_resultset> rs = std::make_shared<sqlite_resultset>(stmt);
|
||||
while (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
const int type_oid = rs->column_type(0);
|
||||
|
@ -181,7 +181,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
static void query_extent(boost::shared_ptr<sqlite_resultset> rs,
|
||||
static void query_extent(std::shared_ptr<sqlite_resultset> rs,
|
||||
mapnik::box2d<double>& extent)
|
||||
{
|
||||
|
||||
|
@ -218,7 +218,7 @@ public:
|
|||
|
||||
static bool create_spatial_index(std::string const& index_db,
|
||||
std::string const& index_table,
|
||||
boost::shared_ptr<sqlite_resultset> rs)
|
||||
std::shared_ptr<sqlite_resultset> rs)
|
||||
{
|
||||
/* TODO
|
||||
- speedups
|
||||
|
@ -236,7 +236,7 @@ public:
|
|||
#endif
|
||||
|
||||
bool existed = mapnik::util::exists(index_db);
|
||||
boost::shared_ptr<sqlite_connection> ds = boost::make_shared<sqlite_connection>(index_db,flags);
|
||||
std::shared_ptr<sqlite_connection> ds = std::make_shared<sqlite_connection>(index_db,flags);
|
||||
|
||||
bool one_success = false;
|
||||
try
|
||||
|
@ -356,7 +356,7 @@ public:
|
|||
mapnik::box2d<double> bbox;
|
||||
} rtree_type;
|
||||
|
||||
static void build_tree(boost::shared_ptr<sqlite_resultset> rs,
|
||||
static void build_tree(std::shared_ptr<sqlite_resultset> rs,
|
||||
std::vector<sqlite_utils::rtree_type> & rtree_list)
|
||||
{
|
||||
|
||||
|
@ -414,8 +414,8 @@ public:
|
|||
#endif
|
||||
|
||||
bool existed = mapnik::util::exists(index_db);;
|
||||
|
||||
boost::shared_ptr<sqlite_connection> ds = boost::make_shared<sqlite_connection>(index_db,flags);
|
||||
|
||||
std::shared_ptr<sqlite_connection> ds = std::make_shared<sqlite_connection>(index_db,flags);
|
||||
|
||||
bool one_success = false;
|
||||
try
|
||||
|
@ -484,7 +484,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool detect_extent(boost::shared_ptr<sqlite_connection> ds,
|
||||
static bool detect_extent(std::shared_ptr<sqlite_connection> ds,
|
||||
bool has_spatial_index,
|
||||
mapnik::box2d<double> & extent,
|
||||
std::string const& index_table,
|
||||
|
@ -501,7 +501,7 @@ public:
|
|||
s << "SELECT xmin, ymin, xmax, ymax FROM " << metadata;
|
||||
s << " WHERE LOWER(f_table_name) = LOWER('" << geometry_table << "')";
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'";
|
||||
boost::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
if (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
double xmin = rs->column_double(0);
|
||||
|
@ -518,7 +518,7 @@ public:
|
|||
s << "SELECT MIN(xmin), MIN(ymin), MAX(xmax), MAX(ymax) FROM "
|
||||
<< index_table;
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'";
|
||||
boost::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
if (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
if (! rs->column_isnull(0))
|
||||
|
@ -539,20 +539,20 @@ public:
|
|||
s << "SELECT " << geometry_field << "," << key_field
|
||||
<< " FROM (" << table << ")";
|
||||
MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'";
|
||||
boost::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
sqlite_utils::query_extent(rs,extent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool has_rtree(std::string const& index_table,boost::shared_ptr<sqlite_connection> ds)
|
||||
static bool has_rtree(std::string const& index_table,std::shared_ptr<sqlite_connection> ds)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "SELECT pkid,xmin,xmax,ymin,ymax FROM " << index_table << " LIMIT 1";
|
||||
boost::shared_ptr<sqlite_resultset> rs = ds->execute_query(s.str());
|
||||
std::shared_ptr<sqlite_resultset> rs = ds->execute_query(s.str());
|
||||
if (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
return true;
|
||||
|
@ -569,10 +569,10 @@ public:
|
|||
static bool detect_types_from_subquery(std::string const& query,
|
||||
std::string & geometry_field,
|
||||
mapnik::layer_descriptor & desc,
|
||||
boost::shared_ptr<sqlite_connection> ds)
|
||||
std::shared_ptr<sqlite_connection> ds)
|
||||
{
|
||||
bool found = false;
|
||||
boost::shared_ptr<sqlite_resultset> rs(ds->execute_query(query));
|
||||
std::shared_ptr<sqlite_resultset> rs(ds->execute_query(query));
|
||||
if (rs->is_valid() && rs->step_next())
|
||||
{
|
||||
for (int i = 0; i < rs->column_count(); ++i)
|
||||
|
@ -627,7 +627,7 @@ public:
|
|||
std::string & field,
|
||||
std::string & table,
|
||||
mapnik::layer_descriptor & desc,
|
||||
boost::shared_ptr<sqlite_connection> ds)
|
||||
std::shared_ptr<sqlite_connection> ds)
|
||||
{
|
||||
|
||||
// http://www.sqlite.org/pragma.html#pragma_table_info
|
||||
|
@ -636,7 +636,7 @@ public:
|
|||
// if the subquery-based type detection failed
|
||||
std::ostringstream s;
|
||||
s << "PRAGMA table_info(" << table << ")";
|
||||
boost::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
std::shared_ptr<sqlite_resultset> rs(ds->execute_query(s.str()));
|
||||
bool found_table = false;
|
||||
bool found_pk = false;
|
||||
while (rs->is_valid() && rs->step_next())
|
||||
|
|
|
@ -62,7 +62,7 @@ mapnik::featureset_ptr hello_datasource::features(mapnik::query const& q) const
|
|||
// if the query box intersects our world extent then query for features
|
||||
if (extent_.intersects(q.get_bbox()))
|
||||
{
|
||||
return boost::make_shared<hello_featureset>(q.get_bbox(),desc_.get_encoding());
|
||||
return std::make_shared<hello_featureset>(q.get_bbox(),desc_.get_encoding());
|
||||
}
|
||||
|
||||
// otherwise return an empty featureset pointer
|
||||
|
|
|
@ -12,7 +12,7 @@ hello_featureset::hello_featureset(mapnik::box2d<double> const& box, std::string
|
|||
: box_(box),
|
||||
feature_id_(1),
|
||||
tr_(new mapnik::transcoder(encoding)),
|
||||
ctx_(boost::make_shared<mapnik::context_type>()) { }
|
||||
ctx_(std::make_shared<mapnik::context_type>()) { }
|
||||
|
||||
hello_featureset::~hello_featureset() { }
|
||||
|
||||
|
@ -69,4 +69,3 @@ mapnik::feature_ptr hello_featureset::next()
|
|||
// otherwise return an empty feature
|
||||
return mapnik::feature_ptr();
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ agg_renderer<T>::agg_renderer(Map const& m, T & pixmap, double scale_factor, uns
|
|||
t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y),
|
||||
font_engine_(),
|
||||
font_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(box2d<double>(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))),
|
||||
detector_(std::make_shared<label_collision_detector4>(box2d<double>(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))),
|
||||
ras_ptr(new rasterizer),
|
||||
query_extent_(),
|
||||
gamma_method_(GAMMA_POWER),
|
||||
|
@ -99,7 +99,7 @@ agg_renderer<T>::agg_renderer(Map const& m, request const& req, T & pixmap, doub
|
|||
t_(req.width(),req.height(),req.extent(),offset_x,offset_y),
|
||||
font_engine_(),
|
||||
font_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(box2d<double>(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))),
|
||||
detector_(std::make_shared<label_collision_detector4>(box2d<double>(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))),
|
||||
ras_ptr(new rasterizer),
|
||||
query_extent_(),
|
||||
gamma_method_(GAMMA_POWER),
|
||||
|
@ -109,7 +109,7 @@ agg_renderer<T>::agg_renderer(Map const& m, request const& req, T & pixmap, doub
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
agg_renderer<T>::agg_renderer(Map const& m, T & pixmap, boost::shared_ptr<label_collision_detector4> detector,
|
||||
agg_renderer<T>::agg_renderer(Map const& m, T & pixmap, std::shared_ptr<label_collision_detector4> detector,
|
||||
double scale_factor, unsigned offset_x, unsigned offset_y)
|
||||
: feature_style_processor<agg_renderer>(m, scale_factor),
|
||||
pixmap_(pixmap),
|
||||
|
@ -240,7 +240,7 @@ void agg_renderer<T>::start_style_processing(feature_type_style const& st)
|
|||
{
|
||||
if (!internal_buffer_)
|
||||
{
|
||||
internal_buffer_ = boost::make_shared<buffer_type>(pixmap_.width(),pixmap_.height());
|
||||
internal_buffer_ = std::make_shared<buffer_type>(pixmap_.width(),pixmap_.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ void agg_renderer<T>::process(point_symbolizer const& sym,
|
|||
}
|
||||
else
|
||||
{
|
||||
marker.reset(boost::make_shared<mapnik::marker>());
|
||||
marker.reset(std::make_shared<mapnik::marker>());
|
||||
}
|
||||
|
||||
if (marker)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <valarray>
|
||||
namespace mapnik {
|
||||
|
||||
cairo_face::cairo_face(boost::shared_ptr<freetype_engine> const& engine, face_ptr const& face)
|
||||
cairo_face::cairo_face(std::shared_ptr<freetype_engine> const& engine, face_ptr const& face)
|
||||
: face_(face)
|
||||
{
|
||||
static cairo_user_data_key_t key;
|
||||
|
|
|
@ -96,7 +96,7 @@ struct cairo_save_restore
|
|||
};
|
||||
|
||||
|
||||
cairo_face_manager::cairo_face_manager(boost::shared_ptr<freetype_engine> engine)
|
||||
cairo_face_manager::cairo_face_manager(std::shared_ptr<freetype_engine> engine)
|
||||
: font_engine_(engine)
|
||||
{
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ cairo_face_ptr cairo_face_manager::get_face(face_ptr face)
|
|||
}
|
||||
else
|
||||
{
|
||||
entry = boost::make_shared<cairo_face>(font_engine_, face);
|
||||
entry = std::make_shared<cairo_face>(font_engine_, face);
|
||||
cache_.insert(std::make_pair(face, entry));
|
||||
}
|
||||
|
||||
|
@ -131,10 +131,10 @@ cairo_renderer_base::cairo_renderer_base(Map const& m,
|
|||
height_(m.height()),
|
||||
scale_factor_(scale_factor),
|
||||
t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y),
|
||||
font_engine_(boost::make_shared<freetype_engine>()),
|
||||
font_engine_(std::make_shared<freetype_engine>()),
|
||||
font_manager_(*font_engine_),
|
||||
face_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(
|
||||
detector_(std::make_shared<label_collision_detector4>(
|
||||
box2d<double>(-m.buffer_size(), -m.buffer_size(),
|
||||
m.width() + m.buffer_size(), m.height() + m.buffer_size())))
|
||||
{
|
||||
|
@ -153,10 +153,10 @@ cairo_renderer_base::cairo_renderer_base(Map const& m,
|
|||
height_(req.height()),
|
||||
scale_factor_(scale_factor),
|
||||
t_(req.width(),req.height(),req.extent(),offset_x,offset_y),
|
||||
font_engine_(boost::make_shared<freetype_engine>()),
|
||||
font_engine_(std::make_shared<freetype_engine>()),
|
||||
font_manager_(*font_engine_),
|
||||
face_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(
|
||||
detector_(std::make_shared<label_collision_detector4>(
|
||||
box2d<double>(-req.buffer_size(), -req.buffer_size(),
|
||||
req.width() + req.buffer_size(), req.height() + req.buffer_size())))
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ cairo_renderer_base::cairo_renderer_base(Map const& m,
|
|||
|
||||
cairo_renderer_base::cairo_renderer_base(Map const& m,
|
||||
cairo_ptr const& cairo,
|
||||
boost::shared_ptr<label_collision_detector4> detector,
|
||||
std::shared_ptr<label_collision_detector4> detector,
|
||||
double scale_factor,
|
||||
unsigned offset_x,
|
||||
unsigned offset_y)
|
||||
|
@ -175,7 +175,7 @@ cairo_renderer_base::cairo_renderer_base(Map const& m,
|
|||
height_(m.height()),
|
||||
scale_factor_(scale_factor),
|
||||
t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y),
|
||||
font_engine_(boost::make_shared<freetype_engine>()),
|
||||
font_engine_(std::make_shared<freetype_engine>()),
|
||||
font_manager_(*font_engine_),
|
||||
face_manager_(font_engine_),
|
||||
detector_(detector)
|
||||
|
@ -204,12 +204,12 @@ cairo_renderer<cairo_surface_ptr>::cairo_renderer(Map const& m, request const& r
|
|||
cairo_renderer_base(m,req, create_context(surface),scale_factor,offset_x,offset_y) {}
|
||||
|
||||
template <>
|
||||
cairo_renderer<cairo_ptr>::cairo_renderer(Map const& m, cairo_ptr const& cairo, boost::shared_ptr<label_collision_detector4> detector, double scale_factor, unsigned offset_x, unsigned offset_y)
|
||||
cairo_renderer<cairo_ptr>::cairo_renderer(Map const& m, cairo_ptr const& cairo, std::shared_ptr<label_collision_detector4> detector, double scale_factor, unsigned offset_x, unsigned offset_y)
|
||||
: feature_style_processor<cairo_renderer>(m,scale_factor),
|
||||
cairo_renderer_base(m,cairo,detector,scale_factor,offset_x,offset_y) {}
|
||||
|
||||
template <>
|
||||
cairo_renderer<cairo_surface_ptr>::cairo_renderer(Map const& m, cairo_surface_ptr const& surface, boost::shared_ptr<label_collision_detector4> detector, double scale_factor, unsigned offset_x, unsigned offset_y)
|
||||
cairo_renderer<cairo_surface_ptr>::cairo_renderer(Map const& m, cairo_surface_ptr const& surface, std::shared_ptr<label_collision_detector4> detector, double scale_factor, unsigned offset_x, unsigned offset_y)
|
||||
: feature_style_processor<cairo_renderer>(m,scale_factor),
|
||||
cairo_renderer_base(m,create_context(surface),detector,scale_factor,offset_x,offset_y) {}
|
||||
|
||||
|
@ -658,7 +658,7 @@ void cairo_renderer_base::process(point_symbolizer const& sym,
|
|||
}
|
||||
else
|
||||
{
|
||||
marker.reset(boost::make_shared<mapnik::marker>());
|
||||
marker.reset(std::make_shared<mapnik::marker>());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ datasource_ptr datasource_cache::create(parameters const& params)
|
|||
mutex::scoped_lock lock(mutex_);
|
||||
#endif
|
||||
|
||||
std::map<std::string,boost::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type);
|
||||
std::map<std::string,std::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type);
|
||||
if (itr == plugins_.end())
|
||||
{
|
||||
std::string s("Could not create datasource for type: '");
|
||||
|
@ -152,7 +152,7 @@ std::vector<std::string> datasource_cache::plugin_names()
|
|||
names = get_static_datasource_names();
|
||||
#endif
|
||||
|
||||
std::map<std::string,boost::shared_ptr<PluginInfo> >::const_iterator itr;
|
||||
std::map<std::string,std::shared_ptr<PluginInfo> >::const_iterator itr;
|
||||
for (itr = plugins_.begin(); itr != plugins_.end(); ++itr)
|
||||
{
|
||||
names.push_back(itr->first);
|
||||
|
@ -198,7 +198,7 @@ bool datasource_cache::register_datasource(std::string const& filename)
|
|||
bool success = false;
|
||||
try
|
||||
{
|
||||
boost::shared_ptr<PluginInfo> plugin = boost::make_shared<PluginInfo>(filename,"datasource_name");
|
||||
std::shared_ptr<PluginInfo> plugin = std::make_shared<PluginInfo>(filename,"datasource_name");
|
||||
if (plugin->valid())
|
||||
{
|
||||
if (plugin->name().empty())
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace mapnik {
|
|||
template<typename T>
|
||||
datasource_ptr ds_generator(parameters const& params)
|
||||
{
|
||||
return boost::make_shared<T>(params);
|
||||
return std::make_shared<T>(params);
|
||||
}
|
||||
|
||||
typedef datasource_ptr (*ds_generator_ptr)(parameters const& params);
|
||||
|
|
|
@ -50,7 +50,7 @@ expression_ptr parse_expression(std::string const& str,
|
|||
bool r = boost::spirit::qi::phrase_parse(itr, end, g, boost::spirit::standard_wide::space, node);
|
||||
if (r && itr == end)
|
||||
{
|
||||
return boost::make_shared<expr_node>(node);
|
||||
return std::make_shared<expr_node>(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -238,7 +238,7 @@ face_ptr freetype_engine::create_face(std::string const& family_name)
|
|||
itr->second.first, // face index
|
||||
&face);
|
||||
|
||||
if (!error) return boost::make_shared<font_face>(face);
|
||||
if (!error) return std::make_shared<font_face>(face);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ face_ptr freetype_engine::create_face(std::string const& family_name)
|
|||
static_cast<FT_Long>(buffer.size()),
|
||||
itr->second.first,
|
||||
&face);
|
||||
if (!error) return boost::make_shared<font_face>(face);
|
||||
if (!error) return std::make_shared<font_face>(face);
|
||||
else
|
||||
{
|
||||
// we can't load font, erase it.
|
||||
|
@ -274,7 +274,7 @@ stroker_ptr freetype_engine::create_stroker()
|
|||
FT_Error error = FT_Stroker_New(library_, &s);
|
||||
if (!error)
|
||||
{
|
||||
return boost::make_shared<stroker>(s);
|
||||
return std::make_shared<stroker>(s);
|
||||
}
|
||||
return stroker_ptr();
|
||||
}
|
||||
|
@ -295,11 +295,11 @@ glyph_ptr font_face_set::get_glyph(unsigned c) const
|
|||
for ( face_ptr const& face : faces_)
|
||||
{
|
||||
FT_UInt g = face->get_char(c);
|
||||
if (g) return boost::make_shared<font_glyph>(face, g);
|
||||
if (g) return std::make_shared<font_glyph>(face, g);
|
||||
}
|
||||
|
||||
// Final fallback to empty square if nothing better in any font
|
||||
return boost::make_shared<font_glyph>(*faces_.begin(), 0);
|
||||
return std::make_shared<font_glyph>(*faces_.begin(), 0);
|
||||
}
|
||||
|
||||
char_info font_face_set::character_dimensions(unsigned int c)
|
||||
|
|
|
@ -49,7 +49,7 @@ void text_node::to_xml(ptree &xml) const
|
|||
|
||||
node_ptr text_node::from_xml(xml_node const& xml)
|
||||
{
|
||||
return boost::make_shared<text_node>(xml.get_value<expression_ptr>());
|
||||
return std::make_shared<text_node>(xml.get_value<expression_ptr>());
|
||||
}
|
||||
|
||||
void text_node::apply(char_properties const& p, feature_impl const& feature, processed_text &output) const
|
||||
|
|
|
@ -47,7 +47,7 @@ hit_grid<T>::hit_grid(int width, int height, std::string const& key, unsigned in
|
|||
names_(),
|
||||
f_keys_(),
|
||||
features_(),
|
||||
ctx_(boost::make_shared<mapnik::context_type>())
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
f_keys_[base_mask] = "";
|
||||
data_.set(base_mask);
|
||||
|
@ -80,7 +80,7 @@ void hit_grid<T>::clear()
|
|||
names_.clear();
|
||||
f_keys_[base_mask] = "";
|
||||
data_.set(base_mask);
|
||||
ctx_ = boost::make_shared<mapnik::context_type>();
|
||||
ctx_ = std::make_shared<mapnik::context_type>();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -66,7 +66,7 @@ grid_renderer<T>::grid_renderer(Map const& m, T & pixmap, double scale_factor, u
|
|||
t_(pixmap_.width(),pixmap_.height(),m.get_current_extent(),offset_x,offset_y),
|
||||
font_engine_(),
|
||||
font_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(box2d<double>(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))),
|
||||
detector_(std::make_shared<label_collision_detector4>(box2d<double>(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))),
|
||||
ras_ptr(new grid_rasterizer)
|
||||
{
|
||||
setup(m);
|
||||
|
@ -84,7 +84,7 @@ grid_renderer<T>::grid_renderer(Map const& m, request const& req, T & pixmap, do
|
|||
t_(pixmap_.width(),pixmap_.height(),req.extent(),offset_x,offset_y),
|
||||
font_engine_(),
|
||||
font_manager_(font_engine_),
|
||||
detector_(boost::make_shared<label_collision_detector4>(box2d<double>(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))),
|
||||
detector_(std::make_shared<label_collision_detector4>(box2d<double>(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))),
|
||||
ras_ptr(new grid_rasterizer)
|
||||
{
|
||||
setup(m);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue