Data_Hash_Table Class Reference

#include <hash_table.h>

Collaboration diagram for Data_Hash_Table:

Collaboration graph
[legend]

Detailed Description

Definition at line 98 of file hash_table.h.

Public Member Functions

 Data_Hash_Table ()
Tcl_HashEntry * GetHash (int *attr)
void PutInHash (int *attr)
void reset ()

Data Fields

Tcl_HashTable htable


Constructor & Destructor Documentation

Data_Hash_Table::Data_Hash_Table  )  [inline]
 

Definition at line 102 of file hash_table.h.

References htable, and MAX_ATTRIBUTE.

00102                     {
00103     Tcl_InitHashTable(&htable, MAX_ATTRIBUTE);
00104   }


Member Function Documentation

Tcl_HashEntry * Data_Hash_Table::GetHash int *  attr  ) 
 

Definition at line 147 of file hash_table.cc.

References htable.

Referenced by God::CountNewData(), SinkAgent::recv(), and DiffusionRate::recv().

00148 {
00149   return Tcl_FindHashEntry(&htable, (char *)attr);
00150 }

void Data_Hash_Table::PutInHash int *  attr  ) 
 

Definition at line 153 of file hash_table.cc.

References htable.

Referenced by God::CountNewData(), SinkAgent::recv(), and DiffusionRate::recv().

00154 {
00155     int newPtr;
00156 
00157     Tcl_CreateHashEntry(&htable, (char *)attr, &newPtr);
00158 }

void Data_Hash_Table::reset  ) 
 

Definition at line 134 of file hash_table.cc.

References htable.

Referenced by DiffusionRate::reset().

00135 {
00136   Tcl_HashEntry *entryPtr;
00137   Tcl_HashSearch searchPtr;
00138 
00139   entryPtr = Tcl_FirstHashEntry(&htable, &searchPtr);
00140   while (entryPtr != NULL) {
00141     Tcl_DeleteHashEntry(entryPtr);
00142     entryPtr = Tcl_NextHashEntry(&searchPtr);
00143   }
00144 }


Field Documentation

Tcl_HashTable Data_Hash_Table::htable
 

Definition at line 100 of file hash_table.h.

Referenced by Data_Hash_Table(), GetHash(), PutInHash(), and reset().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:05:11 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6