rundel / carto-parser

12 stars 7 forks source link

shared_ptr attributes and inheritance #19

Open rundel opened 13 years ago

rundel commented 13 years ago

Currently inheritance of rules is handled using copy constructors:

mapnik::rule rule(parent_rule);

this is problematic for shared_ptr attributes like placement_options_ in text_symbolizer as all the subrules end up sharing the same shared_ptr. Not sure what the best option would be, my thinking is to come up with some way to copy these pointers with some switch in the copy constructor.

Thoughts @springmeyer?

springmeyer commented 13 years ago

interesting problem. we can change/override the copy constructor in mapnik if needed - can you look for places in the mapnik code that might break if that were done?