From: K. G. <kim...@gm...> - 2008-10-24 19:40:25
|
Glyn, On Thu, Oct 23, 2008 at 23:17, Glyn Matthews <gly...@gm...> wrote: > > 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. Yeah, that's what I thought. I tried briefly on Thursday to get it to parse user info and host, but I never managed to bend Spirit to my will. I found a pretty solid-looking project -- http://code.google.com/p/uri-grammar/wiki/About -- that does it, but it involved more customizations than I'm comfortable with at the moment. > 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 Thanks, I've seen that one, it _is_ good. > 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. Not sure. Next is my last week of parental leave, then I'm back to full-time work with a little girl in daycare, so spare time for hacking may be scarce. And given my velocity up till now, it might take a while :) But I'm learning... - Kim |