Esempio n. 1
0
void FileItem::toXML(xmlpp::Element &root)
{
    using namespace xmlpp;

    Element *tmp = root.add_child("file");
    tmp->set_attribute("name",sFileName);
}
Esempio n. 2
0
void Character::toXML(xmlpp::Element &root) const
{
    using namespace xmlpp;

    for (vector<std::string>::const_iterator it = vSkills.begin(); it != vSkills.end(); it++)
    {
        Element *tmp = root.add_child("skill");
        tmp->set_attribute("value",*it);
    }
}
Esempio n. 3
0
void Character::toXML(const IOConfig &config, xmlpp::Element &root) const
{
    using namespace xmlpp;

    for (vector<std::string>::const_iterator it = vProperties.begin(); it != vProperties.end(); it++)
    {
        Element *tmp = root.add_child(config.propertyName());
        tmp->set_attribute("value",*it);
    }
}
Esempio n. 4
0
void Sobby::Config::ParentEntry::save(xmlpp::Element& elem) const
{
	for(map_type::const_iterator iter = m_map.begin();
	    iter != m_map.end();
	    ++ iter)
	{
		Entry* entry = iter->second;
		xmlpp::Element* child = elem.add_child(entry->get_name() );
		entry->save(*child);
	}
}
Esempio n. 5
0
void CharacterList::toXML(xmlpp::Element &root) const
{
    using namespace xmlpp;

    for (vector<Character>::const_iterator it = vCharacters.begin(); it != vCharacters.end(); it++)
    {
        Element *tmp = root.add_child("character");
        tmp->set_attribute("name",it->name());
        tmp->set_attribute("playername",it->playerName());
        it->toXML(*tmp);
    }
}