00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_HASHABLE_H_
00028 #define CEYLAN_HASHABLE_H_
00029
00030
00031 #include "CeylanTypes.h"
00032 #include "CeylanTextDisplayable.h"
00033
00034 #include <string>
00035
00036
00037 namespace Ceylan
00038 {
00039
00040
00051 typedef Ceylan::Uint8 WeakHashCode ;
00052
00053
00054
00065 typedef Ceylan::Uint32 StrongHashCode ;
00066
00067
00068
00079 class CEYLAN_DLL Hashable : public TextDisplayable
00080 {
00081
00082
00083 public:
00084
00085
00086
00088 Hashable() ;
00089
00090
00092 virtual ~Hashable() throw() ;
00093
00094
00095
00097 virtual WeakHashCode getWeakHashCode() const = 0 ;
00098
00099
00101 virtual StrongHashCode getStrongHashCode() const = 0 ;
00102
00103
00104
00115 virtual const std::string toString( VerbosityLevels level = high )
00116 const ;
00117
00118
00119
00125 static WeakHashCode GetWeakHashCode(
00126 const std::string & stringToHash ) ;
00127
00128
00129
00135 static StrongHashCode GetStrongHashCode(
00136 const std::string & stringToHash ) ;
00137
00138
00139
00140
00141 private:
00142
00143
00153 Hashable( const Hashable & source ) ;
00154
00155
00156
00166 Hashable & operator = ( const Hashable & source ) ;
00167
00168
00169 } ;
00170
00171 }
00172
00173
00174
00175 #endif // CEYLAN_HASHABLE_H_
00176