Correct feature names
[ACE_TAO.git] / ACE / ace / Hashable.h
blobee636b55248a1b75762b6d5508ee6cb7b9f2ba01
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Hashable.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
11 #ifndef ACE_HASHABLE_H
12 #define ACE_HASHABLE_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 /**
25 * @class ACE_Hashable
27 * @brief ACE_Hashable
29 class ACE_Export ACE_Hashable
31 public:
32 /// Destructor.
33 virtual ~ACE_Hashable (void);
35 /// Computes and returns hash value. This "caches" the hash value to
36 /// improve performance.
37 virtual unsigned long hash (void) const;
39 protected:
40 /// Protected constructor.
41 ACE_Hashable (void);
43 /// This is the method that actually performs the non-cached hash
44 /// computation.
45 virtual unsigned long hash_i (void) const = 0;
47 protected:
48 /// Pre-computed hash-value.
49 mutable unsigned long hash_value_;
52 ACE_END_VERSIONED_NAMESPACE_DECL
54 #if defined (__ACE_INLINE__)
55 #include "ace/Hashable.inl"
56 #endif /* __ACE_INLINE __ */
58 #include /**/ "ace/post.h"
60 #endif /*ACE_HASHABLE_H*/