void FaerieAnimationsCollection::Reread() { Clear(); Xml::ReadDocument doc(_filename); Xml::Node* rootNode = doc.first_node(); assert(rootNode != NULL); Xml::Node* animationNode = rootNode->first_node("animation"); while (animationNode != NULL) { FaerieAnimation* animation = new FaerieAnimation(animationNode); std::string animationName = animation->GetName(); assert(_mapAnimations.find(animationName) == _mapAnimations.end()); _mapAnimations[animationName] = animation; animationNode = animationNode->next_sibling("animation"); } }