3 //=============================================================================
7 * $Id: Hashable.h 80826 2008-03-04 14:51:23Z wotte $
11 //=============================================================================
13 #ifndef ACE_HASHABLE_H
14 #define ACE_HASHABLE_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/ACE_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 class ACE_Export ACE_Hashable
36 virtual ~ACE_Hashable (void);
38 /// Computes and returns hash value. This "caches" the hash value to
39 /// improve performance.
40 virtual unsigned long hash (void) const;
43 /// Protected constructor.
46 /// This is the method that actually performs the non-cached hash
48 virtual unsigned long hash_i (void) const = 0;
52 /// Pre-computed hash-value.
53 mutable unsigned long hash_value_
;
57 ACE_END_VERSIONED_NAMESPACE_DECL
59 #if defined (__ACE_INLINE__)
60 #include "ace/Hashable.inl"
61 #endif /* __ACE_INLINE __ */
63 #include /**/ "ace/post.h"
65 #endif /*ACE_HASHABLE_H*/