Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TUri Class Reference

This class represents a RFC 3986 compatible URI.

See also
https://doi.org/10.17487/RFC3986 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.
 
 TUri (const TString &uri)
 Constructor that calls SetUri with a complete URI.
 
 TUri (const TUri &uri)
 TUri copy ctor.
 
virtual ~TUri ()
 
const TString GetAuthority () const
 Returns the authority part of the instance:
 
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
 relative-part = "//" authority path-abempty
 
const TString GetScheme () const
 
const TString GetUri () const
 Returns the whole URI - an implementation of chapter 5.3 component recomposition.
 
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
 
TClassIsA () const override
 
Bool_t IsAbsolute () const
 Returns kTRUE if instance qualifies as absolute-URI absolute-URI = scheme ":" hier-part [ "?" query ] cf.
 
Bool_t IsReference () const
 Returns kTRUE if instance qualifies as URI-reference URI-reference = URI / relative-ref cf.
 
Bool_t IsRelative () const
 Returns kTRUE if instance qualifies as relative-ref relative-ref = relative-part [ "?" query ] [ "#" fragment ] cf.
 
Bool_t IsSortable () const override
 
Bool_t IsUri () const
 Returns kTRUE if instance qualifies as URI URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] cf.
 
void Normalise ()
 Syntax based normalisation according to RFC chapter 6.2.2.
 
TUrioperator= (const TUri &rhs)
 TUri assignment operator.
 
void Print (Option_t *option="") const override
 Display function,.
 
void Reset ()
 Initialize this URI object.
 
Bool_t SetAuthority (const TString &authority)
 Set authority part of URI:
 
Bool_t SetFragment (const TString &fragment)
 Set fragment component of URI:
 
Bool_t SetHierPart (const TString &hier)
 returns hier-part component of URI
 
Bool_t SetHost (const TString &host)
 Set host component of URI:
 
Bool_t SetPath (const TString &path)
 Set path component of URI:
 
Bool_t SetPort (const TString &port)
 Set port component of URI:
 
Bool_t SetQuery (const TString &path)
 Set query component of URI:
 
Bool_t SetRelativePart (const TString &)
 Returns kTRUE is string qualifies as relative-part:
 
Bool_t SetScheme (const TString &scheme)
 Set scheme component of URI:
 
Bool_t SetUri (const TString &uri)
 Parse URI and set the member variables accordingly, returns kTRUE if URI validates, and kFALSE otherwise:
 
Bool_t SetUserInfo (const TString &userinfo)
 Set userinfo component of URI:
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
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.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
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.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () 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.
 
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).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
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.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Bool_t IsAuthority (const TString &)
 Returns kTRUE if string qualifies as valid URI authority:
 
static Bool_t IsFragment (const TString &)
 Returns kTRUE if string qualifies as valid fragment component.
 
static Bool_t IsHierPart (const TString &)
 Returns kTRUE if string qualifies as hier-part:
 
static Bool_t IsHost (const TString &)
 Returns kTRUE if string qualifies as valid host component: host = IP-literal / IPv4address / reg-name implemented: host = IPv4address / reg-name.
 
static Bool_t IsIpv4 (const TString &)
 Returns kTRUE, if string holds a valid IPv4 address currently only decimal variant supported.
 
static Bool_t IsPath (const TString &)
 Returns kTRUE if string qualifies as valid path component:
 
static Bool_t IsPathAbempty (const TString &)
 Returns kTRUE if string qualifies as valid path-abempty component:
 
static Bool_t IsPathAbsolute (const TString &)
 Returns kTRUE if string qualifies as valid path-absolute component.
 
static Bool_t IsPathEmpty (const TString &)
 Returns kTRUE if string qualifies as valid path-empty component:
 
static Bool_t IsPathNoscheme (const TString &)
 Returns kTRUE if string qualifies as valid path-noscheme component:
 
static Bool_t IsPathRootless (const TString &)
 Returns kTRUE if string qualifies as valid path-rootless component:
 
static Bool_t IsPort (const TString &)
 Returns kTRUE if string qualifies as valid port component:
 
static Bool_t IsQuery (const TString &)
 Returns kTRUE if string qualifies as URI query:
 
static Bool_t IsRegName (const TString &)
 Returns kTRUE if string qualifies as valid reg-name:
 
static Bool_t IsRelativePart (const TString &)
 Returns kTRUE is string qualifies as relative-part:
 
static Bool_t IsScheme (const TString &)
 Returns kTRUE if string qualifies as URI scheme:
 
static Bool_t IsUnreserved (const TString &string)
 Returns kTRUE, if the given string does not contain RFC 3986 reserved characters.
 
static Bool_t IsUserInfo (const TString &)
 Return kTRUE is string qualifies as valid URI userinfo:
 
static const TString MergePaths (const TUri &reference, const TUri &base)
 RFC 3986, 5.3.2.
 
static const TString PctDecode (const TString &source)
 Percent-decode the given string according to chapter 2.1 we assume a valid pct-encoded string.
 
static const TString PctDecodeUnreserved (const TString &source)
 Percent-decode the given string according to chapter 2.1 we assume a valid pct-encoded string.
 
static const TString PctEncode (const TString &source)
 Percent-encode and return the given string according to RFC 3986 in principle, this function cannot fail or produce an error.
 
static const TString PctNormalise (const TString &source)
 Normalise the percent-encoded parts of the string i.e.
 
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 '.
 
static TUri Transform (const TUri &reference, const TUri &base)
 Transform a URI reference into its target URI using given a base URI.
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

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.
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- 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).
 
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

◆ Class()

static TClass * TUri::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TUri::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TUri::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 157 of file TUri.h.

◆ DeclFileName()

static const char * TUri::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 157 of file TUri.h.

◆ GetAuthority()

const TString TUri::GetAuthority ( ) const

Returns the authority part of the instance:

authority = [ userinfo "@" ] host [ ":" port ]

Definition at line 283 of file TUri.cxx.

◆ GetFragment()

const TString TUri::GetFragment ( ) const
inline

Definition at line 89 of file TUri.h.

◆ GetHierPart()

const TString TUri::GetHierPart ( ) const
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

Definition at line 660 of file TUri.cxx.

◆ 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

relative-part = "//" authority path-abempty

/ path-absolute
/ path-noscheme
/ path-empty

Definition at line 676 of file TUri.cxx.

◆ 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.

◆ IsA()

TClass * TUri::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 157 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()

Bool_t TUri::IsAuthority ( const TString string)
static

Returns kTRUE if string qualifies as valid URI authority:

authority = [ userinfo "@" ] host [ ":" port ]

Definition at line 383 of file TUri.cxx.

◆ IsFragment()

Bool_t TUri::IsFragment ( const TString string)
static

Returns kTRUE if string qualifies as valid fragment component.

fragment = *( pchar / "/" / "?" )

Definition at line 516 of file TUri.cxx.

◆ IsHierPart()

Bool_t TUri::IsHierPart ( const TString string)
static

Returns kTRUE if string qualifies as hier-part:

hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

Definition at line 743 of file TUri.cxx.

◆ IsHost()

Bool_t TUri::IsHost ( const TString string)
static

Returns kTRUE if string qualifies as valid host component: host = IP-literal / IPv4address / reg-name implemented: host = IPv4address / reg-name.

Definition at line 839 of file TUri.cxx.

◆ IsIpv4()

Bool_t TUri::IsIpv4 ( const TString string)
static

Returns kTRUE, if string holds a valid IPv4 address currently only decimal variant supported.

Existence of leading 0s or numeric range remains unchecked IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet.

Definition at line 962 of file TUri.cxx.

◆ IsPath()

Bool_t TUri::IsPath ( const TString string)
static

Returns kTRUE if string qualifies as valid path component:

path = path-abempty ; begins with "/" or is empty
/ path-absolute ; begins with "/" but not "//"
/ path-noscheme ; begins with a non-colon segment
/ path-rootless ; begins with a segment
/ path-empty ; zero characters
#define a(i)
Definition RSha256.hxx:99

