Logo ROOT   6.16/01
Reference Guide
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
TUri Class Reference

This class represents a RFC 3986 compatible URI.

See http://rfc.net/rfc3986.html. It provides member functions to set and return the different the different parts of an URI. The functionality is that of a validating parser.

Definition at line 35 of file TUri.h.

Public Member Functions

 TUri ()
 
 TUri (const char *uri)
 Constructor that calls SetUri with a complete URI. More...
 
 TUri (const TString &uri)
 Constructor that calls SetUri with a complete URI. More...
 
 TUri (const TUri &uri)
 TUri copy ctor. More...
 
virtual ~TUri ()
 
const TString GetAuthority () const
 
const TString GetFragment () const
 
const TString GetHierPart () const
 
const TString GetHost () const
 
const TString GetPath () const
 
const TString GetPort () const
 
const TString GetQuery () const
 
const TString GetRelativePart () const
 
const TString GetScheme () const
 
const TString GetUri () const
 Returns the whole URI - an implementation of chapter 5.3 component recomposition. More...
 
const TString GetUserInfo () const
 
Bool_t HasAuthority () const
 
Bool_t HasFragment () const
 
Bool_t HasHierPart () const
 
Bool_t HasHost () const
 
Bool_t HasPath () const
 
Bool_t HasPort () const
 
Bool_t HasQuery () const
 
Bool_t HasRelativePart () const
 
Bool_t HasScheme () const
 
Bool_t HasUserInfo () const
 
Bool_t IsAbsolute () const
 Returns kTRUE if instance qualifies as absolute-URI absolute-URI = scheme ":" hier-part [ "?" query ] cf. More...
 
Bool_t IsReference () const
 Returns kTRUE if instance qualifies as URI-reference URI-reference = URI / relative-ref cf. More...
 
Bool_t IsRelative () const
 Returns kTRUE if instance qualifies as relative-ref relative-ref = relative-part [ "?" query ] [ "#" fragment ] cf. More...
 
Bool_t IsSortable () const
 
Bool_t IsUri () const
 Returns kTRUE if instance qualifies as URI URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] cf. More...
 
void Normalise ()
 
TUrioperator= (const TUri &rhs)
 TUri assignment operator. More...
 
void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
void Reset ()
 
Bool_t SetAuthority (const TString &authority)
 
Bool_t SetFragment (const TString &fragment)
 
Bool_t SetHierPart (const TString &hier)
 
Bool_t SetHost (const TString &host)
 
Bool_t SetPath (const TString &path)
 
Bool_t SetPort (const TString &port)
 
Bool_t SetQuery (const TString &path)
 
Bool_t SetRelativePart (const TString &)
 
Bool_t SetScheme (const TString &scheme)
 Set scheme component of URI: More...
 
Bool_t SetUri (const TString &uri)
 
Bool_t SetUserInfo (const TString &userinfo)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Static Public Member Functions

static Bool_t IsAuthority (const TString &)
 
static Bool_t IsFragment (const TString &)
 
static Bool_t IsHierPart (const TString &)
 
static Bool_t IsHost (const TString &)
 
static Bool_t IsIpv4 (const TString &)
 
static Bool_t IsPath (const TString &)
 
static Bool_t IsPathAbempty (const TString &)
 
static Bool_t IsPathAbsolute (const TString &)
 
static Bool_t IsPathEmpty (const TString &)
 
static Bool_t IsPathNoscheme (const TString &)
 
static Bool_t IsPathRootless (const TString &)
 
static Bool_t IsPort (const TString &)
 
static Bool_t IsQuery (const TString &)
 
static Bool_t IsRegName (const TString &)
 
static Bool_t IsRelativePart (const TString &)
 
static Bool_t IsScheme (const TString &)
 Returns kTRUE if string qualifies as URI scheme: More...
 
static Bool_t IsUnreserved (const TString &string)
 
static Bool_t IsUserInfo (const TString &)
 
