apply mapnik_format.el formatting
This commit is contained in:
parent
2b68cea0a1
commit
2f10469c8d
13 changed files with 42 additions and 42 deletions
|
@ -66,7 +66,7 @@ public:
|
|||
void start_layer_processing(layer const& lay, box2d<double> const& query_extent);
|
||||
void end_layer_processing(layer const& lay);
|
||||
void render_marker(pixel_position const& pos, marker const& marker, agg::trans_affine const& tr, double opacity);
|
||||
|
||||
|
||||
void process(point_symbolizer const& sym,
|
||||
mapnik::feature_ptr const& feature,
|
||||
proj_transform const& prj_trans);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static void init_from_string(color & c, std::string const& css_color);
|
||||
|
||||
static bool parse_from_string(color & c, std::string const& css_color,
|
||||
mapnik::css_color_grammar<std::string::const_iterator> const& g);
|
||||
mapnik::css_color_grammar<std::string::const_iterator> const& g);
|
||||
|
||||
static color from_string(std::string const& css_color);
|
||||
};
|
||||
|
|
|
@ -229,7 +229,7 @@ struct expression_grammar : qi::grammar<Iterator, expr_node(), space_type>
|
|||
("\\r", '\r')("\\t", '\t')("\\v", '\v')("\\\\", '\\')
|
||||
("\\\'", '\'')("\\\"", '\"')
|
||||
;
|
||||
|
||||
|
||||
#if BOOST_VERSION > 104500
|
||||
quote_char %= char_('\'') | char_('"');
|
||||
ustring %= omit[quote_char[_a = _1]]
|
||||
|
@ -237,7 +237,7 @@ struct expression_grammar : qi::grammar<Iterator, expr_node(), space_type>
|
|||
>> lit(_a);
|
||||
attr %= '[' >> no_skip[+~char_(']')] >> ']';
|
||||
#else
|
||||
ustring %= lit('\'')
|
||||
ustring %= lit('\'')
|
||||
>> *(unesc_char | "\\x" >> hex | (char_ - lit('\'')))
|
||||
>> lit('\'');
|
||||
attr %= '[' >> lexeme[+(char_ - ']')] >> ']';
|
||||
|
|
|
@ -99,11 +99,11 @@ public:
|
|||
|
||||
feature_impl(context_ptr const& ctx, int id)
|
||||
: id_(id),
|
||||
ctx_(ctx),
|
||||
data_(ctx_->mapping_.size()),
|
||||
geom_cont_(),
|
||||
raster_()
|
||||
{}
|
||||
ctx_(ctx),
|
||||
data_(ctx_->mapping_.size()),
|
||||
geom_cont_(),
|
||||
raster_()
|
||||
{}
|
||||
|
||||
inline int id() const { return id_;}
|
||||
|
||||
|
@ -163,25 +163,25 @@ public:
|
|||
{
|
||||
context_type::map_type::const_iterator itr = ctx_->mapping_.find(key);
|
||||
if (itr != ctx_->mapping_.end())
|
||||
return get(itr->second);
|
||||
else
|
||||
throw std::out_of_range(std::string("Key does not exist: '") + key + "'");
|
||||
return get(itr->second);
|
||||
else
|
||||
throw std::out_of_range(std::string("Key does not exist: '") + key + "'");
|
||||
}
|
||||
|
||||
|
||||
value_type const& get(std::size_t index) const
|
||||
{
|
||||
if (index < data_.size())
|
||||
return data_[index];
|
||||
throw std::out_of_range("Index out of range");
|
||||
}
|
||||
|
||||
|
||||
boost::optional<value_type const&> get_optional(std::size_t index) const
|
||||
{
|
||||
if (index < data_.size())
|
||||
return boost::optional<value_type const&>(data_[index]);
|
||||
return boost::optional<value_type const&>();
|
||||
}
|
||||
|
||||
|
||||
std::size_t size() const
|
||||
{
|
||||
return data_.size();
|
||||
|
@ -273,7 +273,7 @@ public:
|
|||
if (index < data_.size())
|
||||
{
|
||||
ss << " " << itr->first << ":" << data_[itr->second] << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
ss << ")" << std::endl;
|
||||
return ss.str();
|
||||
|
|
|
@ -153,7 +153,7 @@ class MAPNIK_DECL font_face_set : private boost::noncopyable
|
|||
public:
|
||||
font_face_set(void)
|
||||
: faces_(),
|
||||
dimension_cache_() {}
|
||||
dimension_cache_() {}
|
||||
|
||||
void add(face_ptr face)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace formatting
|
|||
typedef node_ptr (*from_xml_function_ptr)(xml_node const& xml);
|
||||
|
||||
class registry : public singleton<registry, CreateStatic>,
|
||||
private boost::noncopyable
|
||||
private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
registry();
|
||||
|
|
|
@ -390,7 +390,7 @@ public:
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
typedef geometry<double,vertex_vector> geometry_type;
|
||||
|
|
|
@ -160,7 +160,7 @@ public:
|
|||
|
||||
~hextree()
|
||||
{}
|
||||
|
||||
|
||||
void setMaxColors(unsigned max_colors)
|
||||
{
|
||||
max_colors_ = max_colors;
|
||||
|
@ -335,7 +335,7 @@ public:
|
|||
|
||||
sorted_pal_.reserve(colors_);
|
||||
create_palette_rek(sorted_pal_, root_.get());
|
||||
|
||||
|
||||
// sort palette for binary searching in quantization
|
||||
#if BOOST_VERSION >= 104600
|
||||
boost::sort(sorted_pal_, rgba::mean_sort_cmp());
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <mapnik/xml_node.hpp>
|
||||
|
||||
/* Debug dump ptree XML representation.
|
||||
*/
|
||||
*/
|
||||
void dump_xml(xml_node const& xml, unsigned level=0)
|
||||
{
|
||||
std::string indent;
|
||||
|
|
|
@ -124,16 +124,16 @@ private:
|
|||
text_symbolizer_properties const& p;
|
||||
text_placement_info const& pi;
|
||||
/** Length of the longest line after linebreaks.
|
||||
* Before find_line_breaks() this is the total length of the string.
|
||||
*/
|
||||
* Before find_line_breaks() this is the total length of the string.
|
||||
*/
|
||||
double string_width_;
|
||||
/** Height of the string after linebreaks.
|
||||
* Before find_line_breaks() this is the total length of the string.
|
||||
*/
|
||||
* Before find_line_breaks() this is the total length of the string.
|
||||
*/
|
||||
double string_height_;
|
||||
/** Height of the tallest font in the first line not including line spacing.
|
||||
* Used to determine the correct offset for the first line.
|
||||
*/
|
||||
* Used to determine the correct offset for the first line.
|
||||
*/
|
||||
double first_line_space_;
|
||||
vertical_alignment_e valign_;
|
||||
horizontal_alignment_e halign_;
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef text_placements_ptr (*from_xml_function_ptr)(
|
|||
xml_node const& xml, fontset_map const & fontsets);
|
||||
|
||||
class registry : public singleton<registry, CreateStatic>,
|
||||
private boost::noncopyable
|
||||
private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
registry();
|
||||
|
|
|
@ -30,16 +30,16 @@
|
|||
|
||||
namespace mapnik { namespace conversions {
|
||||
|
||||
bool string2int(const char * value, int & result);
|
||||
bool string2int(std::string const& value, int & result);
|
||||
|
||||
bool string2double(std::string const& value, double & result);
|
||||
bool string2double(const char * value, double & result);
|
||||
|
||||
bool string2float(std::string const& value, float & result);
|
||||
bool string2float(const char * value, float & result);
|
||||
bool string2int(const char * value, int & result);
|
||||
bool string2int(std::string const& value, int & result);
|
||||
|
||||
}
|
||||
bool string2double(std::string const& value, double & result);
|
||||
bool string2double(const char * value, double & result);
|
||||
|
||||
bool string2float(std::string const& value, float & result);
|
||||
bool string2float(const char * value, float & result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MAPNIK_CONVERSIONS_UTIL_HPP
|
||||
|
|
|
@ -55,16 +55,16 @@ public:
|
|||
// required for iterators support
|
||||
typedef boost::tuple<unsigned,coord_type,coord_type> value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
|
||||
private:
|
||||
unsigned num_blocks_;
|
||||
unsigned max_blocks_;
|
||||
coord_type** vertices_;
|
||||
unsigned char** commands_;
|
||||
size_type pos_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
vertex_vector()
|
||||
: num_blocks_(0),
|
||||
max_blocks_(0),
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
*y = (*vertex);
|
||||
return commands_[block] [pos & block_mask];
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void allocate_block(unsigned block)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue