#ifndef ROOT_TUrl #define ROOT_TUrl //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TUrl // // // // This class represents a WWW compatible URL. // // It provides member functions to returns the different parts of // // an URL. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TObject //*KEEP,TObject. #include "TObject.h" //*KEND. #endif #ifndef ROOT_TString //*KEEP,TString. #include "TString.h" //*KEND. #endif class TUrl : public TObject { private: TString fUrl; // full URL TString fProtocol; // protocol: http, ftp, news, root, rfio, hpss TString fHost; // remote host TString fFile; // remote object TString fAnchor; // anchor in object TString fOptions; // options (after ?) Int_t fPort; // port through which to contact remote server TUrl() { fPort = -1; } public: TUrl(const char *url); TUrl(const TUrl &url); TUrl &operator=(const TUrl &rhs); virtual ~TUrl() { } const char *GetUrl(); const char *GetProtocol() const { return fProtocol.Data(); } const char *GetHost() const { return fHost.Data(); } const char *GetFile() const { return fFile.Data(); } const char *GetAnchor() const { return fAnchor.Data(); } const char *GetOptions() const { return fOptions.Data(); } Int_t GetPort() const { return fPort; } Bool_t IsValid() const { return fPort == -1 ? kFALSE : kTRUE; } void Print(Option_t *option=""); ClassDef(TUrl,1) //Represents an URL }; #endif