+void Converters::erase(string const & from, string const & to)
+{
+ ConverterList::iterator it = find_if(converterlist_.begin(),
+ converterlist_.end(),
+ compare_Converter(from, to));
+ if (it != converterlist_.end())
+ converterlist_.erase(it);
+}
+
+
+// This method updates the pointers From and To in all the converters.
+// The code is not very efficient, but it doesn't matter as the number
+// of formats and converters is small.
+// Furthermore, this method is called only on startup, or after
+// adding/deleting a format in FormPreferences (the latter calls can be
+// eliminated if the formats in the Formats class are stored using a map or
+// a list (instead of a vector), but this will cause other problems).
+void Converters::update(Formats const & formats)
+{
+ ConverterList::iterator it = converterlist_.begin();
+ ConverterList::iterator end = converterlist_.end();
+ for (; it != end; ++it) {
+ it->From = formats.getFormat(it->from);
+ it->To = formats.getFormat(it->to);
+ }
+}
+
+
+// This method updates the pointers From and To in the last converter.
+// It is called when adding a new converter in FormPreferences
+void Converters::updateLast(Formats const & formats)
+{
+ if (converterlist_.begin() != converterlist_.end()) {
+ ConverterList::iterator it = converterlist_.end() - 1;
+ it->From = formats.getFormat(it->from);
+ it->To = formats.getFormat(it->to);
+ }
+}
+
+
+void Converters::sort()
+{
+ std::sort(converterlist_.begin(), converterlist_.end());
+}
+
+
+int Converters::bfs_init(string const & start, bool clear_visited)