diff options
| author | Neo2003 <none@none> | 2008-10-04 06:17:19 -0500 |
|---|---|---|
| committer | Neo2003 <none@none> | 2008-10-04 06:17:19 -0500 |
| commit | 5651828bf74edb760d67700942fc65d51c816e0a (patch) | |
| tree | 1631f319bbc293794109f990beaccfd5b6cee8fe /dep/ACE_wrappers/ace/Hashable.h | |
| parent | ca7a4bf1a78a1ddc6eb21238cc2a1633194a11cc (diff) | |
[svn] * Added ACE for Linux and Windows (Thanks Derex for Linux part and partial Windows part)
* Updated to 6721 and 676
* Fixed TrinityScript logo
* Version updated to 0.2.6721.676
--HG--
branch : trunk
rename : 6700-670 => 6721-676
Diffstat (limited to 'dep/ACE_wrappers/ace/Hashable.h')
| -rw-r--r-- | dep/ACE_wrappers/ace/Hashable.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/dep/ACE_wrappers/ace/Hashable.h b/dep/ACE_wrappers/ace/Hashable.h new file mode 100644 index 00000000000..83f26ffee19 --- /dev/null +++ b/dep/ACE_wrappers/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*/ |
