diff options
author | Rat <none@none> | 2010-06-07 19:10:55 +0200 |
---|---|---|
committer | Rat <none@none> | 2010-06-07 19:10:55 +0200 |
commit | 32546e22828e793e3881e1055acb72b6a044e331 (patch) | |
tree | 759706cdfe8423887c69a2f8ed651c0c1e5ab7d7 /externals/ace/Hashable.h | |
parent | 2e0f8fb6e558088b33bdee83bc5ff20014e983b3 (diff) |
added ace + vcproj for win
--HG--
branch : trunk
Diffstat (limited to 'externals/ace/Hashable.h')
-rw-r--r-- | externals/ace/Hashable.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/externals/ace/Hashable.h b/externals/ace/Hashable.h new file mode 100644 index 00000000000..83f26ffee19 --- /dev/null +++ b/externals/ace/Hashable.h @@ -0,0 +1,65 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Hashable.h + * + * $Id: Hashable.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Doug Schmidt + */ +//============================================================================= + +#ifndef ACE_HASHABLE_H +#define ACE_HASHABLE_H + +#include /**/ "ace/pre.h" + +#include /**/ "ace/ACE_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_Hashable + * + * @brief ACE_Hashable + */ +class ACE_Export ACE_Hashable +{ +public: + + /// Destructor. + virtual ~ACE_Hashable (void); + + /// Computes and returns hash value. This "caches" the hash value to + /// improve performance. + virtual unsigned long hash (void) const; + +protected: + /// Protected constructor. + ACE_Hashable (void); + + /// This is the method that actually performs the non-cached hash + /// computation. + virtual unsigned long hash_i (void) const = 0; + +protected: + + /// Pre-computed hash-value. + mutable unsigned long hash_value_; + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "ace/Hashable.inl" +#endif /* __ACE_INLINE __ */ + +#include /**/ "ace/post.h" + +#endif /*ACE_HASHABLE_H*/ |