XRootD
XrdXrootdXPath Class Reference

#include <XrdXrootdXPath.hh>

+ Collaboration diagram for XrdXrootdXPath:

Public Member Functions

 XrdXrootdXPath (const char *pathdata="", int popt=0, int flags=XROOTDXP_OK)
 
 ~XrdXrootdXPath ()
 
void Insert (const char *pd, int popt=0, int flags=XROOTDXP_OK)
 
XrdXrootdXPathNext ()
 
int Opts ()
 
char * Path ()
 
char * Path (int &PLen)
 
void Set (int opts, const char *pathdata=0)
 
int Validate (const char *pd, const int pl=0)
 

Detailed Description

Definition at line 42 of file XrdXrootdXPath.hh.

Constructor & Destructor Documentation

◆ XrdXrootdXPath()

XrdXrootdXPath::XrdXrootdXPath ( const char *  pathdata = "",
int  popt = 0,
int  flags = XROOTDXP_OK 
)
inline

Definition at line 86 of file XrdXrootdXPath.hh.

87  {next = 0;
88  pathopt = popt | flags;
89  pathlen = strlen(pathdata);
90  path = strdup(pathdata);
91  }

Referenced by Insert().

+ Here is the caller graph for this function:

◆ ~XrdXrootdXPath()

XrdXrootdXPath::~XrdXrootdXPath ( )
inline

Definition at line 93 of file XrdXrootdXPath.hh.

93 {if (path) free(path);}

Member Function Documentation

◆ Insert()

void XrdXrootdXPath::Insert ( const char *  pd,
int  popt = 0,
int  flags = XROOTDXP_OK 
)
inline

Definition at line 60 of file XrdXrootdXPath.hh.

61  {XrdXrootdXPath *pp = 0, *p = next;
62  XrdXrootdXPath *newp = new XrdXrootdXPath(pd,popt,flags);
63  if (popt & ~XROOTDXP_OK)
64  {while(p && newp->pathlen < p->pathlen)
65  {pp = p; p = p->next;}
66  } else {
67  while(p && newp->pathlen >= p->pathlen)
68  {pp = p; p = p->next;}
69  }
70  newp->next = p;
71  if (pp) pp->next = newp;
72  else next = newp;
73  }
#define XROOTDXP_OK
XrdXrootdXPath(const char *pathdata="", int popt=0, int flags=XROOTDXP_OK)

References XrdXrootdXPath(), and XROOTDXP_OK.

Referenced by XrdXrootdProtocol::Configure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Next()

XrdXrootdXPath* XrdXrootdXPath::Next ( )
inline

Definition at line 46 of file XrdXrootdXPath.hh.

46 {return next;}

Referenced by XrdXrootdProtocol::Configure().

+ Here is the caller graph for this function:

◆ Opts()

int XrdXrootdXPath::Opts ( )
inline

Definition at line 47 of file XrdXrootdXPath.hh.

47 {return pathopt;}

Referenced by XrdXrootdProtocol::Configure().

+ Here is the caller graph for this function:

◆ Path() [1/2]

char* XrdXrootdXPath::Path ( )
inline

Definition at line 48 of file XrdXrootdXPath.hh.

48 {return path;}

Referenced by XrdXrootdProtocol::Configure().

+ Here is the caller graph for this function:

◆ Path() [2/2]

char* XrdXrootdXPath::Path ( int &  PLen)
inline

Definition at line 49 of file XrdXrootdXPath.hh.

50  {PLen = pathlen; return path;}

◆ Set()

void XrdXrootdXPath::Set ( int  opts,
const char *  pathdata = 0 
)
inline

Definition at line 51 of file XrdXrootdXPath.hh.

52  {pathopt = opts;
53  if (pathdata)
54  {if (path) free(path);
55  pathlen = strlen(pathdata);
56  path = strdup(pathdata);
57  }
58  }
struct myOpts opts

References opts.

◆ Validate()

int XrdXrootdXPath::Validate ( const char *  pd,
const int  pl = 0 
)
inline

Definition at line 75 of file XrdXrootdXPath.hh.

76  {int plen = (pl ? pl : strlen(pd));
77  XrdXrootdXPath *p = next;
78  while(p && plen >= p->pathlen)
79  {if (!strncmp(pd, p->path, p->pathlen))
80  return p->pathopt;
81  p=p->next;
82  }
83  return 0;
84  }

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