+XMLNode*
+ChanMapping::state(const std::string& name) const
+{
+ XMLNode* node = new XMLNode (name);
+ const Mappings& mp (mappings());
+ for (Mappings::const_iterator tm = mp.begin(); tm != mp.end(); ++tm) {
+ for (TypeMapping::const_iterator i = tm->second.begin(); i != tm->second.end(); ++i) {
+ XMLNode* n = new XMLNode(X_(state_node_name));
+ n->set_property("type", tm->first.to_string());
+ n->set_property("from", i->first);
+ n->set_property("to", i->second);
+ node->add_child_nocopy(*n);
+ }
+ }
+ return node;
+}
+