Rename set_values_from_xml to from_xml.
This commit is contained in:
parent
a606f3cd9a
commit
a3871e52b7
5 changed files with 8 additions and 8 deletions
|
@ -95,7 +95,7 @@ struct text_symbolizer_properties
|
|||
{
|
||||
text_symbolizer_properties();
|
||||
/** Load all values and also the ```processor``` object from XML ptree. */
|
||||
void set_values_from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets);
|
||||
void from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets);
|
||||
/** Save all values to XML ptree (but does not create a new parent node!). */
|
||||
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, text_symbolizer_properties const &dfl=text_symbolizer_properties()) const;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ struct char_properties
|
|||
{
|
||||
char_properties();
|
||||
/** Construct object from XML. */
|
||||
void set_values_from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets);
|
||||
void from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets);
|
||||
/** Write object to XML ptree. */
|
||||
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const &dfl=char_properties()) const;
|
||||
std::string face_name;
|
||||
|
|
|
@ -1282,7 +1282,7 @@ void map_parser::parse_text_symbolizer( rule & rule, ptree const & sym )
|
|||
}
|
||||
|
||||
text_symbolizer text_symbol = text_symbolizer(placement_finder);
|
||||
placement_finder->properties.set_values_from_xml(sym, fontsets_);
|
||||
placement_finder->properties.from_xml(sym, fontsets_);
|
||||
if (strict_) ensure_font_face(placement_finder->properties.processor.defaults.face_name);
|
||||
if (list) {
|
||||
ptree::const_iterator symIter = sym.begin();
|
||||
|
@ -1296,7 +1296,7 @@ void map_parser::parse_text_symbolizer( rule & rule, ptree const & sym )
|
|||
}
|
||||
ensure_attrs(symIter->second, "TextSymbolizer/Placement", s_common.str());
|
||||
text_symbolizer_properties & p = list->add();
|
||||
p.set_values_from_xml(symIter->second, fontsets_);
|
||||
p.from_xml(symIter->second, fontsets_);
|
||||
if (strict_) ensure_font_face(p.processor.defaults.face_name);
|
||||
}
|
||||
}
|
||||
|
@ -1419,7 +1419,7 @@ void map_parser::parse_shield_symbolizer( rule & rule, ptree const & sym )
|
|||
}
|
||||
}
|
||||
text_placements_ptr placement_finder = shield_symbol.get_placement_options();
|
||||
placement_finder->properties.set_values_from_xml(sym, fontsets_);
|
||||
placement_finder->properties.from_xml(sym, fontsets_);
|
||||
rule.append(shield_symbol);
|
||||
}
|
||||
catch (const config_error & ex)
|
||||
|
|
|
@ -63,7 +63,7 @@ text_symbolizer_properties::text_symbolizer_properties() :
|
|||
|
||||
}
|
||||
|
||||
void text_symbolizer_properties::set_values_from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets)
|
||||
void text_symbolizer_properties::from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets)
|
||||
{
|
||||
optional<label_placement_e> placement_ = get_opt_attr<label_placement_e>(sym, "placement");
|
||||
if (placement_) label_placement = *placement_;
|
||||
|
@ -204,7 +204,7 @@ char_properties::char_properties() :
|
|||
|
||||
}
|
||||
|
||||
void char_properties::set_values_from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets)
|
||||
void char_properties::from_xml(boost::property_tree::ptree const &sym, std::map<std::string,font_set> const & fontsets)
|
||||
{
|
||||
optional<double> text_size_ = get_opt_attr<double>(sym, "size");
|
||||
if (text_size_) text_size = *text_size_;
|
||||
|
|
|
@ -363,7 +363,7 @@ formating::node_ptr text_processor::get_format_tree() const
|
|||
|
||||
void text_processor::from_xml(const boost::property_tree::ptree &pt, std::map<std::string,font_set> const &fontsets)
|
||||
{
|
||||
defaults.set_values_from_xml(pt, fontsets);
|
||||
defaults.from_xml(pt, fontsets);
|
||||
formating::node_ptr n = formating::node::from_xml(pt);
|
||||
if (n) set_format_tree(n);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue