Hi all,
I am back from holidays today, and have been catching up on my email.
I was wondering: would a good task for this cycle be a reorganization of our set of scattered, disparate I/O classes into a nice, clean heirarchy of its own, such as /src/io and the namespace Inkscape::IO? We have been talking about moving from filenames to URIs for months now, and changing slowly from FILE * to iostreams. Maybe now at the beginning of a release cycle would be a good time to bite the bullet. This would not be a roadmap thing, but a nice clean top-to-bottom refactoring that would finally take care of our recurring migraines with files and paths and localization. Consider it to be a big bugfix.
If we could upgrade from char * ---to--->FILE *
to a much cleaner URI ---to--->istream and URI ---to--->ostream
...with built-in support for localization, it would make things a LOT easier.
I have been looking around the net a lot, and there already exists a wonderful 'gzstreams' lib for supporting .svgz without pipes. I experimented with it by recoding my copy of repr-io.cpp to use iostreams instead of FILE *, and it worked wonderfully.
There is also a pair of iostream implementations I found, that provide printf() and scanf() style formatting, to alleviate the pain of conversion somewhat.
This would be a lot like Java's "java.io.*" heirarchy, putting streams, files, URI/URL's and paths into one place.
Any thoughts, opinions? This is just something I have been thinking about recently.
Bob