From: K. G. <kim...@gm...> - 2008-10-26 12:43:24
|
Hi John, On Thu, Oct 23, 2008 at 23:38, John P. Feltz <jf...@ov...> wrote: > > typedef URI< > URI<>, > std::string, > HostConnection, > std::string, > std::string > > HTTP; > > class HostConnection { > public: > std::string getName() const; > const int* getPort() const; > > HostConnection(const HostConnection& other); > ~HostConnection(); > > private: > friend HostConnection* parse<std::string, HostConnection> > (std::stack<std::string>& errors, const std::string& input); > > HostConnection(const std::string& name, const int* port); > > const std::string m_name; > const int* m_port; > }; Looks pretty interesting. I like how the parse function is free and separated from the data struct. Can parse(string, URI) transparently use parse(string, HostConnection) based on the template args as well? Thanks, - Kim |