コード例 #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);
	}
}
コード例 #2
0
ファイル: writeVtkData.cpp プロジェクト: jepebe/opm-core
 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_;
 }