static const TString MergePaths (const TUri &reference, const TUri &base)
 
static const TString PctDecode (const TString &source)
 
static const TString PctDecodeUnreserved (const TString &source)
 
static const TString PctEncode (const TString &source)
 
static const TString PctNormalise (const TString &source)
 
static const TString RemoveDotSegments (const TString &)
 This functions implements the "remove_dot_segments" routine of chapter 5.2.4 "for interpreting and removing the special '. More...
 
static TUri Transform (const TUri &reference, const TUri &base)
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Private Attributes

TString fFragment
 
Bool_t fHasFragment
 
Bool_t fHasHost
 
Bool_t fHasPath
 
Bool_t fHasPort
 
Bool_t fHasQuery
 
Bool_t fHasScheme
 
Bool_t fHasUserinfo
 
TString fHost
 
TString fPath
 
TString fPort
 
TString fQuery
 
TString fScheme
 
TString fUserinfo
 

Friends

Bool_t operator== (const TUri &u1, const TUri &u2)
 Implementation of a TUri Equivalence operator that uses syntax-based normalisation see chapter 6.2.2. More...
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

#include <TUri.h>

Inheritance diagram for TUri:
[legend]

Constructor & Destructor Documentation

◆ TUri() [1/4]

TUri::TUri ( const TUri uri)

TUri copy ctor.

Definition at line 68 of file TUri.cxx.

◆ TUri() [2/4]

TUri::TUri ( )
inline

Definition at line 73 of file TUri.h.

◆ TUri() [3/4]

TUri::TUri ( const TString uri)

Constructor that calls SetUri with a complete URI.

Definition at line 52 of file TUri.cxx.

◆ TUri() [4/4]

TUri::TUri ( const char *  uri)

Constructor that calls SetUri with a complete URI.

Definition at line 60 of file TUri.cxx.

◆ ~TUri()

virtual TUri::~TUri ( )
inlinevirtual

Definition at line 77 of file TUri.h.

Member Function Documentation

◆ GetAuthority()

const TString TUri::GetAuthority ( ) const

◆ GetFragment()

const TString TUri::GetFragment ( ) const
inline

Definition at line 89 of file TUri.h.

◆ GetHierPart()

const TString TUri::GetHierPart ( ) const

◆ GetHost()

const TString TUri::GetHost ( ) const
inline

Definition at line 85 of file TUri.h.

◆ GetPath()

const TString TUri::GetPath ( ) const
inline

Definition at line 87 of file TUri.h.

◆ GetPort()

const TString TUri::GetPort ( ) const
inline

Definition at line 86 of file TUri.h.

◆ GetQuery()

const TString TUri::GetQuery ( ) const
inline

Definition at line 88 of file TUri.h.

◆ GetRelativePart()

const TString TUri::GetRelativePart ( ) const

◆ GetScheme()

const TString TUri::GetScheme ( ) const
inline

Definition at line 80 of file TUri.h.

◆ GetUri()

const TString TUri::GetUri ( ) const

Returns the whole URI - an implementation of chapter 5.3 component recomposition.

The result URI is composed out of the five basic parts.

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

Definition at line 140 of file TUri.cxx.

◆ GetUserInfo()

const TString TUri::GetUserInfo ( ) const
inline

Definition at line 84 of file TUri.h.

◆ HasAuthority()

Bool_t TUri::HasAuthority ( ) const
inline

Definition at line 93 of file TUri.h.

◆ HasFragment()

Bool_t TUri::HasFragment ( ) const
inline

Definition at line 99 of file TUri.h.

◆ HasHierPart()

Bool_t TUri::HasHierPart ( ) const
inline

Definition at line 92 of file TUri.h.

◆ HasHost()

Bool_t TUri::HasHost ( ) const
inline

Definition at line 95 of file TUri.h.

◆ HasPath()

Bool_t TUri::HasPath ( ) const
inline

