xrootd
XrdCnsXref.hh
Go to the documentation of this file.
1 #ifndef __XRDCnsXref_H_
2 #define __XRDCnsXref_H_
3 /******************************************************************************/
4 /* */
5 /* X r d C n s X r e f . h h */
6 /* */
7 /* (c) 2009 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include "XrdOuc/XrdOucHash.hh"
16 #include "XrdSys/XrdSysPthread.hh"
17 
19 {
20 public:
21 
22 
23 char Add(const char *Key, char xref=0);
24 
25 char *Apply(int (*func)(const char *, char *, void *), void *Arg)
26  {return xTable.Apply(func, Arg);}
27 
28 char Default(const char *Dflt=0);
29 
30 char *Key (char xref);
31 
32 char Find(const char *xref);
33 
34  XrdCnsXref(const char *Dflt=0, int MTProt=1);
35  ~XrdCnsXref();
36 
37 private:
38 
39 int availI();
40 int c2i(char xCode);
43 static char *xIndex;
44 
45 static const int yTSize = '~'-'0'+1;
46 char *yTable[yTSize];
48 int isMT;
49 };
50 #endif