Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | List of all members
CoreHash Class Reference
Inheritance diagram for CoreHash:
CoreBaseType

Static Public Member Functions

static const Core128BitHashKeynull_key ()
 
static void generate_md5 (const unsigned char *data, const size_t &size, Core128BitHashKey &key)
 
static void generate_murmur3 (const unsigned char *data, const unsigned long long &size, Core128BitHashKey &key, const unsigned int &seed=0)
 
static void generate_murmur3 (const unsigned char *data, const unsigned long long &size, Core32BitHashKey &key, const unsigned int &seed=0)
 
static Core32BitHashKey generate_jenkins (const char *data, size_t size)
 
static Core32BitHashKey get_hash (const void *value)
 
static Core32BitHashKey get_hash (size_t value)
 
static Core32BitHashKey get_hash (float value)
 
static Core32BitHashKey get_hash (double value)
 
static CoreString get_as_string (const Core128BitHashKey &key)
 
static constexpr Core32BitHashKey combine (Core32BitHashKey left, Core32BitHashKey right)
 
template<typename U , typename V , typename... W>
static constexpr Core32BitHashKey combine (U left, V right, W...hashes)
 
- Static Public Member Functions inherited from CoreBaseType
static const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.
 

Additional Inherited Members

- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Detailed Description

Monostate providing hash functions.

Member Function Documentation

static constexpr Core32BitHashKey CoreHash::combine ( Core32BitHashKey  left,
Core32BitHashKey  right 
)
inlinestatic

Combine 2 hashes together.

Note
Implementation based on Boost (hash_combine_impl(boost::uint32_t&, boost::uint32_t) in container_hash/hash.hpp)
template<typename U , typename V , typename... W>
static constexpr Core32BitHashKey CoreHash::combine ( left,
right,
W...  hashes 
)
inlinestatic

Helper used to combine any number of hash keys. Use it like this: ``` unsigned int hash = CoreHash::combine( CoreHash::get_hash(some_pointer), CoreHash::get_hash(some_float), some_unsigned_int ); ```

See Also
combine(Core32BitHashKey, Core32BitHashKey)
CoreString CoreHash::get_as_string ( const Core128BitHashKey key)
static

Serialized a 128 bits hash key to a string.

const Core128BitHashKey & CoreHash::null_key ( )
static

Get an empty 128 bits hash key.