Definition at line 97 of file TUri.h.

◆ HasPort()

Bool_t TUri::HasPort ( ) const
inline

Definition at line 96 of file TUri.h.

◆ HasQuery()

Bool_t TUri::HasQuery ( ) const
inline

Definition at line 98 of file TUri.h.

◆ HasRelativePart()

Bool_t TUri::HasRelativePart ( ) const
inline

Definition at line 100 of file TUri.h.

◆ HasScheme()

Bool_t TUri::HasScheme ( ) const
inline

Definition at line 91 of file TUri.h.

◆ HasUserInfo()

Bool_t TUri::HasUserInfo ( ) const
inline

Definition at line 94 of file TUri.h.

◆ IsAbsolute()

Bool_t TUri::IsAbsolute ( ) const

Returns kTRUE if instance qualifies as absolute-URI absolute-URI = scheme ":" hier-part [ "?" query ] cf.

Appendix A.

Definition at line 207 of file TUri.cxx.

◆ IsAuthority()

static Bool_t TUri::IsAuthority ( const TString )
static

◆ IsFragment()

static Bool_t TUri::IsFragment ( const TString )
static

◆ IsHierPart()

static Bool_t TUri::IsHierPart ( const TString )
static

◆ IsHost()

static Bool_t TUri::IsHost ( const TString )
static

◆ IsIpv4()

static Bool_t TUri::IsIpv4 ( const TString )
static

◆ IsPath()

static Bool_t TUri::IsPath ( const TString )
static

◆ IsPathAbempty()

static Bool_t TUri::IsPathAbempty ( const TString )
static

◆ IsPathAbsolute()

static Bool_t TUri::IsPathAbsolute ( const TString )
static

◆ IsPathEmpty()

static Bool_t TUri::IsPathEmpty ( const TString )
static

◆ IsPathNoscheme()

static Bool_t TUri::IsPathNoscheme ( const TString )
static

◆ IsPathRootless()

static Bool_t TUri::IsPathRootless ( const TString )
static

◆ IsPort()

static Bool_t TUri::IsPort ( const TString )
static

◆ IsQuery()

static Bool_t TUri::IsQuery ( const TString )
static

◆ IsReference()

Bool_t TUri::IsReference ( ) const

Returns kTRUE if instance qualifies as URI-reference URI-reference = URI / relative-ref cf.

Appendix A.

Definition at line 237 of file TUri.cxx.

◆ IsRegName()

static Bool_t TUri::IsRegName ( const TString )
static

◆ IsRelative()

Bool_t TUri::IsRelative ( ) const

Returns kTRUE if instance qualifies as relative-ref relative-ref = relative-part [ "?" query ] [ "#" fragment ] cf.

Appendix A.

Definition at line 217 of file TUri.cxx.

◆ IsRelativePart()

static Bool_t TUri::IsRelativePart ( const TString )
static

◆ IsScheme()

Bool_t TUri::IsScheme ( const TString string)
static

Returns kTRUE if string qualifies as URI scheme:

scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
#define DIGIT(x)
Definition: XrdProofdAux.h:349

Definition at line 270 of file TUri.cxx.

◆ IsSortable()

Bool_t TUri::IsSortable ( ) const
inlinevirtual

Reimplemented from TObject.

Definition at line 116 of file TUri.h.

◆ IsUnreserved()

static Bool_t TUri::IsUnreserved ( const TString string)
static

◆ IsUri()

Bool_t TUri::IsUri ( ) const

Returns kTRUE if instance qualifies as URI URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] cf.

Appendix A.

Definition at line 227 of file TUri.cxx.

◆ IsUserInfo()

static Bool_t TUri::IsUserInfo ( const TString )
static

◆ MergePaths()

static const TString TUri::MergePaths ( const TUri reference,
const TUri base 
)
static

◆ Normalise()

void TUri::Normalise ( )

◆ operator=()

TUri & TUri::operator= ( const TUri rhs)

