Loading...
Searching...
No Matches
XrdOucDLlist< T > Class Template Reference

`#include <XrdOucDLlist.hh>`

Collaboration diagram for XrdOucDLlist< T >:

## Public Member Functions

| XrdOucDLlist (T *itemval=0)
| ~XrdOucDLlist ()
T * | Apply (int(*func)(T *, void *), void *Arg, XrdOucDLlist *Start=0)
void | Insert (XrdOucDLlist *Node, T *Item=0)
T * | Item ()
XrdOucDLlist * | Next ()
XrdOucDLlist * | Prev ()
void | Remove ()
void | setItem (T *ival)
int | Singleton ()

## Detailed Description

template<class T>
class XrdOucDLlist< T >

Definition at line 35 of file XrdOucDLlist.hh.

## Constructor & Destructor Documentation

## XrdOucDLlist()

template<class T>

XrdOucDLlist< T >::XrdOucDLlist | ( | T * | itemval = 0 | ) |

inline

Definition at line 39 of file XrdOucDLlist.hh.

{prev=this; next=this; item=itemval;}
XrdOucDLlist
Definition XrdOucDLlist.hh:36

Referenced by Apply(), Insert(), Next(), and Prev().

Here is the caller graph for this function:

## ~XrdOucDLlist()

template<class T>

XrdOucDLlist< T >::~XrdOucDLlist | ( |  | ) |

inline

Definition at line 40 of file XrdOucDLlist.hh.

{if (prev != next) Remove();}
XrdOucDLlist::Remove
void Remove()
Definition XrdOucDLlist.hh:85

References Remove().

Here is the call graph for this function:

## Member Function Documentation

## Apply()

template<class T>

T * XrdOucDLlist< T >::Apply | ( | int(* | func )(T *, void *),
|  | void * | Arg,
|  | XrdOucDLlist< T > * | Start = 0 )

inline

Definition at line 50 of file XrdOucDLlist.hh.

{XrdOucDLlist *nextnode, *node;
if (Start) node = Start; // Set correct starting point
else node = this;
// Iterate through the list until we hit ourselves again. We do the
// loop once on the current node to allow for anchorless lists.
//
do {nextnode = node->next;
if (node->item && (*func)(node->item, Arg)) return node->item;
node = nextnode;
} while (node != this);
// All done, indicate we went through the whole list
//
return (T *)0;
}
XrdOucDLlist::XrdOucDLlist
XrdOucDLlist(T *itemval=0)
Definition XrdOucDLlist.hh:39

References XrdOucDLlist().

Here is the call graph for this function:

## Insert()

template<class T>

void XrdOucDLlist< T >::Insert | ( | XrdOucDLlist< T > * | Node,
|  | T * | Item = 0 )

inline

Definition at line 71 of file XrdOucDLlist.hh.

{Node->next = next; // Chain in the item;
next->prev = Node;
next = Node;
Node->prev = this;
if (Item) Node->item = Item;
}
XrdOucDLlist::Item
T * Item()
Definition XrdOucDLlist.hh:81

References XrdOucDLlist(), and Item().

Referenced by XrdOssSys::Stage_RT().

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

## Item()

template<class T>

T * XrdOucDLlist< T >::Item | ( |  | ) |

inline

Definition at line 81 of file XrdOucDLlist.hh.

{return item;}

Referenced by XrdOssSys::CalcTime(), Insert(), and XrdOssSys::Stage_In().

Here is the caller graph for this function:

## Next()

template<class T>

XrdOucDLlist * XrdOucDLlist< T >::Next | ( |  | ) |

inline

Definition at line 94 of file XrdOucDLlist.hh.

{return next;}

References XrdOucDLlist().

Referenced by XrdOssSys::CalcTime().

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

## Prev()

template<class T>

XrdOucDLlist * XrdOucDLlist< T >::Prev | ( |  | ) |

inline

Definition at line 98 of file XrdOucDLlist.hh.

{return prev;}

References XrdOucDLlist().

Here is the call graph for this function:

## Remove()

template<class T>

void XrdOucDLlist< T >::Remove | ( |  | ) |

inline

Definition at line 85 of file XrdOucDLlist.hh.

{prev->next = next; // Unchain the item
next->prev = prev;
next = this;
prev = this;
}

Referenced by ~XrdOucDLlist(), XrdCmsRRQ::Ready(), XrdCmsRRQ::Respond(), XrdOssSys::Stage_In(), and XrdCmsRRQ::TimeOut().

Here is the caller graph for this function:

## setItem()

template<class T>

void XrdOucDLlist< T >::setItem | ( | T * | ival | ) |

inline

Definition at line 102 of file XrdOucDLlist.hh.

{item = ival;}

## Singleton()

template<class T>

int XrdOucDLlist< T >::Singleton | ( |  | ) |

inline

Definition at line 106 of file XrdOucDLlist.hh.

{return next == this;}

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

- XrdOucDLlist.hh