If there are no a priori objections, I'd like to work a little on
converter.C to:

* clean a little the interface. Right there is ugly code like this in
importer.C:

        vector<Format const *> result =
                converters.getReachableTo(loaders[0], true);
        for (vector<string>::const_iterator it = loaders.begin() + 1;
             it != loaders.end(); ++it) {
                vector<Format const *> r =
                        converters.getReachableTo(*it, false);
                result.insert(result.end(), r.begin(), r.end());
        }

where getReachableTo is defined as 

  Converters::getReachableTo(string const & target, bool clear_visited).

This clear_visited is clearly part of the implementation.

So in principle we can have a getReachableTo(vector<string> const & loaders)
or something.

The same situation when one wants to get a conversion to any displayable
format, etc.

* clean a little the implementation, separating the 'graph' part from the
conversion part.

* add weights (slowness and accurateness) to converters and find the least
weighted path instead of the shortest, as suggested by JMarc. We can then
pass an optional flag (or even a real value between 0 and 1) to the
converter code asking for accurateness or for speed.

Is it ok? Advices?


Thanks, 
        Alfredo


Reply via email to