TUri assignment operator.

Definition at line 89 of file TUri.cxx.

◆ PctDecode()

static const TString TUri::PctDecode ( const TString source)
static

◆ PctDecodeUnreserved()

static const TString TUri::PctDecodeUnreserved ( const TString source)
static

◆ PctEncode()

static const TString TUri::PctEncode ( const TString source)
static

◆ PctNormalise()

static const TString TUri::PctNormalise ( const TString source)
static

◆ Print()

void TUri::Print ( Option_t option = "") const
virtual

This method must be overridden when a class wants to print itself.

Reimplemented from TObject.

◆ RemoveDotSegments()

const TString TUri::RemoveDotSegments ( const TString inp)
static

This functions implements the "remove_dot_segments" routine of chapter 5.2.4 "for interpreting and removing the special '.

' and '..' complete path segments from a referenced path".

Definition at line 159 of file TUri.cxx.

◆ Reset()

void TUri::Reset ( )

◆ SetAuthority()

Bool_t TUri::SetAuthority ( const TString authority)

◆ SetFragment()

Bool_t TUri::SetFragment ( const TString fragment)

◆ SetHierPart()

Bool_t TUri::SetHierPart ( const TString hier)

◆ SetHost()

Bool_t TUri::SetHost ( const TString host)

◆ SetPath()

Bool_t TUri::SetPath ( const TString path)

◆ SetPort()

Bool_t TUri::SetPort ( const TString port)

◆ SetQuery()

Bool_t TUri::SetQuery ( const TString path)

◆ SetRelativePart()

Bool_t TUri::SetRelativePart ( const TString )

◆ SetScheme()

Bool_t TUri::SetScheme ( const TString scheme)

Set scheme component of URI:

scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

Definition at line 248 of file TUri.cxx.

◆ SetUri()

Bool_t TUri::SetUri ( const TString uri)

◆ SetUserInfo()

Bool_t TUri::SetUserInfo ( const TString userinfo)

◆ Transform()

static TUri TUri::Transform ( const TUri reference,
const TUri base 
)
static

Friends And Related Function Documentation

◆ operator==

Bool_t operator== ( const TUri u1,
const TUri u2 
)
friend

Implementation of a TUri Equivalence operator that uses syntax-based normalisation see chapter 6.2.2.

Definition at line 116 of file TUri.cxx.

Member Data Documentation

◆ fFragment

TString TUri::fFragment
private

Definition at line 61 of file TUri.h.

◆ fHasFragment

Bool_t TUri::fHasFragment
private

Definition at line 69 of file TUri.h.

◆ fHasHost

Bool_t TUri::fHasHost
private

Definition at line 65 of file TUri.h.

◆ fHasPath

Bool_t TUri::fHasPath
private

Definition at line 67 of file TUri.h.

◆ fHasPort

Bool_t TUri::fHasPort
private

Definition at line 66 of file TUri.h.

◆ fHasQuery

Bool_t TUri::fHasQuery
private

Definition at line 68 of file TUri.h.

◆ fHasScheme

Bool_t TUri::fHasScheme
private

Definition at line 63 of file TUri.h.

◆ fHasUserinfo

Bool_t TUri::fHasUserinfo
private

Definition at line 64 of file TUri.h.

◆ fHost

TString TUri::fHost
private

Definition at line 57 of file TUri.h.

◆ fPath

TString TUri::fPath
private

Definition at line 59 of file TUri.h.

◆ fPort

TString TUri::fPort
private

Definition at line 58 of file TUri.h.

◆ fQuery

TString TUri::fQuery
private

Definition at line 60 of file TUri.h.

◆ fScheme

TString TUri::fScheme
private

Definition at line 55 of file TUri.h.

◆ fUserinfo

TString TUri::fUserinfo
private

Definition at line 56 of file TUri.h.

Libraries for TUri:
[legend]

The documentation for this class was generated from the following files: