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

`#include <XrdOucHash.hh>`

Collaboration diagram for XrdOucHash_Item< T >:

## Public Member Functions

| XrdOucHash_Item (unsigned long KeyHash, const char *KeyVal, T *KeyData, time_t KeyTime, XrdOucHash_Item< T > *KeyNext, XrdOucHash_Options KeyOpts)
| ~XrdOucHash_Item ()
int | Count ()
T * | Data ()
unsigned long | Hash ()
const char * | Key ()
XrdOucHash_Item< T > * | Next ()
int | Same (const unsigned long KeyHash, const char *KeyVal)
void | SetNext (XrdOucHash_Item< T > *item)
time_t | Time ()
void | Update (int newcount, time_t newtime)

## Detailed Description

template<class T>
class XrdOucHash_Item< T >

Definition at line 61 of file XrdOucHash.hh.

## Constructor & Destructor Documentation

## XrdOucHash_Item()

template<class T>

XrdOucHash_Item< T >::XrdOucHash_Item | ( | unsigned long | KeyHash,
|  | const char * | KeyVal,
|  | T * | KeyData,
|  | time_t | KeyTime,
|  | XrdOucHash_Item< T > * | KeyNext,
|  | XrdOucHash_Options | KeyOpts )

inline

Definition at line 86 of file XrdOucHash.hh.

{keyhash = KeyHash;
if (KeyOpts & Hash_keep) keyval = KeyVal;
else keyval = strdup(KeyVal);
if (KeyOpts & Hash_data_is_key) keydata = (T *)keyval;
else keydata = KeyData;
keytime = KeyTime;
entopts = KeyOpts;
next = KeyNext;
keycount= 0;
}
XrdOucHash_Item
Definition XrdOucHash.hh:62

References XrdOucHash_Item(), Hash_data_is_key, and Hash_keep.

Referenced by XrdOucHash_Item(), Next(), and SetNext().

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

## ~XrdOucHash_Item()

template<class T>

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

inline

Definition at line 103 of file XrdOucHash.hh.

{if (!(entopts & Hash_keep))
{if (keydata && keydata != (T *)keyval
&& !(entopts & Hash_keepdata))
{if (entopts & Hash_dofree) free(keydata);
else delete keydata;
}
if (keyval) free((void *)keyval);
}
keydata = 0; keyval = 0; keycount = 0;
}

References Hash_dofree, Hash_keep, and Hash_keepdata.

## Member Function Documentation

## Count()

template<class T>

int XrdOucHash_Item< T >::Count | ( |  | ) |

inline

Definition at line 64 of file XrdOucHash.hh.

{return keycount;}

Referenced by XrdOucHash< T >::Add().

Here is the caller graph for this function:

## Data()

template<class T>

T * XrdOucHash_Item< T >::Data | ( |  | ) |

inline

Definition at line 66 of file XrdOucHash.hh.

{return keydata;}

Referenced by XrdOucHash< T >::Add(), and XrdOucHash< T >::Apply().

Here is the caller graph for this function:

## Hash()

template<class T>

unsigned long XrdOucHash_Item< T >::Hash | ( |  | ) |

inline

Definition at line 68 of file XrdOucHash.hh.

{return keyhash;}

## Key()

template<class T>

const char * XrdOucHash_Item< T >::Key | ( |  | ) |

inline

Definition at line 70 of file XrdOucHash.hh.

{return keyval;}

Referenced by XrdOucHash< T >::Apply().

Here is the caller graph for this function:

## Next()

template<class T>

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

inline

Definition at line 72 of file XrdOucHash.hh.

{return next;}

References XrdOucHash_Item().

Referenced by XrdOucHash< T >::Apply(), and XrdOucHash< T >::Purge().

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

## Same()

template<class T>

int XrdOucHash_Item< T >::Same | ( | const unsigned long | KeyHash,
|  | const char * | KeyVal )

inline

Definition at line 81 of file XrdOucHash.hh.

{return keyhash == KeyHash && !strcmp(keyval, KeyVal);}

## SetNext()

template<class T>

void XrdOucHash_Item< T >::SetNext | ( | XrdOucHash_Item< T > * | item | ) |

inline

Definition at line 84 of file XrdOucHash.hh.

{next = item;}

References XrdOucHash_Item().

Referenced by XrdOucHash< T >::Apply().

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

## Time()

template<class T>

time_t XrdOucHash_Item< T >::Time | ( |  | ) |

inline

Definition at line 74 of file XrdOucHash.hh.

{return keytime;}

Referenced by XrdOucHash< T >::Add(), and XrdOucHash< T >::Apply().

Here is the caller graph for this function:

## Update()

template<class T>

void XrdOucHash_Item< T >::Update | ( | int | newcount,
|  | time_t | newtime )

inline

Definition at line 76 of file XrdOucHash.hh.

{keycount = newcount;
if (newtime) keytime = newtime;
}

Referenced by XrdOucHash< T >::Add().

Here is the caller graph for this function:

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

- XrdOucHash.hh