class TUrl: public TObject


TUrl

This class represents a WWW compatible URL.
It provides member functions to return the different parts of
an URL. The supported url format is:
[proto://][user[:passwd]@]host[:port]/file.ext[#anchor][?options]


Function Members (Methods)

public:
TUrl()
TUrl(const TUrl& url)
TUrl(const char* url, Bool_t defaultIsFile = kFALSE)
virtual~TUrl()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tCompare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const char*GetAnchor() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
const char*GetFile() const
const char*GetFileAndOptions() const
const char*GetHost() const
const char*GetHostFQDN() const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*GetOptions() const
const char*GetPasswd() const
Int_tGetPort() const
const char*GetProtocol() const
static TObjArray*GetSpecialProtocols()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
const char*GetUrl(Bool_t withDeflt = kFALSE)
const char*GetUser() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tIsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TUrl&operator=(const TUrl& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAnchor(const char* anchor)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetFile(const char* file)
voidSetHost(const char* host)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOptions(const char* opt)
voidSetPasswd(const char* pw)
voidSetPort(Int_t port)
voidSetProtocol(const char* proto, Bool_t setDefaultPort = kFALSE)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUrl(const char* url, Bool_t defaultIsFile = kFALSE)
voidSetUser(const char* user)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidFindFile(char* u, Bool_t stripDoubleSlash = kTRUE)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
TStringfAnchoranchor in object (after #)
TStringfFileremote object
TStringfFileOA!file with option and anchor
TStringfHostremote host
TStringfHostFQ!fully qualified host name
TStringfOptionsoptions/search (after ?)
TStringfPasswdpassword
Int_tfPortport through which to contact remote server
TStringfProtocolprotocol: http, ftp, news, root, proof, ...
TStringfUrlfull URL
TStringfUseruser name
static THashList*fgHostFQDNslist of resolved host FQDNs
static TObjArray*fgSpecialProtocolslist of special protocols

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TUrl(const char* url, Bool_t defaultIsFile = kFALSE)
 Parse url character string and split in its different subcomponents.
 Use IsValid() to check if URL is legal.

 url: [proto://][user[:passwd]@]host[:port]/file.ext[?options][#anchor]

 Known protocols: http, root, proof, ftp, news and any special protocols
 defined in the rootrc Url.Special key.
 The default protocol is "http", unless defaultIsFile is true in which
 case the url is assumed to be of type "file".
 If a passwd contains a @ it must be escaped by a \\, e.g.
 "pip@" becomes "pip\\@".

 Default ports: http=80, root=1094, proof=1093, ftp=20, news=119.
 Port #1093 has been assigned by IANA (www.iana.org) to proofd.
 Port #1094 has been assigned by IANA (www.iana.org) to rootd.
void SetUrl(const char* url, Bool_t defaultIsFile = kFALSE)
 Parse url character string and split in its different subcomponents.
 Use IsValid() to check if URL is legal.

 url: [proto://][user[:passwd]@]host[:port]/file.ext[?options][#anchor]

 Known protocols: http, root, proof, ftp, news and any special protocols
 defined in the rootrc Url.Special key.
 The default protocol is "http", unless defaultIsFile is true in which
 case the url is assumed to be of type "file".
 If a passwd contains a @ it must be escaped by a \\, e.g.
 "pip@" becomes "pip\\@".

 Default ports: http=80, root=1094, proof=1093, ftp=20, news=119.
 Port #1093 has been assigned by IANA (www.iana.org) to proofd.
 Port #1094 has been assigned by IANA (www.iana.org) to rootd.
void FindFile(char* u, Bool_t stripDoubleSlash = kTRUE)
 Find file and optionally anchor and options.
TUrl(const TUrl& url)
 TUrl copt ctor.
TUrl & operator=(const TUrl& rhs)
 TUrl assignment operator.
const char * GetUrl(Bool_t withDeflt = kFALSE)
 Return full URL. If withDflt is kTRUE, explicitly add the port even
 if it matches the default value for the URL protocol.
const char * GetHostFQDN()
 Return fully qualified domain name of url host. If host cannot be
 resolved or not valid return the host name as originally specified.
const char * GetFileAndOptions()
 Return the file and its options (the string specified behind the ?).
 Convenience function useful when the option is used to pass
 authetication/access information for the specified file.
void SetProtocol(const char* proto, Bool_t setDefaultPort = kFALSE)
 Set protocol and, optionally, change the port accordingly.
Int_t Compare(const TObject* obj) const
 Compare two urls as strings.
void Print(Option_t* option = "") const
 Print URL on stdout.
TObjArray * GetSpecialProtocols()
 Read the list of special protocols from the rootrc files.
 These protocols will be parsed in a protocol and a file part,
 no host or other info will be determined. This is typically
 used for legacy file descriptions like: rfio:host:/path/file.root.
TUrl(const TUrl& url)
{ }
virtual ~TUrl()
{ }
const char * GetProtocol()
{ return fProtocol; }
const char * GetUser()
{ return fUser; }
const char * GetPasswd()
{ return fPasswd; }
const char * GetHost()
{ return fHost; }
const char * GetFile()
{ return fFile; }
const char * GetAnchor()
{ return fAnchor; }
const char * GetOptions()
{ return fOptions; }
Int_t GetPort()
{ return fPort; }
Bool_t IsValid()
{ return fPort == -1 ? kFALSE : kTRUE; }
void SetUser(const char* user)
{ fUser = user; fUrl = ""; }
void SetPasswd(const char* pw)
{ fPasswd = pw; fUrl = ""; }
void SetHost(const char* host)
{ fHost = host; fUrl = ""; }
void SetFile(const char* file)
{ fFile = file; fUrl = ""; fFileOA = "";}
void SetAnchor(const char* anchor)
{ fAnchor = anchor; fUrl = ""; fFileOA = ""; }
void SetOptions(const char* opt)
{ fOptions = opt; fUrl = ""; fFileOA = ""; }
void SetPort(Int_t port)
{ fPort = port; fUrl = ""; }
Bool_t IsSortable()
{ return kTRUE; }

Author: Fons Rademakers 17/01/97
Last change: root/base:$Id: TUrl.h 22301 2008-02-24 15:04:36Z rdm $
Last generated: 2008-06-25 08:54
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.