Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Hashable.h
blob6892650be979f53fb78199a30513ca907dddd998
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 () = default;
35 /// Computes and returns hash value. This "caches" the hash value to
36 /// improve performance.
37 virtual unsigned long hash () const;
39 protected:
40 /// Protected constructor.
41 ACE_Hashable () = default;
43 /// This is the method that actually performs the non-cached hash
44 /// computation.
45 virtual unsigned long hash_i () const = 0;
47 protected:
48 /// Pre-computed hash-value.
49 mutable unsigned long hash_value_ {};
52 ACE_END_VERSIONED_NAMESPACE_DECL
54 #include /**/ "ace/post.h"
56 #endif /*ACE_HASHABLE_H*/