Definition at line 854 of file TUri.cxx.

◆ IsPathAbempty()

Bool_t TUri::IsPathAbempty ( const TString string)
static

Returns kTRUE if string qualifies as valid path-abempty component:

path-abempty = *( "/" segment )
segment = *pchar

Definition at line 870 of file TUri.cxx.

◆ IsPathAbsolute()

Bool_t TUri::IsPathAbsolute ( const TString string)
static

Returns kTRUE if string qualifies as valid path-absolute component.

path-absolute = "/" [ segment-nz *( "/" segment ) ]
segment-nz = 1*pchar
segment = *pchar

Definition at line 885 of file TUri.cxx.

◆ IsPathEmpty()

Bool_t TUri::IsPathEmpty ( const TString string)
static

Returns kTRUE if string qualifies as valid path-empty component:

path-empty = 0<pchar>

Definition at line 926 of file TUri.cxx.

◆ IsPathNoscheme()

Bool_t TUri::IsPathNoscheme ( const TString string)
static

Returns kTRUE if string qualifies as valid path-noscheme component:

path-noscheme = segment-nz-nc *( "/" segment )
segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
segment = *pchar

Definition at line 900 of file TUri.cxx.

◆ IsPathRootless()

Bool_t TUri::IsPathRootless ( const TString string)
static

Returns kTRUE if string qualifies as valid path-rootless component:

path-rootless = segment-nz *( "/" segment )

Definition at line 913 of file TUri.cxx.

◆ IsPort()

Bool_t TUri::IsPort ( const TString string)
static

Returns kTRUE if string qualifies as valid port component:

RFC 3986: port = *DIGIT

Definition at line 937 of file TUri.cxx.

◆ IsQuery()

Bool_t TUri::IsQuery ( const TString string)
static

Returns kTRUE if string qualifies as URI query:

query = *( pchar / "/" / "?" )

Definition at line 320 of file TUri.cxx.

◆ 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()

Bool_t TUri::IsRegName ( const TString string)
static

Returns kTRUE if string qualifies as valid reg-name:

reg-name = *( unreserved / pct-encoded / sub-delims )
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void reg
char name[80]
Definition TGX11.cxx:110

Definition at line 950 of file TUri.cxx.

◆ 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()

Bool_t TUri::IsRelativePart ( const TString string)
static

Returns kTRUE is string qualifies as relative-part:

relative-part = "//" authority path-abempty
/ path-absolute
/ path-noscheme
/ path-empty

Definition at line 760 of file TUri.cxx.

◆ IsScheme()

Bool_t TUri::IsScheme ( const TString string)
static

Returns kTRUE if string qualifies as URI scheme:

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

Definition at line 270 of file TUri.cxx.

◆ IsSortable()

Bool_t TUri::IsSortable ( ) const
inlineoverridevirtual

Reimplemented from TObject.

Definition at line 116 of file TUri.h.

◆ IsUnreserved()

Bool_t TUri::IsUnreserved ( const TString string)
static

Returns kTRUE, if the given string does not contain RFC 3986 reserved characters.

unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

Definition at line 975 of file TUri.cxx.

◆ 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()

Bool_t TUri::IsUserInfo ( const TString string)
static

Return kTRUE is string qualifies as valid URI userinfo:

userinfo = *( unreserved / pct-encoded / sub-delims / ":" )

this equals to pchar without the '@' character

Definition at line 428 of file TUri.cxx.

◆ MergePaths()

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

RFC 3986, 5.3.2.

If the base URI has a defined authority component and an empty path, then return a string consisting of "/" concatenated with the reference's path; otherwise, return a string consisting of the reference's path component appended to all but the last segment of the base URI's path (i.e., excluding any characters after the right-most "/" in the base URI path, or excluding the entire base URI path if it does not contain any "/" characters).

Definition at line 1180 of file TUri.cxx.

◆ Normalise()

void TUri::Normalise ( )

Syntax based normalisation according to RFC chapter 6.2.2.

Definition at line 985 of file TUri.cxx.

