Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Data_Hash_Table Class Reference

#include <hash_table.h>

Collaboration diagram for Data_Hash_Table:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Public Attributes

Tcl_HashTable htable

Constructor & Destructor Documentation

Data_Hash_Table::Data_Hash_Table  )  [inline]
 

Definition at line 81 of file hash_table.h.

References htable, and MAX_ATTRIBUTE.

00081                     {
00082     Tcl_InitHashTable(&htable, MAX_ATTRIBUTE);
00083   }


Member Function Documentation

Tcl_HashEntry * Data_Hash_Table::GetHash int *  attr  ) 
 

Definition at line 126 of file hash_table.cc.

References htable.

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

00127 {
00128   return Tcl_FindHashEntry(&htable, (char *)attr);
00129 }

void Data_Hash_Table::PutInHash int *  attr  ) 
 

Definition at line 132 of file hash_table.cc.

References htable.

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

00133 {
00134     int newPtr;
00135 
00136     Tcl_CreateHashEntry(&htable, (char *)attr, &newPtr);
00137 }

void Data_Hash_Table::reset  ) 
 

Definition at line 113 of file hash_table.cc.

References htable.

Referenced by DiffusionRate::reset().

00114 {
00115   Tcl_HashEntry *entryPtr;
00116   Tcl_HashSearch searchPtr;
00117 
00118   entryPtr = Tcl_FirstHashEntry(&htable, &searchPtr);
00119   while (entryPtr != NULL) {
00120     Tcl_DeleteHashEntry(entryPtr);
00121     entryPtr = Tcl_NextHashEntry(&searchPtr);
00122   }
00123 }


Member Data Documentation

Tcl_HashTable Data_Hash_Table::htable
 

Definition at line 79 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 Apr 20 12:37:12 2004 for NS2.26SourcesOriginal by doxygen 1.3.3