00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HK_URL
00013 #define HK_URL
00014
00015 #include "hk_class.h"
00016 #include "hk_string.h"
00017 class hk_url: public hk_class
00018 {
00019 public:
00020 hk_url();
00021 hk_url(const hk_string&);
00022 bool operator=(const hk_url& url);
00023 bool operator=(const hk_string& url);
00024 bool is_valid() const {return p_isvalid;}
00025 bool is_local() const {return p_islocal;}
00026 hk_string url(void) const {return p_url;}
00027 hk_string filename(void) const {return p_filename;}
00028 hk_string directory(void) const { return p_directory;}
00029 hk_string extension(void) const { return p_extension;}
00030 private:
00031 void init();
00032 bool parse_url();
00033 bool set_url(const hk_string&);
00034 bool p_isvalid;
00035 bool p_islocal;
00036 hk_string p_url;
00037 hk_string p_filename;
00038 hk_string p_directory;
00039 hk_string p_extension;
00040 };
00041
00042 #endif // HK_URL