From: Glyn M. <gly...@gm...> - 2008-10-23 21:17:52
|
Hi Kim, 2008/10/23 Kim Gräsman <kim...@gm...> > Glyn, > > On Tue, Oct 21, 2008 at 14:23, Glyn Matthews <gly...@gm...> > wrote: > > > > Do you still intend to keep the host/port in the fusion map? How do you > > intend to deal with URIs like this: > > > > file:///home/user/myfile.txt > > mailto:som...@ex... > > I just checked briefly how .NET's System.Uri class handles this, and > it treats them all the same. > > > file:///home/user/myfile.txt > > No host + port here, only a scheme and a path > > > mailto:som...@ex... > > No path info, just a user prefix (some.dude) and a host (example.com) > > I suppose that makes sense in a way... Thoughts? > so we'd have something like: template <class Tags> class basic_uri { public: typename string<Tags>::type scheme() const; typename string<Tags>::type host() const; int host() const; typename string<Tags>::type user_info() const; typename string<Tags>::type authority() const; // etc. }; and the member functions return empty strings for the components that don't apply? That's not a problem. If you want to compare with other languages, the documentation for Java's URI class is good: http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html Do you have time to do a lot with this? Could we target a 0.4 release with a URI class? I can help with what I can, but I'm really busy at work. G |