Esempio 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;
 }
Esempio n. 2
0
 std::size_t hash_value(std::vector<T, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Esempio n. 3
0
 std::size_t hash_value(std::multimap<K, T, C, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Esempio n. 4
0
 std::size_t hash_value(std::set<K, C, A> const& v)
 {
     return hash_range(v.begin(), v.end());
 }
Esempio n. 5
0
 boost::uint64_t bag::hash(boost::uint64_t seed) const
 {
     return hash_range(m_value.begin(), m_value.end(), seed);
 }
Esempio n. 6
0
 boost::uint64_t tuple::hash(boost::uint64_t seed) const
 {
     return hash_range(m_value, m_value + m_size, seed);
 }
Esempio 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);
 }