#include #include #include #include #include #include namespace fc { // url::url( const url& u ); #if 0 url::url( url&& u ) :proto(fc::move(u.proto)), host(fc::move(u.host)), user(fc::move(u.user)), pass(fc::move(u.pass)), path(fc::move(u.path)), args(fc::move(u.args)), port(u.port){} url& url::operator=(url&& c) { fc::swap(*this,c); return *this; } // url::url& operator=(const url& c) { // } #endif url::url( const string& s ) { from_string(s); } string url::to_string()const { fc::stringstream ss; ss<( host_port.substr( pos+1 ) ); } catch ( ... ) { FC_THROW_REPORT( "Unable to parse port field in url", value().set( "url", s ) ); } host = host_port.substr(0,pos); } else { host = fc::move(host_port); } fc::getline( ss, _path, '?' ); fc::getline( ss, _args ); path = fc::move(_path); if( _args.size() ) args = fc::move(_args); return *this; } bool url::operator==( const url& cmp )const { return cmp.proto == proto && cmp.host == host && cmp.user == user && cmp.pass == pass && cmp.path == path && cmp.args == args && cmp.port == port; } } // namespace fc