38#ifdef R__COMPLETE_MEM_TERMINATION
78#ifdef R__COMPLETE_MEM_TERMINATION
155 if (
s1.EndsWith(
"/-")) {
161 if (
s1(0) ==
'/' &&
s1(
l-1) ==
'/') {
189 if ((s =
strstr(
u,
":/")) &&
u+1 != s) {
191 Error(
"TUrl",
"%s malformed, URL must contain \"://\"", u0);
203 const std::size_t bufferSize = std::char_traits<char>::length(
"file:") +
strlen(u0) + 1;
204 char *
newu =
new char [bufferSize];
217 if ((s =
strchr(t,
'@')) && (
223 if (*(s-1) ==
'\\') {
277 if (!*s)
goto cleanup;
302 if (opt &&
anc && opt >
anc) {
307 if ((s = opt) || (s =
anc)) {
442 passwd.ReplaceAll(
"@",
"\\@");
554 if (
this == obj)
return 0;
578 static std::atomic_bool
usedEnv {
false };
611 if (
proto->String().IsNull()) {
644 if (
objTags->GetEntriesFast() == 2) {
664 if (!key)
return nullptr;
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
R__EXTERN TVirtualMutex * gROOTMutex
char * Strip(const char *str, char c=' ')
Strip leading and trailing c (blanks by default) from a string.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
This class represents an Internet Protocol (IP) address.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj) override
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
virtual void SetOwnerKeyValue(Bool_t ownkeys=kTRUE, Bool_t ownvals=kTRUE)
Set ownership for keys and values.
TObject * FindObject(const char *keyname) const override
Check if a (key,value) pair exists with keyname as name of the key.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
The TNamed class is the base class for all named ROOT classes.
Collectable string class.
const TString & GetString() const
Mother of all ROOT objects.
TObject & operator=(const TObject &rhs) noexcept
TObject assignment operator.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
This class represents a WWW compatible URL.
void CleanRelativePath()
Recompute the path removing all relative directory jumps via '..'.
static TObjArray * GetSpecialProtocols()
Read the list of special protocols from the rootrc files.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void FindFile(char *u, Bool_t stripDoubleSlash=kTRUE)
Find file and optionally anchor and options.
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
TString fFileOA
!file with option and anchor
const char * GetValueFromOptions(const char *key) const
Return a value for a given key from the URL options.
void SetUrl(const char *url, Bool_t defaultIsFile=kFALSE)
Parse url character string and split in its different subcomponents.
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
TUrl & operator=(const TUrl &rhs)
TUrl assignment operator.
Int_t GetIntValueFromOptions(const char *key) const
Return a value for a given key from the URL options as an Int_t, a missing key returns -1.
TMap * fOptionsMap
!map containing options key/value pairs
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
void Print(Option_t *option="") const override
Print URL on stdout.
static THashList * fgHostFQDNs
void ParseOptions() const
Parse URL options into a key/value map.
const char * GetOptions() const
TString fHostFQ
!fully qualified host name
Bool_t HasOption(const char *key) const
Returns true if the given key appears in the URL options list.
static TObjArray * fgSpecialProtocols
Int_t Compare(const TObject *obj) const override
Compare two urls as strings.