◆ operator=()

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

TUri assignment operator.

Definition at line 89 of file TUri.cxx.

◆ PctDecode()

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

Percent-decode the given string according to chapter 2.1 we assume a valid pct-encoded string.

Definition at line 1086 of file TUri.cxx.

◆ PctDecodeUnreserved()

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

Percent-decode the given string according to chapter 2.1 we assume a valid pct-encoded string.

Definition at line 1012 of file TUri.cxx.

◆ PctEncode()

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

Percent-encode and return the given string according to RFC 3986 in principle, this function cannot fail or produce an error.

Definition at line 815 of file TUri.cxx.

◆ PctNormalise()

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

Normalise the percent-encoded parts of the string i.e.

uppercase the hexadecimal digits %[:alpha:][:alpha:] -> %[:ALPHA:][:ALPHA:]

Definition at line 1057 of file TUri.cxx.

◆ Print()

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

Display function,.

  • option "d" .. debug output
  • anything else .. simply print URI.

Reimplemented from TObject.

Definition at line 528 of file TUri.cxx.

◆ 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 ( )

Initialize this URI object.

Set all TString members to empty string, set all Bool_t members to kFALSE.

Definition at line 571 of file TUri.cxx.

◆ SetAuthority()

Bool_t TUri::SetAuthority ( const TString authority)

Set authority part of URI:

authority = [ userinfo "@" ] host [ ":" port ]

Split into components {userinfo@, host, :port}, remember that according to the RFC, it is necessary to distinguish between missing component (no delimiter) and empty component (delimiter present).

Definition at line 338 of file TUri.cxx.

◆ SetFragment()

Bool_t TUri::SetFragment ( const TString fragment)

Set fragment component of URI:

fragment = *( pchar / "/" / "?" )

Definition at line 498 of file TUri.cxx.

◆ SetHierPart()

Bool_t TUri::SetHierPart ( const TString hier)

returns hier-part component of URI

hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

Definition at line 693 of file TUri.cxx.

◆ SetHost()

Bool_t TUri::SetHost ( const TString host)

Set host component of URI:

RFC 3986: host = IP-literal / IPv4address / reg-name
implemented: host = IPv4address / reg-name

Definition at line 442 of file TUri.cxx.

◆ SetPath()

Bool_t TUri::SetPath ( const TString path)

Set path component of URI:

path = path-abempty ; begins with "/" or is empty
/ path-absolute ; begins with "/" but not "//"
/ path-noscheme ; begins with a non-colon segment
/ path-rootless ; begins with a segment
/ path-empty ; zero characters

Definition at line 481 of file TUri.cxx.

◆ SetPort()

Bool_t TUri::SetPort ( const TString port)

Set port component of URI:

port = *DIGIT

Definition at line 460 of file TUri.cxx.

◆ SetQuery()

Bool_t TUri::SetQuery ( const TString query)

Set query component of URI:

query = *( pchar / "/" / "?" )

Definition at line 298 of file TUri.cxx.

◆ SetRelativePart()

Bool_t TUri::SetRelativePart ( const TString relative)

Returns kTRUE is string qualifies as relative-part:

relative-part = "//" authority path-abempty
/ path-absolute
/ path-noscheme
/ path-empty

Definition at line 777 of file TUri.cxx.

◆ 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)

Parse URI and set the member variables accordingly, returns kTRUE if URI validates, and kFALSE otherwise:

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

Definition at line 601 of file TUri.cxx.

◆ SetUserInfo()

Bool_t TUri::SetUserInfo ( const TString userinfo)

Set userinfo component of URI:

userinfo = *( unreserved / pct-encoded / sub-delims / ":" )

Definition at line 405 of file TUri.cxx.

◆ Streamer()

void TUri::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TObject.

◆ StreamerNVirtual()

void TUri::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 157 of file TUri.h.

◆ Transform()

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

Transform a URI reference into its target URI using given a base URI.

This is an implementation of the pseudocode in chapter 5.2.2.

Definition at line 1122 of file TUri.cxx.

Friends And Related Symbol 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:

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