Example #1
0
void Config::set(PMap &a, const PMap &b, bool merge) {
	if(!merge) {
		a.clear();
		a = b;
		return;
	}
	for(PMap::const_iterator i = b.begin(); i != b.end(); ++i) {
		a.insert(*i);
	}
}
Example #2
0
 Tag(const std::string& tag, const PMap& props, std::ostream& os)
     : name_(tag), os_(os)
 {
     indent(os);
     os << "<" << tag;
     for (PMap::const_iterator it = props.begin(); it != props.end(); ++it) {
         os << " " << it->first << "=\"" << it->second << "\"";
     }
     os << ">\n";
     ++indent_;
 }