#include <Hashable.h>
Inheritance diagram for ACE_Hashable:

Public Member Functions | |
| virtual | ~ACE_Hashable (void) | 
| Destructor.   | |
| virtual unsigned long | hash (void) const | 
Protected Member Functions | |
| ACE_Hashable (void) | |
| Protected constructor.   | |
| virtual unsigned long | hash_i (void) const=0 | 
Protected Attributes | |
| unsigned long | hash_value_ | 
| Pre-computed hash-value.   | |
Definition at line 31 of file Hashable.h.
      
  | 
  
| 
 Destructor. 
  | 
  
      
  | 
  
| 
 Protected constructor. 
 Definition at line 9 of file Hashable.inl. 
 00010 : hash_value_ (0) 00011 { 00012 }  | 
  
      
  | 
  
| 
 Computes and returns hash value. This "caches" the hash value to improve performance. Definition at line 22 of file Hashable.cpp. References hash_i(), and hash_value_. 
 00023 {
00024   // In doing the check below, we take chance of paying a performance
00025   // price when the hash value is zero.  But, that will (hopefully)
00026   // happen far less often than a non-zero value, so this caching
00027   // strategy should pay off, esp. if hash computation is expensive
00028   // relative to the simple comparison.
00029 
00030   if (this->hash_value_ == 0)
00031     this->hash_value_ = this->hash_i ();
00032 
00033   return this->hash_value_;
00034 }
 | 
  
      
  | 
  
| 
 This is the method that actually performs the non-cached hash computation. Implemented in ACE_Refcounted_Hash_Recyclable< T >. Referenced by hash().  | 
  
      
  | 
  
| 
 Pre-computed hash-value. 
 Definition at line 53 of file Hashable.h. Referenced by hash().  | 
  
 
1.3.6