00001
00002
00003
00004
00005
00006
00007 #include <string>
00008 #include <iosfwd>
00009
00010 #include <saga/saga/util.hpp>
00011 #include <saga/saga/base.hpp>
00012
00013 #include <saga/saga/object.hpp>
00014
00015 #if !defined(SAGA_SAGA_URL_HPP)
00016 #define SAGA_SAGA_URL_HPP
00017
00018
00019 #if defined(BOOST_MSVC)
00020 #pragma warning(push)
00021 #pragma warning(disable: 4251 4231 4275 4660)
00022 #endif
00023
00025 namespace saga
00026 {
00035 class SAGA_EXPORT url
00036 : public saga::object
00037 {
00038 friend class saga::impl::url;
00039 friend struct saga::impl::runtime;
00040
00041 protected:
00043
00044 TR1::shared_ptr <impl::url> get_impl() const;
00045
00046 url (impl::url *impl);
00047
00048
00049 url (std::string const & urlstr, adaptors::nocheck);
00051
00052 public:
00053 url();
00054 explicit url (saga::object rhs);
00055 url(saga::url const& rhs);
00056 url(std::string const& urlstr);
00057 url(char const * urlstr);
00058 ~url(void);
00059
00060 url& operator=(char const * urlstr);
00061 url& operator=(std::string const & urlstr);
00062 url& operator=(saga::url const& rhs);
00063 url& operator=(saga::object const& rhs);
00064
00069 saga::object clone() const;
00070
00076 std::string get_string(void) const;
00077
00082 void set_string(std::string const & url);
00083
00089 std::string get_scheme (void) const;
00090
00095 void set_scheme (std::string const & scheme);
00096
00102 std::string get_host (void) const;
00103
00108 void set_host (std::string const & host);
00109
00115 int get_port (void) const;
00116
00121 void set_port (int port);
00122
00128 std::string get_fragment (void) const;
00129
00134 void set_fragment (std::string const & fragment);
00135
00141 std::string get_path (void) const;
00142
00147 void set_path (std::string const & path);
00148
00154 std::string get_userinfo (void) const;
00155
00160 void set_userinfo (std::string const & userinfo);
00161
00168 saga::url translate(std::string const& url);
00169
00171
00172
00174
00180 std::string get_url (void) const;
00181
00186 void set_url(std::string const & url);
00187
00192 std::string get_authority (void) const;
00193
00198 std::string get_query (void) const;
00199
00204 void set_query (std::string const & query);
00205
00210 void set_scheme_specific_part (std::string const & scheme_specific_part);
00211
00216 std::string get_username (void) const;
00217
00222 void set_username (std::string const & username);
00223
00228 std::string get_password (void) const;
00229
00234 void set_password (std::string const & passwd);
00235 };
00236
00238
00242 SAGA_EXPORT std::ostream& operator<< (std::ostream& os, url const& u);
00243
00248 SAGA_EXPORT std::istream& operator>> (std::istream& is, url& u);
00249
00254 SAGA_EXPORT bool operator== (saga::url const& lhs, saga::url const& rhs);
00255
00260 SAGA_EXPORT bool operator< (saga::url const& lhs, saga::url const& rhs);
00261
00263 }
00264
00265
00266 #if defined(BOOST_MSVC)
00267 #pragma warning(pop)
00268 #endif
00269
00270 #endif // SAGA_SAGA_URL_HPP
00271