Exemplo n.º 1
0
 /**
  * Hashes the Struct type.
  * @param type The type to hash.
  * @return Returns the hash value for the type.
  */
 size_t operator()(puppet::runtime::types::basic_struct<Type> const& type) const
 {
     size_t seed = 0;
     hash_combine(seed, puppet::runtime::types::basic_struct<Type>::name());
     hash_range(seed, type.types().begin(), type.types().end());
     return seed;
 }
Exemplo n.º 2
0
 std::size_t hash_value(std::vector<T, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Exemplo n.º 3
0
 std::size_t hash_value(std::multimap<K, T, C, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Exemplo n.º 4
0
 std::size_t hash_value(std::set<K, C, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Exemplo n.º 5
0
 boost::uint64_t bag::hash(boost::uint64_t seed) const
 {
     return hash_range(m_value.begin(), m_value.end(), seed);
 }
Exemplo n.º 6
0
 boost::uint64_t tuple::hash(boost::uint64_t seed) const
 {
     return hash_range(m_value, m_value + m_size, seed);
 }
Exemplo n.º 7
0
 /**
  * Hashes the given hash type.
  * @param hash The hash type to hash.
  * @return Returns the hash value for the hash type.
  */
 size_t operator()(puppet::runtime::values::basic_hash<Value> const& hash) const
 {
     return hash_range(hash.begin(), hash.end());
 }
 static std::size_t compute_hash(const char* str,std::size_t off)
 {
   std::size_t len=std::strlen(str);
   if(off>len)off=len;
   return hash_range(str+off,str+len);
 }