Exemplo n.º 1
0
//-----------------------------------------------------------------------------------------
void load_components(const XmlElement::XmlSet& comlist, Components& components)
{
	for(const auto *pp : comlist)
	{
		string name;
		if (pp->GetAttr("name", name))
			components.insert({name, pp});
	}
}
Exemplo n.º 2
0
//-----------------------------------------------------------------------------------------
void load_components(const XmlElement::XmlSet& comlist, Components& components)
{
	for(XmlElement::XmlSet::const_iterator itr(comlist.begin()); itr != comlist.end(); ++itr)
	{
		string name;
		if ((*itr)->GetAttr("name", name))
			components.insert(Components::value_type(name, *itr));
	}
}