XRootD
BL_Grip Class Reference
+ Collaboration diagram for BL_Grip:

Public Member Functions

 BL_Grip ()
 
 ~BL_Grip ()
 
void Add (XrdOucTList *tP)
 
XrdOucTList ** Array (int &anum)
 
int Count ()
 
XrdOucTListExport ()
 
bool Include (const char *item, int &i)
 

Detailed Description

Definition at line 58 of file XrdCmsBlackList.cc.

Constructor & Destructor Documentation

◆ BL_Grip()

BL_Grip::BL_Grip ( )
inline

Definition at line 97 of file XrdCmsBlackList.cc.

97 : first(0), last(0) {}

◆ ~BL_Grip()

BL_Grip::~BL_Grip ( )
inline

Definition at line 99 of file XrdCmsBlackList.cc.

99  {XrdOucTList *tP;
100  while((tP = first)) {first = tP->next; delete tP;}
101  last = 0;
102  }
XrdOucTList * next
Definition: XrdOucTList.hh:45

References XrdOucTList::next.

Member Function Documentation

◆ Add()

void BL_Grip::Add ( XrdOucTList tP)
inline

Definition at line 60 of file XrdCmsBlackList.cc.

61  {if (last) last->next = tP;
62  else first = tP;
63  last = tP;
64  }

References XrdOucTList::next.

Referenced by Include().

+ Here is the caller graph for this function:

◆ Array()

XrdOucTList** BL_Grip::Array ( int &  anum)
inline

Definition at line 66 of file XrdCmsBlackList.cc.

67  {XrdOucTList *tP = first;
68  anum = Count();
69  if (!anum) return 0;
70  XrdOucTList **vec = new XrdOucTList *[anum];
71  for (int i = 0; i < anum; i++) {vec[i] = tP; tP = tP->next;}
72  first = last = 0;
73  return vec;
74  }

References Count(), and XrdOucTList::next.

+ Here is the call graph for this function:

◆ Count()

int BL_Grip::Count ( )
inline

Definition at line 76 of file XrdCmsBlackList.cc.

77  {XrdOucTList *tP = first;
78  int n = 0;
79  while(tP) {tP=tP->next; n++;}
80  return n;
81  }

References XrdOucTList::next.

Referenced by Array().

+ Here is the caller graph for this function:

◆ Export()

XrdOucTList* BL_Grip::Export ( )
inline

Definition at line 83 of file XrdCmsBlackList.cc.

84  {XrdOucTList *tP = first;
85  first = last = 0;
86  return tP;
87  }

◆ Include()

bool BL_Grip::Include ( const char *  item,
int &  i 
)
inline

Definition at line 89 of file XrdCmsBlackList.cc.

90  {XrdOucTList *tP = first;
91  i = 0;
92  while(tP && strcmp(item,tP->text)) {tP=tP->next; i++;}
93  if (!tP) {Add(new XrdOucTList(item)); return false;}
94  return true;
95  }
void Add(XrdOucTList *tP)
char * text
Definition: XrdOucTList.hh:46

References Add(), XrdOucTList::next, and XrdOucTList::text.

+ Here is the call graph for this function:

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